Writes That Postgres Couldn’t Take
Easy · system design problem
A promo doubles write-heavy traffic and the API autoscales into the per-node connection limit. Every CockroachDB node is a writer and a gateway.
orders-api runs on CockroachDB (14 nodes): half the requests are writes, each a Raft-replicated transaction. Each node accepts at most 20 client connections; orders-api autoscales and keeps 20 connections per instance. At T+20s a promo doubles traffic for the rest of the day. CockroachDB rebalances ranges onto new nodes online.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.