Clarify the boundaries between Workers, Durable Objects, D1, R2, queues, and external services.
Cloud and edge
Design the edge system before it hardens.
Cloudflare architecture planning for teams that need Workers, Durable Objects, D1, queues, media, WebSocket sync, and deployments to fit together.
Decide where WebSocket sessions, sync-state projections, reconnect behavior, and event fanout should live.
Convert the architecture into local development, deployment, migration, asset handling, and operational steps.
Session, queue, cache, file, and database responsibilities are spread across too many places to reason about.
WebSocket routing, reconnect behavior, event fanout, and UI state are not clearly owned.
Workers, assets, migrations, images, D1, R2, and environment config are moving without one operational sequence.
Edge goods
Cloudflare work as a system shelf.
The cloud work is split into visible parts: compute, state, realtime sync, generated media, file delivery, and the operational sequence that keeps them from becoming a grab bag.
Cloud products
4 Cloudflare offers
Use the shelf to name the architecture problem. Checkout secures the call; the exact Cloudflare shape gets chosen after the constraints are clear.
Edge architecture
Cloudflare Five-Me-Flare Jacket
Design a Cloudflare architecture with clear boundaries for Workers, state, storage, queues, deploys, and operational ownership.
worker.ts - Edge decisions in order.
State architecture
Durable Object Denim
Plan stateful edge features such as collaboration, live sessions, queues, and durable coordination before the data model gets messy.
room.do.ts - State with ownership.
Realtime state
Realtime WebSocket Sync Kit
Shape WebSocket routing, sync-state projections, reconnect behavior, and event fanout so live interfaces stay responsive.
sync-state.ts - Realtime state without noisy echoes.
Asset pipeline
R2 Bucket Hat
Review uploads, generated media, derived files, and image delivery so content operations stay simple.
bucket.ts - Images without sprawl.
Checkout
Bring the traffic, state, and deployment constraints.
Useful checkout context includes current hosting, expected traffic, stateful workflows, file handling, compliance constraints, and the parts of Cloudflare already in use.