Question library
Questions from real interviews. Drill any of them by voice in a couple of minutes, with an interviewer, a score and feedback.
How would you design a simple URL shortener, something like bit.ly?JuniorExplain how you'd protect a service from its dependencies failing: what timeouts, retries and circuit breaker would you put in place, and how would you know something has gone wrong?Mid-levelExplain the cache-aside strategy: how data is read and written, how you deal with stale data, and what happens when lots of keys expire at once.Mid-levelExplain the difference between replication and sharding: what problem each one solves, and what difficulties you'll run into.Mid-levelExplain what "at-least-once delivery" means and how to make a message handler idempotent so that a redelivery doesn't corrupt the data.Mid-levelExplain why a service needs to be stateless to scale horizontally, and how a load balancer distributes traffic across instances.Mid-levelWalk me through how you structure your answer in a system design interview: where do you start, what questions do you ask, and how do you estimate the load?Mid-levelDesign a URL shortener: a user submits a long URL and gets a short one, and following the short link redirects to the original.Mid-levelDesign a notification service that, based on events from other services, sends users email, push notifications and SMS, at up to several million notifications a day.Mid-levelDesign a rate limiter for a public API: for example, no more than 100 requests per minute per API key. The service runs on several instances.Mid-levelDesign uploading and processing of user photos: a user uploads an image, the service generates thumbnails in several sizes and shows them in a feed.Mid-levelDesign a concert ticket sales system where, the moment sales open, hundreds of thousands of people show up for a few thousand seats.SeniorDesign a news feed for a social network: users follow each other, the feed has to open instantly, and some authors have millions of followers.SeniorDesign a notification service for push, email and SMS, handling about fifty million notifications a day, with spikes during marketing campaigns.SeniorDesign a search bar with autocomplete for a large marketplace: from typing a character to displaying the suggestions.SeniorDesign a service for uploading and storing user files up to several gigabytes in size, for example videos.SeniorСпроектируйте сервис выписок: клиент в приложении запрашивает выписку по счёту в PDF за произвольный период, вплоть до нескольких лет.SeniorСпроектируйте сервис лимитов: у клиента есть дневные и месячные лимиты на переводы и снятия наличных, и каждую операцию нужно проверить до проведения.SeniorСпроектируйте сервис переводов по номеру телефона между клиентами банка: от нажатия кнопки «Перевести» до зачисления денег получателю.SeniorСпроектируйте систему антифрода для онлайн-переводов, которая должна вынести решение до того, как деньги уйдут со счёта.Senior