Backend Developer
System design questions
135 questions on System design for backend developers, easiest first.
Easy 20
- Duplicate emails despite a checkeasy
- Updating a counter in MongoDBeasy
- Counting API calls in Rediseasy
- What a load balancer doeseasy
- Serving images to far-away userseasy
- The cache-aside patterneasy
- Scaling a read-heavy databaseeasy
- Latency versus throughputeasy
- Estimating requests per secondeasy
- How much downtime 99.99% allowseasy
- Why keep app servers statelesseasy
- How a token bucket limits rateeasy
- What an API gateway handleseasy
- Large file uploadseasy
- Spotting a single point of failureeasy
- DNS failover is sloweasy
- Cost of adding indexeseasy
- Pushing live order statuseasy
- Batch or stream processingeasy
- A live game leaderboardeasy
Medium 38
- Two awaits that could run togethermedium
- Optimistic lock update hits 0 rowsmedium
- Retrying after a shared outagemedium
- What a circuit breaker doesmedium
- Async callback inside forEachmedium
- Page view counter loses countsmedium
- Insert or update in one statementmedium
- Two accounts with one emailmedium
- Updating or deleting the cache on writemedium
- Different prices on different serversmedium
- Fast top suggestions per prefixmedium
- Core of a URL shortenermedium
- Iteration order of a Go mapmedium
- In-memory Map cache across many serversmedium
- Retrying a 409 Conflictmedium
- Write-through caching trade-offmedium
- Average latency with a cachemedium
- Stale data from a read replicamedium
- Paging through a huge feedmedium
- Estimating storage for uploadsmedium
- How many short URLs fitmedium
- IDs across many serversmedium
- Quorum reads and writesmedium
- Load balancing slow requestsmedium
- Routing by URL pathmedium
- Building a home feedmedium
- What a Bloom filter answersmedium
- Search with LIKE is slowmedium
- A like counter on a viral postmedium
- Where eventual consistency is finemedium
- Availability of a call chainmedium
- What to autoscale workers onmedium
- Why look at p99 latencymedium
- Microservices for a team of fourmedium
- Finding nearby driversmedium
- IP rate limits block real usersmedium
- Synchronous or async replicationmedium
- Separate models for reads and writesmedium
Hard 77
- Safe retries for paymentshard
- CAP during a network partitionhard
- Lost update on a wallet balancehard
- Cache stampede on a hot keyhard
- Saving to DB and publishing an eventhard
- One slow route freezes Node.jshard
- Connection pools and autoscalinghard
- Why a lock alone is not enoughhard
- Workers block each other on a jobs tablehard
- Deadlocks between two transfershard
- Two doctors go off call at oncehard
- Account events processed out of orderhard
- Retries stacked at every layerhard
- Profile shows old data after savinghard
- Adding a fifth cache nodehard
- Sharding orders by creation datehard
- Stale value returns after cache deletehard
- Work continues after the client gives uphard
- Burst at a fixed window boundaryhard
- return versus return await in tryhard
- Pool exhausted during paymentshard
- Concurrent requests from throughputhard
- Users uploading 2 GB videoshard
- Sorting a file larger than memoryhard
- Rate limiting with a time windowhard
- One company sees another's invoiceshard
- Keeping OAuth tokens out of the browserhard
- A reset link used twice at oncehard
- Both doctors go off callhard
- One counter row slows every salehard
- Two admins edit the same producthard
- Two workers both think they hold the lockhard
- CROSSSLOT errors after moving to Clusterhard
- One Redis key gets half of all traffichard
- Keeping wallet balances only in Redishard
- All inserts land on one shardhard
- Sharding by tenant with one giant tenanthard
- Search shows deleted productshard
- A join across two services' databaseshard
- Fast routes on a country-sized maphard
- How a spreadsheet recalculates cellshard
- Designing an O(1) LRU cachehard
- Adding a cache server without reshufflinghard
- What a Bloom filter can promisehard
- Sharing a HashMap across threadshard
- Counting unique visitors at huge scalehard
- Same request, two cache entrieshard
- Stopping double charges on retrieshard
- One key overloading a cache shardhard
- Deduplicating more data than fits in memoryhard
- Why consistent hashing uses virtual nodeshard
- Error direction of a Count-Min Sketchhard
- Race in check-then-puthard
- Concurrent writes to a Go maphard
- One tenant floods the queuehard
- One hot RabbitMQ queuehard
- Consumer cannot find new datahard
- A fixed concurrency limithard
- When the control plane is downhard
- A payment call timed outhard
- Fan-out for a celebrity accounthard
- The weakness of two-phase commithard
- Last-write-wins loses an updatehard
- Offline edits that must mergehard
- How many nodes can failhard
- Trade-offs without a partitionhard
- Linearizable is not serializablehard
- Requests for keys that do not existhard
- Risk of a write-back cachehard
- Random UUIDs as primary keyshard
- Memory for a million socketshard
- Holding seats during checkouthard
- Designing a wallet ledgerhard
- Limiting the blast radiushard
- Writes in two regions at oncehard
- Throttling on one partition keyhard
- Rebuilding state from many eventshard