#sharding
6 articles
Design a Vector Database / Semantic Search Service
Index 1 billion 768-dimensional vectors and answer top-k similarity queries in under 20 ms — the ANN indexing, sharding, and filtering architecture behind Pinecone, Weaviate, and pgvector.
Design a Distributed Cache (like Memcached)
A cache that scales across hundreds of nodes — consistent hashing, replication, eviction, and the operational problems you'll meet.
Design Twitter / X (the home timeline)
500M users, 500M tweets/day, p99 feed loads under 200ms. The fanout-on-write vs fanout-on-read trade-off that defines the system.
Design a URL Shortener (TinyURL / bit.ly)
A classic FAANG warmup. Generate short codes, store them, redirect fast, scale to billions of URLs.
Database Sharding
When you outgrow a single database — how to split data across many machines, the strategies that work, and the operational pain you'll inherit.
Consistent Hashing
Why hash-mod-N breaks when you resize, and how Amazon Dynamo, Cassandra, and Memcached avoid it with consistent hashing and virtual nodes.