System design, side by side
The pairs interviewers love to contrast, animated on real apps. Watch one side, then the other, then read the difference in one table.
Monolith vs Microservices
One deploy that does everything, or services that ship, fail and scale apart.
ZeptoHorizontal vs Vertical scaling
More machines behind a load balancer, or one bigger machine.
UberLoad balancer vs API gateway
Pick a healthy server, or check who you are and where you’re going.
ZeptoStateful vs Stateless servers
A checkout kept in one server’s memory, or in a database any copy can read.
ZeptoConsistent hashing vs Modulo hashing
Add one server: only a slice of keys moves, or almost all of them do.
Its own sceneSSE vs WebSocket
One answer streaming down, or a chat going both ways.
ChatGPT · WhatsAppWebSocket vs Push notification
Rajat online gets it on his socket; away, a push wakes his phone.
WhatsAppREST vs GraphQL
Three round trips for one screen, or one query that asks for exactly it.
ZeptoREST vs gRPC
JSON for the outside world, Protobuf over HTTP/2 between services.
ZeptoTCP vs UDP
Every packet, in order, or the newest packet, now.
WhatsApp- SoonSQL vs NoSQLOrders with transactions and joins, or messages by the billion.ChatGPT · Zepto · WhatsApp
- SoonStrong vs Eventual consistency✓ only after a quorum saves it, or replicas that catch up later.WhatsApp · ChatGPT
- SoonSharding vs ReplicationSplit the data across machines, or copy it to more of them.Zepto · ChatGPT
- SoonCache-aside vs Write-throughThe app fills the cache on a miss, or every write goes through it.Its own scene
- SoonRedis vs MemcachedData types, persistence and replication, or a plain and very fast key-value cache.Its own scene
- SoonOptimistic vs Pessimistic lockingTwo people book the last seat: check at save time, or lock it first.Its own scene
- SoonB-tree vs LSM treeUpdate data in place, or append now and merge later.Its own scene
- SoonSync vs Async communicationWait for the inventory hold, or publish OrderConfirmed and move on.Zepto
- SoonKafka vs RabbitMQA log that consumers replay, or a queue that hands each job out once.Its own scene
- SoonBatch vs Stream processingCrunch yesterday’s data overnight, or each event the moment it arrives.Its own scene
- SoonSaga vs Two-phase commitSteps that can be undone, or everyone locked until the coordinator says go.Zepto
- SoonIdempotency key vs Plain retryA retried payment charged once, or twice.Zepto · WhatsApp
- SoonToken bucket vs Leaky bucketBursts allowed up to a budget, or a steady drip whatever arrives.Its own scene
- SoonFan-out on write vs Fan-out on readCopy each post into every follower’s feed, or build the feed when they open it.Its own scene
- SoonGeohash vs QuadtreeFind the drivers near you: by a grid of prefixes, or by splitting busy areas.Uber
- SoonKeyword search vs Vector searchMatch the words people type, or the meaning behind them.Its own scene