Design drills
Here is a system and how it is configured. Something just changed. What do you change? Each drill takes a few minutes, starts from a real configuration, and links to the lesson behind it. Case studies do the same with real events from public postmortems.
Case studies
Real incidents and migrations, told from the companies' own write-ups.
- IntermediateGitLabPostgreSQL
GitLab deletes its production database
Replication breaks under load, a late-night rebuild goes wrong, and the backups turn out not to work.
- SeniorRedditKubernetes
Reddit's Pi Day Kubernetes upgrade
An in-place upgrade of Reddit's oldest cluster quietly breaks pod networking.
- IntermediateCloudflareAPI gateway & load balancing
One regular expression takes down Cloudflare
A firewall rule deployed globally in seconds exhausts CPU on every edge server.
- SeniorFacebook (Meta)API gateway & load balancing
Facebook disappears from the internet
A maintenance command takes down the backbone, and DNS withdraws itself by design.
- SeniorDiscordCaching
Discord's hot partitions and trillions of messages
One busy channel slows the whole Cassandra cluster. Discord rebuilds the path in front of the database.
- SeniorAmazon Web ServicesEvent-driven
A small capacity add breaks AWS Kinesis
Adding servers pushes every server past an operating system thread limit.
Redis
- Beginner2 questions
The product cache outgrows its memory
A Redis cache with the default eviction policy meets a catalog three times bigger.
- Intermediate2 questions
Sessions and cache share one Redis
Users are being logged out under load. Security wants sessions to survive restarts.
- Senior2 questions
Moving a checkout script to Redis Cluster
A Lua script touches a user's cart and a global stock counter. Now it must run on a cluster.
Kafka
- Beginner2 questions
A new service needs last week's orders
An analytics service joins an orders topic and finds it only sees new messages.
- Intermediate2 questions
Orders must survive a broker failure
Replication factor 2, acks=1, and a requirement for zero acknowledged-message loss.
- Senior2 questions
A slow fraud check joins the consumer
Each record now takes up to 800 ms, and every flagged order must be written exactly once.
RabbitMQ
- Beginner2 questions
Emails must not vanish when a worker crashes
One email worker with automatic acks is about to become four.
- Intermediate2 questions
Upgrading a cluster that uses mirrored queues
Payments run on classic mirrored queues. The cluster is moving to RabbitMQ 4.
- Senior2 questions
Ledger entries must stay in order per account
Eight consumers share one queue. Now each account's entries must apply in order.
Amazon SQS
- Beginner2 questions
Long video jobs join a queue built for images
A queue tuned for 5-second image jobs is about to carry 8-minute video jobs.
- Intermediate2 questions
A FIFO queue meets Black Friday
Order updates use one message group. Traffic is about to grow ten times.
- Senior2 questions
One bad record keeps retrying a whole batch
Lambda reads SQS in batches of ten. A rate-limited API now rejects single records.
Hazelcast
- Beginner2 questions
A price cache with no eviction
A Hazelcast map caches prices with default settings. The catalog grows ten times.
- Intermediate2 questions
Embedded members in an autoscaling app
Sessions live in embedded Hazelcast inside pods that scale every few minutes.
- Senior2 questions
Flash-sale stock in a near-cached map
Stock counts are read through a near cache and updated with get then put.
PostgreSQL
- Beginner2 questions
A slow query on a table that never stops taking writes
Order lookups by customer take seconds. The table takes writes all day.
- Intermediate2 questions
Serverless functions run out of database connections
Each Lambda opens its own connection, and PostgreSQL allows 100.
- Senior2 questions
Long reports keep getting cancelled on the replica
Analysts run 20-minute queries on a hot standby, and PostgreSQL cancels them.
Search (Elasticsearch)
- Beginner2 questions
Searching for an exact SKU returns nothing
Product codes are indexed as full text, and exact matches fail.
- Intermediate2 questions
Changing a field type without downtime
A price field was mapped as text. Sorting and ranges need it as a number.
- Senior2 questions
Search shows products that no longer exist
The app writes to PostgreSQL and Elasticsearch separately, and they drift.
Kubernetes
- Beginner2 questions
A database blip restarts every pod
The liveness probe checks the database, so a short outage kills the whole fleet.
- Intermediate2 questions
The autoscaler never scales
A HorizontalPodAutoscaler targets CPU, but the pods have no resource requests.
- Senior2 questions
Every deploy drops a few hundred requests
Rolling updates look clean, yet clients see connection errors during each one.
API gateway & load balancing
- Beginner2 questions
Report exports fail with 504 at the gateway
The gateway times out at 30 seconds; big exports take up to two minutes.
- Intermediate2 questions
Retries at every layer turn a slowdown into an outage
The client, gateway and service each retry three times. One slow database does the rest.
- Senior2 questions
A deep health check takes the whole fleet out
Every target checks the cache cluster; when the cache blips, the load balancer reacts badly.
Caching
- Beginner2 questions
Customers see yesterday's price
A product cache with a 24-hour TTL keeps showing old prices after an update.
- Intermediate2 questions
The database spikes every minute
A hot homepage key expires every 60 seconds and thousands of requests rebuild it at once.
- Senior2 questions
An old name comes back for a day
Writes update the database and delete the key, yet some users see stale profiles for hours.
Event-driven
- Beginner2 questions
Checkout fails when analytics is down
Checkout calls three services in a row before replying. A fourth team wants in.
- Intermediate2 questions
Some orders never reach the warehouse
The order service commits to its database, then publishes to Kafka. Sometimes only one happens.
- Senior2 questions
Orders span payment, restaurant and courier
A synchronous chain of calls needs manual fixes whenever a step fails halfway.