All blueprints

BLUEPRINT / TRAFFIC AND SCALE

Replication

Keep copies close to readers and choose which copy gets to be right.

The shape

Replication keeps copies of data on separate machines. Copies can improve read capacity and survive a machine failure, but they need a rule for accepting and observing writes.

The useful question

What does a successful write mean to a caller? Acknowledging one local copy is fast, while waiting for a quorum makes more copies agree before success is returned.

Stress test

Partition one replica from its peers. Read from both sides and compare the possible stale result with the possibility of rejecting a write.

Tradeoff

Stronger consistency can reduce availability during a network split. The right choice depends on whether stale data or an unavailable operation is more harmful.

LIVE SYSTEM / REV 01

Read path under load

Operational
Live service architectureA client sends requests through a load balancer to two app servers, a cache, a database, and a queue. Increase traffic or select a node to inject a failure.HEALTHYClientHEALTHYLoad balancerHEALTHYApp server AHEALTHYApp server BHEALTHYCacheHEALTHYDatabaseHEALTHYQueueEDGE CLIENTSCOMPUTE POOLPERSISTENCE

36k requests per second are balanced across two app servers. The cache absorbs 82% of reads.

Playground · available soon