System Design Interview Fundamentals Interview Questions
261 multiple-choice tech interview questions on System Design Interview Fundamentals: requirements and estimates, high-level design, data and APIs, scaling bottlenecks, classic designs such as URL shorteners, feeds and rate limiters. Written for technical phone screens and interview prep, organized by subtopic, with a short explanation for every answer. Learn the 50 key terms with the flashcards first, then test yourself.
Take the practice test · Flashcards · All study tools
What it covers
- 1.1 Interview approach and requirements
- 1.2 Estimation and capacity math
- 1.3 Core building blocks
- 1.4 Data modeling, storage and APIs
- 1.5 Rate limiters and unique ID generators
- 1.6 URL shortener, pastebin and key-value store
- 1.7 News feed, chat and notification systems
- 1.8 Search, typeahead and web crawler
- 1.9 Video, file sync, location and payment systems
Key terms
1.1 Interview approach and requirements
- Functional requirement
- What the system must do, such as letting users post
- Non-functional requirement
- How well it must work: latency, availability, durability, security
- p99 latency
- The response time that 99% of requests beat
1.2 Estimation and capacity math
- Back-of-the-envelope estimate
- A quick order-of-magnitude calculation to guide design
- QPS
- Queries per second, a basic throughput measure
1.3 Core building blocks
- Stateless service
- A service keeping no client session state, so any instance can serve any request
- Rate limiter
- Component capping requests per client per time window
- Single point of failure
- A component whose failure takes down the system
1.5 Rate limiters and unique ID generators
- Fan-out on write
- Pushing new content into followers' feeds when it is created
- Token bucket
- Rate limiting algorithm allowing bursts up to the bucket size
1.9 Video, file sync, location and payment systems
- Read-to-write ratio
- How many reads happen per write
- Pre-signed URL
- A temporary link for direct upload or download
- Soft delete
- Marking rows deleted instead of removing them
- 429 Too Many Requests
- The HTTP status for rate-limited calls
- Base62
- Encoding with digits and upper and lower letters
- Fan-out on read
- Building a feed when the user asks
- Presence
- Whether a user is online now
- Inverted index
- Maps terms to the documents containing them
- URL frontier
- The crawler's queue of URLs to fetch
- Politeness
- Limiting crawl rate per host
- SimHash
- A fingerprint for near-duplicate detection
- Transcoding
- Converting media to other formats and bitrates
- Geohash
- A string encoding a map grid cell
- Quadtree
- A tree splitting space into four cells
- H3
- A hexagonal geospatial index
- Double-entry ledger
- Recording each debit with a matching credit
- Virtual waiting room
- A queue that admits users in batches
- Optimistic locking
- Detecting conflicts with version checks
- Celebrity problem
- A user whose posts overload fan-out on write
- Feed hydration
- Filling feed post IDs with full post details
- Presence service
- Tracks which users are online now
- Read receipt
- An ack showing a message was read
- Device token
- An app install's address for push delivery
- Typeahead
- Suggesting completions as a user types
- Debouncing
- Waiting for a pause in typing before sending a request
- Crawl politeness
- Limiting crawl rate per host
- Spider trap
- URLs that generate endless pages for a crawler
- Recrawl policy
- Rules for how often to refetch pages
- Rendition
- One encoded version of a video at a set quality
- Manifest file
- A playlist listing video renditions and segments
- Block-level sync
- Syncing only changed chunks of a file
- Conflicted copy
- A second file kept when edits clash
- Proximity service
- Finds places near a location
- Geospatial index
- An index for queries by location
- Driver matching
- Assigning a nearby driver to a ride request
- Seat hold
- A short reservation during checkout
- Custom alias
- A user-chosen short link code
- Burn after reading
- A paste deleted after its first view
- Key generation service
- Hands out unused short codes in advance
- Order of magnitude
- A power-of-ten estimate
Sample practice questions
What should you do first in a system design interview?
- Start drawing databases and servers on the whiteboard right away
- Pick the programming language and framework the system will use
- Clarify requirements and scope: users, scale, latency, consistency
- Write out the code for the system's main endpoint in full
Answer: C. Clarify requirements and scope: users, scale, latency, consistency Asking good questions shows judgment and prevents designing the wrong system.
A service has 100 million daily active users, each making 10 reads a day. Roughly how many reads per second is that on average?
- About 12,000
- About 1,200
- About 120,000
- About 1.2 million
Answer: A. About 12,000 1 billion reads ÷ 86,400 seconds ≈ 11,600 per second. Peak is often 2 to 3 times the average.
What is the main role of a load balancer in a scalable web design?
- Storing every user's session permanently so servers don't have to
- Replacing the database by caching every query result at the edge
- Spreading requests across stateless servers and skipping unhealthy ones
- Encrypting all of the application's data at rest on its disks
Answer: C. Spreading requests across stateless servers and skipping unhealthy ones Stateless app servers behind a load balancer are the basic scale-out pattern.
Which database choice fits a system needing strong consistency and complex queries on moderate data volume?
- A write-optimized wide-column store with eventual consistency
- An in-memory cache used as the system of record for all data
- A relational database like PostgreSQL, maybe with replicas
- Plain files on a single server, read and parsed on each request
Answer: C. A relational database like PostgreSQL, maybe with replicas Start with the simplest store that meets the requirements; shard or specialize when needed.
What is a rate limiter's purpose?
- Capping each client's requests per time window to prevent abuse
- Speeding up slow requests by giving them a higher priority
- Limiting how many servers are allowed to run at the same time
- Reducing the size of the database by removing old records
Answer: A. Capping each client's requests per time window to prevent abuse Clients that exceed the limit typically get HTTP 429 Too Many Requests.
In a URL shortener, how can you generate short unique codes efficiently?
- Base62-encode a unique numeric ID, or hash with collision checks
- Use the full original URL itself as the short code for each link
- Generate random two-character codes and hope they don't collide
- Ask each user to choose every short code manually when they create it
Answer: A. Base62-encode a unique numeric ID, or hash with collision checks Seven base62 characters give 62⁷ ≈ 3.5 trillion codes.
In a news feed design, what is "fan-out on write"?
- Building each reader's feed at read time from everyone they follow
- Writing every new post to every database shard in the cluster
- Pushing each new post into every follower's precomputed feed
- Emailing each new post to all of the author's followers
Answer: C. Pushing each new post into every follower's precomputed feed Fan-out on write struggles with celebrities with millions of followers; hybrid designs pull their posts at read time.
In a "design a web crawler" question, what prevents crawling the same page repeatedly?
- A URL frontier with dedup, like a Bloom filter, plus per-host politeness
- Crawling only a single page per day so repeats are very unlikely
- Ignoring robots.txt so that every page can be fetched exactly once
- Restarting the crawler from scratch every hour with an empty queue
Answer: A. A URL frontier with dedup, like a Bloom filter, plus per-host politeness Content fingerprints also catch duplicate pages at different URLs.
Why do video platforms transcode uploads into several renditions?
- To serve each device and bandwidth well
- To hide the video from search
- Because players accept only one format
- To make the original file larger
Answer: A. To serve each device and bandwidth well Multiple resolutions and bitrates.
Which is a non-functional requirement?
- p99 reads must complete in under 200 ms
- Users can post a photo with a caption
- Users can follow and unfollow other users
- Admins can delete any user's comments
Answer: A. p99 reads must complete in under 200 ms Non-functional requirements describe qualities such as performance, availability, durability and security.
More Architecture
- Monoliths vs Microservices
- Event-Driven Architecture
- Scalability: Horizontal and Vertical Scaling, Sharding and Partitioning
- CAP Theorem and Distributed Consistency
- High Availability and Fault Tolerance
- API Gateways and Service Meshes
- Domain-Driven Design
- Clean and Hexagonal Architecture
- Security Architecture: Zero Trust and OWASP Top 10
- AI and LLM Integration: RAG, Prompts and APIs