Interview Q&A / System Design

INTERVIEW Q&A · 70 QUESTIONS

System Design interview questions

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

  1. What does a load balancer do, and what is the difference between L4 and L7 load balancing?

    A load balancer sits in front of a group of servers and spreads incoming requests across the healthy ones, so no single server is overloaded and failures are hidden from users. An L4 balancer routes by IP address and port without reading the request. An L7 balancer reads HTTP details such as path, host and headers and can route on them.

    BeginnerIn-depth4 min read
  2. What is the difference between a reverse proxy and a forward proxy?

    A forward proxy sits in front of clients and makes requests on their behalf, hiding the client. A reverse proxy sits in front of servers and receives requests for them, hiding the servers.

    BeginnerQuick answer1 min read
  3. 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
  4. How do polling, long polling, SSE and WebSockets differ for real-time updates?

    Polling asks repeatedly; long polling holds each request open until there is news; SSE streams server-to-client over one HTTP connection; WebSockets give a two-way channel. Choose by direction of data and scale.

    IntermediateQuick answer1 min read