Design a read-only lookup service for a billion identifiersSystem designDesign a backend that serves read-only data for about one billion identifiers. Explain how the data is organized, how a request finds the machine that holds its answer, and where…
Last asked Nov 2026
Key-value cache with per-entry TTLCodingImplement an in-memory key-value cache where every write gives a key, a value and a time-to-live. Once an entry's time is up it must behave as if it was never written.
Last asked Nov 2026
+7
Design TinyURL: a URL shortener with fast redirectsSystem designDesign a URL shortener like TinyURL. It turns a long URL into a short link (for example https://s.example.com/aZ9k2Qx) and redirects visitors to the original URL.
Design a feature flag serviceSystem designDesign a feature flag service for a company that runs many backend services. Engineers create and edit flags in a console.
Design the data flow behind a food delivery restaurant listSystem designWhen a customer opens a food delivery app with a delivery address, the home screen lists the restaurants that can deliver there right now. Design how restaurant data flows from…
Design a cache for large model weights on GPU nodesSystem designOn a serverless GPU platform, a container serving a model downloads the model's weights, around 40 GB, every time it starts cold. Design a cache so that the second start of the…
Last asked Sep 2026
Explore a friend graph through a remote API with few callsCodingYou cannot read a social graph directly. The only access is a remote call that returns one user's friends, and each call is a network round trip with a usage restriction.
Last asked Sep 2026
PI
Bounded LRU cache in front of a database repositoryCodingA backend service reads records from a database through a repository, and reads are slow. Write, by hand, a cache in front of the repository: repeated reads of a key are served…
Last asked Sep 2026
Cut read latency in an existing relational database designSystem designA service keeps its data in a normalised relational database. Its hottest reads assemble each response from several related tables, and read latency on those paths is higher than…
Design a distribution-center inventory update serviceSystem designDesign a service that receives stock updates from distribution centers and keeps the latest quantity, availability and last-update time for every pair of location and item, with…
Last asked Sep 2026
Design a book price aggregatorSystem designYou run a middleman service for buying books. A customer submits an ISBN, the most they are willing to pay and a payment method.
Design a global caching service for small imagesSystem designDesign a global caching service for small images. Behind it is a single database that holds every image and is the source of truth.
Design distributed storage for build artifactsSystem designDesign a distributed storage system for build artifacts: the compiled binaries, packages and archives the build pipeline produces, which later pipeline stages download to test…
Last asked Sep 2026
+3
Design a nearby points-of-interest serviceSystem designDesign a service that stores places of interest worldwide (restaurants, hotels, parks, shops) and, given a user's location and a place type, returns the nearest ones within an…
Design a content delivery networkSystem designDesign a content delivery network (CDN) that serves content from servers close to users. Start by asking what content it serves, where users are, how often content changes, and…
Design a low-latency product price update APISystem designDesign an API and serving system for product prices. Each product's price changes at most once every 24 hours, but a product launch page must read prices for many products at…
Last asked Apr 2026
Deduplicate concurrent downloads of the same URLCodingWrite a thread-safe downloader that many threads call with URLs at once. Downloads of different URLs run independently and in parallel. When several threads ask for the same URL…
Last asked Apr 2026
Autocomplete data fetching with debounce, retry and cachingCodingThe UI of an autocomplete input is already built. Write only the data-fetching logic behind it: given the current query, fetch suggestions with debouncing, so that the latest…
Last asked Apr 2026
Design a read-heavy service for org chart subordinate countsSystem designYou are given manager-to-direct-report relationships for a company: each employee has at most one manager, and the top employee has none. Build a service that answers "how many…
Last asked Feb 2026
Design a multi-provider financial dashboardSystem designDesign a dashboard that shows each user their finances in one place: bank balances, stock holdings, cryptocurrency, and totals derived from them. The data comes from several…
Last asked Feb 2026
LRU cache where each item counts by its quantityCodingImplement a variant of the LRU cache in which capacity limits the total quantity of the stored items, not their number. Each item carries a positive integer quantity; an item of…
Last asked Feb 2026
Feature flags across channels with inheritanceCodingBuild a feature flag store organized by channels. Each channel has an id, its own map of flag names to true or false, and zero or more parent channels. Looking up a flag on a…
Last asked Jan 2026
LFU cache, then distribute itCodingImplement a cache with a least-frequently-used eviction policy, then extend the idea to a stream of keys too large for one machine. Unless you agree on a different interface with…
Last asked Nov 2025
Happy number: the check, then serving it at scaleCodingA phone screen that starts with a small coding problem and turns it into a service. First write the check; then the interviewer asks how you would answer it for a stream of…
Last asked Oct 2025
Serve inventory from disk when it doesn't fit in memorySystem designDesign the software for an inventory server that has spinning disks, no SSD and only a little RAM. Records are keyed by item ID and hold the available quantity, the reserved…
Last asked Oct 2025
Design a flight search serviceSystem designDesign a flight search service. Users enter an origin, a destination and dates (one-way or round trip) and see available flights with prices, which they can sort and filter. The…
Last asked Oct 2025
Design a cache for query views that depend on each otherSystem designAn analytics system keeps materialized query views, and each view is defined on base tables and on other views, so the views form a DAG. Design a caching strategy that cuts query…
Last asked Sep 2025
Design reliable sign-in on top of a flaky token providerSystem designClients must get a token from a third-party authorization service before they call your main API. That provider is unreliable: requests fail intermittently, time out, and…
Last asked Sep 2025
Sum tree with node values computed from childrenCodingYou get a rooted tree. Each leaf holds an integer. Every internal node's value is the sum of its children's values, so it equals the sum of the leaves below it. Answer value…
Last asked Sep 2025
Concurrent caching client for byte-range file readsSystem designDesign a high-throughput client-side cache that serves ranged reads of files from a remote storage service. The remote API can fetch a byte range by file name, offset and length…
Last asked Aug 2025
LFU cache with constant-time get and putCodingImplement a least-frequently-used (LFU) cache with get and put in O(1) average time. When the cache is full, evict the key used least often; among ties, evict the least recently…
Last asked Jul 2025
Design search result highlightingSystem designA search service already returns, for each query, a ranked list of document IDs the user may see and the query terms each one matched. Design the step that adds a short snippet to…
Last asked Jan 2021
Design a job service: submit, run, check status, fetch resultsSystem designDesign a service that accepts jobs from users, runs them on a pool of workers, and lets users check each job's status and fetch its result. The round is interviewer-led: the…
Read-through and write-through cache adapterCodingCallers read and write records in a slow backing store. Put a cache in front of it with the same interface. On a read, return the cached value if there is one; on a miss, read…