System Design Fundamentals
Core concepts every engineer needs: scalability, CAP theorem, load balancing, caching, and database fundamentals.
Questions in this quiz
10 questions on System Design Fundamentals. Work through them here, then start the quiz to answer them and see your score.
1.What is the difference between horizontal scaling and vertical scaling?
- AHorizontal: scale the database; Vertical: scale the application tier
- BHorizontal: add more machines; Vertical: add more resources (CPU/RAM) to existing machines
- CThey are the same — just different terms used in different companies
- DHorizontal: add more CPU; Vertical: add more servers
2.The CAP theorem states that a distributed system can only guarantee two of three properties. What are they?
- ACaching, Availability, Performance
- BConsistency, Atomicity, Persistence
- CConcurrency, Atomicity, Persistence
- DConsistency, Availability, Partition tolerance
3.What is consistent hashing and why is it used?
- AA method of replicating data consistently across all nodes
- BA hash algorithm that always produces the same output for the same input
- CA distributed lock that ensures consistent writes
- DA ring-based hash function that minimises data reshuffling when nodes are added or removed
4.What is a read replica and what problem does it solve?
- AA backup that automatically promotes to primary on failure
- BA copy of the primary database that serves read traffic to reduce primary load
- CA secondary index stored in a separate table
- DA cache layer in front of the database
5.What is a CDN (Content Delivery Network) and what does it optimise?
- AA globally distributed network of edge servers that cache and serve static content close to users
- BA dedicated network between microservices to reduce inter-service latency
- CA DNS load balancer that routes users to the nearest region
- DA database replication network that spans multiple regions
6.What is the purpose of a message queue (e.g. Kafka, RabbitMQ)?
- ADecouple producers from consumers, enable async processing, and absorb traffic spikes
- BStore application state that must survive server restarts
- CCache frequently accessed database queries
- DLoad balance HTTP requests between services
7.What is database sharding?
- AReplicating a database across multiple data centres
- BCreating indexes on multiple columns simultaneously
- CCompressing database tables to save disk space
- DSplitting a large database table into smaller partitions stored on different servers
8.What is a load balancer and what algorithms does it use to distribute traffic?
- ADistributes requests across servers using algorithms like round-robin, least connections, and consistent hashing
- BEncrypts traffic between client and server
- CCaches responses to reduce origin server load
- DCompresses HTTP responses to reduce bandwidth
9.What is the difference between SQL and NoSQL databases?
- ASQL: relational, ACID, fixed schema; NoSQL: various data models, flexible schema, often eventual consistency
- BSQL is for small datasets; NoSQL is for big data only
- CSQL can only do reads; NoSQL handles both reads and writes
- DSQL is newer and faster; NoSQL is legacy technology
10.What is back-pressure in a distributed system?
- AA mechanism where a consumer signals a producer to slow down when it cannot keep up
- BThe latency introduced when requests travel back from server to client
- CA caching strategy where stale data is served while fresh data is fetched
- DA retry mechanism that exponentially increases wait time between retries