Interview Q&A / System Design

INTERVIEW Q&A · 70 QUESTIONS

System Design interview questions

Caching, scaling, databases and classic design problems for beginners.

  1. How do health checks work in a load balancer?

    The load balancer probes each server regularly, for example an HTTP request to /health. After several failures it stops sending traffic to that server, and after several successes it adds it back.

    BeginnerQuick answer1 min read
  2. What are sticky sessions and why do many teams avoid them?

    Sticky sessions make the load balancer send a user to the same server every time, usually via a cookie. They avoid shared session storage but cause uneven load and lose the session if that server dies.

    BeginnerQuick answer1 min read
  3. What are the common load balancing algorithms?

    Round robin hands requests out in turn, weighted round robin favours stronger servers, least connections picks the least busy server, and IP hash sends the same client to the same server.

    BeginnerQuick answer1 min read
  4. Can you give a simple example of when Layer 7 load balancing is necessary?

    Layer 7 is needed when routing depends on request content, such as the URL path, headers or cookies. For example, sending /api traffic to API servers and /images traffic to a media cluster.

    IntermediateQuick answer1 min read
  5. How does DNS-based global load balancing route users to the nearest data centre?

    The DNS service answers with a different IP depending on where the user is, which server is healthy, or latency measurements. Users in Mumbai get the Mumbai address, users in London get London's.

    IntermediateQuick answer1 min read