System Design MCQs - Scalability Basics: Load Balancing, Caching and CDNs (Set 1)

System Design MCQs - Scalability Basics: Load Balancing, Caching and CDNs (Set 1) - CodingHumans

Most system design interviews begin with the same building blocks: how to scale a service, how to share traffic across servers, and how to make reads fast with caches and CDNs. This first set covers those basics, plus the latency numbers and quick estimates interviewers expect you to work out on a whiteboard.

How to practise: read each question and tap the option you think is correct. You will see right away whether you got it, along with a short explanation, and your score is tracked at the bottom of the screen. This set has 15 questions.

System Design MCQ series: | Interview Preparation Hub

Topics covered in this set

  • Vertical vs horizontal scaling
  • Load balancer algorithms, L4 vs L7 and health checks
  • Stateless services and sticky sessions
  • Cache-aside, write-through and write-back
  • LRU eviction, TTLs and cache stampedes
  • CDNs, latency numbers and back-of-envelope estimates

System Design MCQs with answers and explanations

Q1. Which statement best describes horizontal scaling?

a) Adding more CPU and RAM to the existing server

b) Adding more machines and spreading the load across them

c) Moving the database to a faster disk

d) Rewriting the service in a faster language

Q2. A chat service keeps long-lived WebSocket connections, and some servers end up with far more open connections than others. Which load balancing algorithm handles this best?

a) Static DNS with a single A record

b) Random selection

c) Round robin

d) Least connections

Q3. A load balancer must send /api/* requests to one server group and /images/* to another. What kind of load balancer is needed?

a) A DNS round-robin setup

b) A Layer 4 load balancer that looks only at IP and TCP port

c) A Layer 7 load balancer that can read HTTP paths and headers

d) A hardware firewall

Q4. Why are stateless application servers easier to scale horizontally?

a) Any instance can handle any request because session data lives in a shared store such as Redis or in a token

b) They do not need a database

c) They use less memory

d) They never crash

Q5. What is a main drawback of sticky sessions (session affinity) on a load balancer?

a) They make HTTPS impossible

b) They disable health checks

c) Load can become uneven, and users lose their session if their server goes down

d) They require a CDN

Q6. In the cache-aside (lazy loading) pattern, what happens on a cache miss?

a) The application reads from the database, writes the result into the cache and returns it

b) The database pushes all rows into the cache

c) The request fails and the client retries

d) The cache itself fetches the data from the database

Q7. What is the main risk of a write-back (write-behind) cache compared with write-through?

a) It cannot be used with SQL databases

b) Data written to the cache can be lost if the cache fails before it is flushed to the database

c) Writes become slower

d) Reads always miss

Q8. An LRU cache with capacity 3 receives accesses in the order A, B, C, A, D. Which key is evicted when D is inserted?

a) B

b) C

c) A

d) D

Q9. A popular cache key expires and thousands of requests miss at the same moment and all hit the database. What is this called, and what is a common fix?

a) Cold start; restart the cache server

b) Write amplification; add more replicas

c) Cache warming; disable the cache

d) Cache stampede; let one request rebuild the value while others wait or use a slightly stale copy

Q10. What is the main purpose of a CDN?

a) To serve content from edge servers close to users, reducing latency and load on the origin

b) To replace the application database

c) To encrypt data at rest

d) To run background jobs

Q11. Which list is ordered from fastest to slowest typical latency?

a) L1 cache read, RAM read, SSD random read, cross-continent round trip

b) Cross-continent round trip, SSD random read, RAM read, L1 cache read

c) SSD random read, RAM read, L1 cache read, cross-continent round trip

d) RAM read, L1 cache read, cross-continent round trip, SSD random read

Q12. A service receives 100 million requests per day. What is its average load in requests per second?

a) About 116

b) About 11,600

c) About 1,160

d) About 100,000

Q13. A cache has a 90% hit rate. A hit takes 1 ms and a miss (cache check plus database) takes 50 ms. What is the average response time?

a) About 1 ms

b) About 25.5 ms

c) About 5.9 ms

d) About 45.1 ms

Q14. A service promises 99.9% availability. About how much downtime does that allow in a year?

a) About 52.6 minutes

b) About 3.65 days

c) About 5.26 minutes

d) About 8.76 hours

Q15. Why does a load balancer run health checks on its backend servers?

a) To compress responses

b) To stop sending traffic to instances that are down or unhealthy until they recover

c) To decide which server holds the session

d) To measure user satisfaction

Quick revision notes

  • Scale up = bigger machine; scale out = more machines behind a load balancer.
  • L4 routes on IP and port; L7 reads HTTP and can route by path, host or header.
  • Keep app servers stateless; put sessions in Redis or a token.
  • Cache-aside: the app fills the cache on a miss. Write-through is safe. Write-back is fast but can lose data.
  • 100M requests/day ≈ 1,160 per second; 99.9% uptime ≈ 8.76 hours of downtime per year.

Frequently asked questions

How should I start a system design interview answer?

First ask about requirements and scale. Estimate traffic and storage, and sketch a simple design. Then grow it with load balancers, caches, replicas and queues, and talk through the trade-offs as you go.

Should I cache everything?

No. Cache data that is read often and changes rarely. Every cache brings the risk of old data, so decide how each key gets cleared or how long it lives.

Do I need to memorise exact latency numbers?

No. Just know the rough scale: memory is much faster than disk, and disk is much faster than a network call across regions. That is enough for estimates.

Comments

Answered 0/0Correct 0