Design drills
Here is a system and how it is configured. The requirements just changed. What do you change? Each drill takes a few minutes, starts from a real configuration, and links to the lesson behind it.
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.
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.