SHEET · 08-READ-WRITE-SPLIT

Read + Write Split

Real systems mix reads and writes. Load-balance multiple servers, put a cache on the hot read path, and a queue in front of the database to absorb write bursts. Two patterns, one diagram.

SLA · success ≥ 85.0% · p95 ≤ 800 ms · load ~2400 req/s
📖 CONCEPT← DRAWING SET
Add a client — every system needs somewhere for traffic to come from.
PARTS · CATALOG
Components
Drag onto the sheet, or click to add. Hover any item for details.
COMPUTE
👤 Client
A client represents the users (or other systems) hitting your service. In Flow, every tick each client fires off a batch of requests into the system.
Think: people pressing 'Send' in an app.
LatencyHow long this component spends handling each request. ≈ 0 ticks in simulation time. Jitter ±0% adds realistic variation.0 ms
CapacityMax requests this component can work on at the same time. no concurrency limit, derived from capacity ÷ latency. If more requests arrive than this, they get dropped.unbounded
🖥️ Server
A server takes in a request, does work for a few milliseconds, then hands it off (to a database, cache, or back to the client). It can only handle so many requests at the same time — its capacity.
Think: a barista. Fast, but only one drink per hand at a time.
LatencyHow long this component spends handling each request. ≈ 3 ticks in simulation time. Jitter ±20% adds realistic variation.30 ms
CapacityMax requests this component can work on at the same time. ≈ 2667 req/s sustained, derived from capacity ÷ latency. If more requests arrive than this, they get dropped.80 concurrent
ROUTING
⚖️ Load Balancer
A load balancer accepts incoming requests and forwards each to one of several downstream servers. Its fan-out policy decides which server to pick (round-robin, random, or least-loaded).
Think: the host at a restaurant deciding which waiter takes the next table.
LatencyHow long this component spends handling each request. ≈ 1 tick in simulation time. Jitter ±5% adds realistic variation.10 ms
CapacityMax requests this component can work on at the same time. ≈ 50000 req/s sustained, derived from capacity ÷ latency. If more requests arrive than this, they get dropped.500 concurrent
📬 Queue
A queue accepts messages from a producer and acknowledges them instantly — the producer doesn't wait for the consumer to do the work. The consumer pulls messages from the queue at its own pace. This lets a fast producer absorb bursts without overwhelming a slower consumer; the trade-off is eventual consistency (the producer doesn't know if the work succeeded).
Think: a kitchen ticket rail. Waiters drop orders on the rail and walk away; cooks pull tickets when they're free.
LatencyHow long this component spends handling each request. ≈ 1 tick in simulation time. Jitter ±5% adds realistic variation.10 ms
CapacityMax requests this component can work on at the same time. ≈ 20000 req/s sustained, derived from capacity ÷ latency. If more requests arrive than this, they get dropped.200 concurrent
DATA
Cache
A cache sits in front of slower storage and answers repeated requests instantly. Each cache edge has a hit rate — the fraction of requests served from memory without going to the database.
Think: keeping the most-used files on your desk instead of in the cabinet.
LatencyHow long this component spends handling each request. ≈ 1 tick in simulation time. Jitter ±10% adds realistic variation.10 ms
CapacityMax requests this component can work on at the same time. ≈ 20000 req/s sustained, derived from capacity ÷ latency. If more requests arrive than this, they get dropped.200 concurrent
🗄️ Database
A database persists data so it survives restarts. Reads and writes take longer than in-memory work, and databases handle fewer concurrent requests than servers, which makes them a common bottleneck.
Think: a filing cabinet. Reliable, but slower than your desk drawer.
LatencyHow long this component spends handling each request. ≈ 4 ticks in simulation time. Jitter ±15% adds realistic variation.40 ms
CapacityMax requests this component can work on at the same time. ≈ 3000 req/s sustained, derived from capacity ÷ latency. If more requests arrive than this, they get dropped.120 concurrent
Mini Map
Select a node to inspect it.
Press Validate or Run Simulation to see results.