System Design Patterns: From Fundamentals to Real Systems
Vote
0% completed
Primary-Replica
1. The Incident
Your store runs on one PostgreSQL machine. It has for years. Every product page view, every search, every cart update, every order: one machine.
Growth becomes a problem on a Tuesday. Traffic analysis shows 8,000 reads per second (product pages, search, order history) and 300 writes per second (orders, cart changes). The machine can handle about 5,000 queries per second, total. Product pages take four seconds to load. Checkout, which writes, slows down too, because reads and writes are competing for the same CPU, memory, and disk
.....
.....
.....
Like the course? Get enrolled and start learning!