Difficulty Distribution
Skills You'll Practice (16)
All 6 Scenarios
Click any scenario to practice it. No account required.
API Response Time Doubled
Your team's API was responding in 120ms average. After this morning's deploy, average response time jumped to 280ms. No errors, just slow. You have access to logs, database query times, and APM data. User complaints are starting. Walk me through how you debug this.
Design a URL Shortener
Design a URL shortening service like bit.ly. It needs to handle: 100 million URLs shortened per day, 10 billion redirects per day, URLs should be 7 characters long, analytics on click counts. Walk me through your design — databases, caching, load balancing.
Rate Limiting Design
Design a rate limiter for a public API. Requirements: 100 requests per user per minute, works across multiple servers (distributed), can burst up to 20 requests instantly, must be fast (<5ms overhead). What algorithm and data store do you choose?
Design Instagram Feed
Design the news feed for Instagram. Users have followers/following. When someone posts, followers see it in their feed. Must handle 500M users, 100M posts/day, and feed loads in <200ms. Walk me through: read vs write architecture, caching strategy, and edge cases.
Memory Leak in Production
Your Node.js service uses 500MB of RAM at startup. After 4 hours in production, it uses 2.8GB. It doesn't crash, but users report slowness. You have 20 replicas running. Walk me through how you find and fix this memory leak.
Database Query Timeout
A production endpoint that queries the user's order history is timing out (30s+). It worked fine yesterday. You have 5M orders in the table. The query is: SELECT * FROM orders WHERE user_id = ? ORDER BY created_at DESC LIMIT 20. How do you fix this?