Illustrative simulation. The values come from a model, not a measured production system.
Try it · break it under load
UPI balance checks and transfers. 2,000 requests a second hit two app servers: 500 writes (transfers) and 1,500 reads (balance inquiries). Writes go to Postgres Primary. Reads go to Postgres Replica. The numbers are made up and round. Trigger replication lag to see read-your-writes break, or stop Primary to watch leader failover.
Read scenario overview
- Components: UPI Users (source); App 1 (server): capacity 2,000/s, 10 ms; App 2 (server): capacity 2,000/s, 10 ms; Primary (db): capacity 1,500/s, 8 ms; Replica (db): capacity 2,000/s, 4 ms.
- Traffic: starts at 2,000 requests/second (slider range 0 to 4,000/s).
- Interactive controls: Replication lag (2.5s), Read routing. Servers and database can be stopped and restarted by clicking them.
Learn the idea behind it
The demo shows what breaks. The lesson explains why it breaks, and what you give up with each fix.
- Database Replication Paid
This demo is free. The System Design pass (₹499) opens all 28 demos, 36 design interview problems and 75 Docker labs. See what the pass includes →