retrystorm · Learn · Interview practice · Glossary · Components

Home › Interview practice

Interview practice

Mock interviews

  • Distributed rate limiter: Limit every API key to its plan across 50 servers, at 200 000 checks a second, without slowing the API or taking it down.
  • Ticket booking: Sell 50 000 seats to a million people in a few minutes, never selling one seat twice, with holds that expire.
  • Search suggestions: Suggest the top five completions on every keystroke, from what readers searched for, in under 100 ms.
  • Nearby places: Find the places near a reader among 200 million, in dense cities and empty country alike, within 200 ms.

Problems to solve in the simulator

  • A Fast Home Page: The home page waits on a recommendations store that's sometimes very slow. Keep the page fast without dropping the box.
  • Attachments: Writers attach files to their notes. The database's network card fills up, and plain notes slow down with it. Give it the bandwidth it needs.
  • Cache the Hot Pages: A product catalog where a few pages get most views. Add a cache without serving old prices.
  • Charge Once: Some tips take longer to save than the app waits, and the retry charges the reader twice. Make a retry safe.
  • Chat: Design Inkwell Chat: held connections that survive a crash, and messages that are delivered in order, on time and never lost.
  • Circuit breakers: After a rush the servers' deep queues keep callers retrying into a backlog nobody is waiting for. Add a circuit breaker so the queues can drain.
  • Even Out the Exports: A few slow PDF exports drag every request down. Same servers, smarter balancing.
  • Event Stream: Everything readers do on Inkwell is an event. Three services read the stream, one of them joins late, and one writer makes a lot of noise.
  • Export in the Background: Turning a notebook into a PDF takes the better part of a second. Accept exports at once and render them on workers.
  • Fair Share: Keep one partner's runaway integration from taking Inkwell's API away from everyone else.
  • Feed for Everyone: Every new post lands in the home feed of each of its writer's followers. Keep the feeds fresh without paying for idle workers.
  • File Sharing: Design Inkwell Drive: share big files with readers on three continents, with uploads that never touch the app servers.
  • Find the Fault: The pager went off: one request in four fails, and the errors say different things. Read what the system tells you, then fix each cause.
  • Fresh Enough Prices: Prices change behind the cache's back. Pick a TTL that keeps them fresh without drowning the database.
  • Hello, Backend: Wire your first request path: client, app server, database.
  • The morning after the rush: Retries pile up behind requests nobody is waiting for.
  • Too many connections: A slow query holds connections until the database runs out.
  • Everything times out: A deep queue means almost every request waits past the timeout.
  • Blogs falls over at noon: A read-heavy blog outgrows one app server and one database node.
  • The 8:00 rush won't end: Callers retry straight into the rush they are part of.
  • Wrong prices in the shop: A cache with no expiry shows prices that changed long ago.
  • Keep Every Note: Make a saved note survive the database's primary dying, even the ones saved a moment before.
  • Ledger: Credit tips to writers' balances without losing any, even when two arrive together for the same writer.
  • Mint the Codes: Hand out short, unique codes from many app servers at once, fast enough for a bulk import.
  • News Feed: Design Inkwell Home: a fast, fresh feed for every reader, when most writers have a few followers and a few have thousands.
  • Notifications: Design Inkwell Notify: password resets that arrive in seconds, digests that can wait, and no one sent twice or never.
  • Out of Connections: Blog pages run a slow query, and the database turns them away with half its CPU idle. Give it the connections it needs.
  • Payments: Design Inkwell Pay: record a reader's tip once, never lose it, and ride out the database's primary dying.
  • Pictures Everywhere: A megabyte per picture, a thousand pictures a second, and a database that won't get bigger. Take the pictures off the servers.
  • Publish and Refresh: Make sure writers always see the posts they just published, without paying for strong reads nobody needs.
  • React to a Post: Every new post must be indexed for search, announced to followers and counted for analytics. Each subscriber has its own deadline, so size each one for its own.
  • Reactions: Design Inkwell Reactions: likes and counts that survive a post going viral.
  • Read the Archive: Years of old blog posts, each read about as often as the next. Scale the reads, and spend the money where it helps.
  • Ride Out the Rush: A daily rush overloads the servers for a few seconds. Make the app retry so the rush passes without errors or long waits.
  • Right-Size the Cache: A big catalog behind a slow database. Find the cache that makes pages fast for the least money.
  • Scale Reads with Replicas: A blog read far more than it is written. One database node can't keep up, and it can't get bigger.
  • Serve the World: Profile pictures for users on three continents. Bring them close with a CDN.
  • Session Store: Keep sessions readable through a replica outage, without ever returning an old one, by choosing replicas and quorums.
  • Shed the Load: All day there's more traffic than two servers can take. Make the ones who get in fast, and tell the rest right away.
  • Size Inkwell Groups: Turn the product team's numbers into servers: fast at the peak, without paying for idle machines.
  • Social Media Post Likes: Track likes for billions of posts under hot-key fan-out and bursty traffic.
  • Spread the Feed: Thousands of new posts a second and one viral post, on a store with small partitions.
  • Stay Connected: Keep thousands of readers connected to live comments through a gateway crash, without a stampede when they all come back.
  • Stay Up: Keep Inkwell Blogs serving when an app server dies and then the database's primary does.
  • Survive the Launch: Traffic quadruples at launch. Scale out, then find the next bottleneck.
  • URL Shortener: Mint short codes for long URLs and serve hot redirects under read-heavy load.
About · Contact · Privacy · Terms of use