Designs by DuhartAll work
Rank
15 of 28
Tier
Tier B 68 of 120

7 — Cloudflare Edge Platform

Rank 15 of 28 · Tier B · app/workers/, app/GlobalCloudflareAdapter, app/BillboardGateway/worker Stack: TypeScript, Hono, Cloudflare Workers, D1, R2, KV, Durable Objects, Hyperdrive, WASM, Cloudflare Stream, wrangler

Why this ranks here. Edge compute is genuinely differentiated experience — and the constraints are what make it interesting to a distributed-systems interviewer. No TCP sockets, no long-lived state, single-writer Durable Objects, and a cold-start budget. Every one of those forced a real architectural decision here.


The fleet

WorkerRole
billboard_users10.5K lines, 65 routes — library, playlists, feed, charts, Jamz matching
billboard-feed-workerFeed API (was mock-only; identified and replaced)
global_upload_serviceMedia ingest, R2 multipart, IngestDO
boxoffice-apiVideo catalog and moderation queue
global_searchCross-mode search
exploreDiscovery surfaces
match_serviceEdge-side match endpoints
storefrontCommerce
rpc_workerService-to-service RPC
array-media-service-manager-v2Media orchestration

Plus billboard-gateway-edge — R2 range streaming for audio, with an /api/* proxy to the Node origin.

The interesting constraint

Workers cannot open raw TCP sockets. Not with a library, not with a shim. That makes the Kafka wire protocol and CQL permanently unreachable from the edge.

This is the constraint that produced the Activity Graph's outbox design: the Worker writes an event row transactionally, and a separate host-resident Go process relays it into Kafka. The architecture is a direct consequence of a platform limit, which is exactly the reasoning shape a systems-design interview is looking for.

Storage primitives, and what each is for

PrimitiveUsed forWhy not the others
D1 (SQLite)Relational user/library dataCheap, transactional, edge-local reads
R2Audio/video objects, multipart ingestNo egress fees; range requests for streaming
KVConfig, hot lookupsEventually consistent, so never for anything ordered
Durable ObjectsUpload sessions (IngestDO), fingerprinting (JamzFingerprintDO)Single-writer coordination — the only strong-consistency tool at the edge
HyperdrivePooled Postgres from the edgeConnection pooling that Workers otherwise cannot have

WASM at the edge

JamzFingerprintDO loads kissfft.wasm — an FFT compiled to WebAssembly to compute audio fingerprint constellations inside a Durable Object. (The module was referenced but had never been built; building it was commit e04aaf6fb.) The emsdk/ and chromaprint/ trees in /srv are the toolchain and reference implementation behind it.

Scope

MetricValue
Workers10
Edge TypeScript~75K lines
Storage primitivesD1, R2, KV, Durable Objects, Hyperdrive
NotableWASM FFT in a DO; R2 range streaming; multipart ingest

Interview surface this opens