Problems / Databases, medium
A session store spreads keys over 4 partitions that each handle 400 operations a second. Traffic is 2,500 a second.
Free to open. Runs in your browser, no sign-up.
Success ≥ 99%, p99 ≤ 300 ms.
2,500 requests a second for 30 seconds: 80% reads, 20% writes.
What each component does in this design, and what calls it. The simulator mimics each one from these settings.
| Component | Its job here | Settings |
|---|---|---|
| Load balancerLoad balancer | Traffic enters here.Calls API.Layer 4 balancers route by IP and port; layer 7 balancers read HTTP and can route by path or header. | – |
| APIApp service | Load balancer forwards to it.Calls Session store.Little's law: throughput ≈ concurrency ÷ latency. 200 slots at 50 ms serve about 4,000 req/s. | 3 replicas × 200 slots · timeout 1.0 s |
| Session storeKey-value store | API calls it.Key-value stores spread keys over partitions; one very popular key can overload a single partition. | 4 partitions × 400 ops/s |
Try it first. Open one hint at a time if you get stuck.
Throughput = partitions × per-partition limit.
4 × 400 = 1,600 < 2,500.
Add partitions (shards).