DEV Community

Cover image for Forward proxy vs reverse proxy, explained for system design interviews
Gowtham Potureddi
Gowtham Potureddi

Posted on

Forward proxy vs reverse proxy, explained for system design interviews

Forward proxy vs reverse proxy, explained for system design interviews

Forward proxy vs reverse proxy is one of those distinctions that sounds like trivia until an interviewer makes you place the right box in a diagram — and then it decides whether your design reads as deliberate or hand-wavy. Both are intermediaries that sit between a client and a server and forward requests, so people blur them; the whole difference is which side they stand in for. A forward proxy sits in front of clients and acts on their behalf when they reach out to the internet. A reverse proxy sits in front of servers and acts on their behalf when clients reach in. Same wire, opposite allegiance — and that one sentence is the thing a strong answer leads with.

The reason it matters is that almost every real system design has a reverse proxy in it, usually drawn as the first box after the client, and interviewers want to know you understand what that box actually does — terminate TLS, spread load, cache, route, hide the backend — rather than treating it as decoration. The forward-proxy half is the control: naming it proves you know the reverse proxy is the one you meant, because you can say exactly who each one represents. This guide walks what a strong candidate says out loud: the one-line distinction, what each proxy hides, the reverse-proxy responsibilities that make it the workhorse of web architecture, the forward-proxy use cases, and why load balancer, reverse proxy and API gateway overlap without being redundant.

Title card for a system design interview explainer on forward proxy versus reverse proxy, showing a forward proxy standing in front of a group of clients reaching out to the internet and a reverse proxy standing in front of a group of backend servers receiving client requests, with the one-line distinction that a forward proxy acts for clients and a reverse proxy acts for servers, on a dark citrus-and-lavender background.

Why forward vs reverse proxy comes up in system design interviews

The proxy question rarely gets its own prompt. It shows up inside a larger design — "design a URL shortener," "design an image service," "design an API for a mobile app" — the moment you draw a box between the client and your servers and label it, or fail to. You say "requests hit my load balancer," and the follow-up probes whether you know what category of thing that is: is it a forward proxy or a reverse proxy, what else could live there, and what is it doing besides pointing arrows at servers. The topic is a favourite because "put a proxy in front" is the easy half, and explaining which proxy, why, and what it handles is where real architecture understanding shows.

The interviewer rarely lets "I'll add a proxy" stand on its own. "You've drawn a box between the clients and your three app servers and called it a proxy. Is that a forward proxy or a reverse proxy? Who is it hiding from whom — and what work is it doing on each request before it reaches a server?" That question — pinning down which side the proxy represents and what it actually does — is the one a memorised "proxies forward requests" answer can never survive.

The rounds on Zynter are modelled on how the loop runs, not scraped from any candidate's recall. What matters for prep is the shape: you name the proxy, and the next sentence asks who it stands in for, what it terminates, and how it differs from the load balancer and the API gateway sitting next to it.

What the interviewer is really testing

A proxy answer is read on the same four dimensions as any design decision. Problem solving — did you reach for a reverse proxy because you needed TLS termination, load balancing and a single public entry point, or just draw a box? Communication — can you say in one sentence that a forward proxy acts for clients and a reverse proxy acts for servers? Technical execution — do you know what a reverse proxy terminates, caches, routes and hides, and how it relates to a load balancer and an API gateway? Time management — did you place the proxy in a few words and move on, instead of narrating networking trivia? Reading this guide teaches the concept; it does not teach you to defend the box while someone asks "why isn't that just your load balancer?"

Forward proxy vs reverse proxy: the one-line distinction

Start with the distinction, because everything else hangs off it. Both proxies are intermediaries that receive a request and forward it on, but they stand on opposite ends of the connection and represent opposite parties:

  • A forward proxy sits in front of clients and acts on their behalf. The client is configured to send its outbound requests to the proxy, which forwards them to any server on the internet and relays the response back. The proxy represents the client side. To the destination server, the request appears to come from the proxy, so the client's identity and IP are hidden — the server never learns who the real requester was.
  • A reverse proxy sits in front of servers and acts on their behalf. Clients send their requests to the reverse proxy as if it were the server; the proxy forwards each one to one of the backend servers behind it and returns the response. The proxy represents the server side. To the client, there is only ever the proxy, so the backend servers' identities, addresses and count are hidden — the client never learns how many servers there are or where they live.

The test that resolves every case: who does the proxy represent? A forward proxy represents the clients reaching out and hides them from the internet; a reverse proxy represents the servers being reached and hides them from clients. The sentence that scores: a forward proxy is client-side — it stands in for the clients making outbound requests and hides who they are; a reverse proxy is server-side — it stands in for the backend and hides what's serving the request. Same box in a diagram, opposite side of the conversation.

A diagram contrasting a forward proxy with a reverse proxy by direction, showing on the left a forward proxy placed in front of several client machines inside an organisation, forwarding their outbound requests to the open internet so the destination servers only see the proxy and the clients are hidden, and on the right a reverse proxy placed in front of several backend servers, receiving requests from clients on the internet and forwarding them inward so the clients only see the proxy and the backend topology is hidden, with a label that a forward proxy acts for clients and a reverse proxy acts for servers.

What a reverse proxy does: TLS, load balancing, caching, routing, security

The reverse proxy is the one you will actually draw in almost every design, so you have to know what it earns its place for. It is a single public entry point in front of a fleet of backends, and it takes on the cross-cutting work you do not want to duplicate in every service:

  • TLS termination. It decrypts incoming HTTPS at the edge and talks plain HTTP (or re-encrypts) to the backends, so certificate management and the crypto cost live in one place instead of every app server.
  • Load balancing. It spreads incoming requests across identical backend instances, so this is where a load balancer actually is a reverse proxy — more on that below.
  • Caching. It can serve cached responses for repeated requests without touching the backend at all, cutting latency and backend load.
  • Compression and offload. It can gzip or brotli-compress responses and handle other per-request work (header rewriting, buffering slow clients) so backends stay lean.
  • Request routing / API gateway. It inspects the path or host and routes to the right service — /search to one service, /orders to another — which is the seed of an API gateway.
  • Hiding backend topology. Clients only ever see one address, so you can add, remove or move backends without clients noticing, and attackers cannot address your app servers directly.
  • Security and WAF. It is the natural place for a web application firewall, rate limiting and DDoS absorption, because all traffic funnels through it before reaching anything that matters.

The sentence that scores: a reverse proxy is the one box in front of the backend that terminates TLS, balances load, caches, compresses, routes by path, hides the servers, and enforces security — it's where you consolidate everything that shouldn't be reimplemented in each service. Naming three or four of those unprompted is what signals you have actually operated one, not just read the label.

A diagram of a reverse proxy's responsibilities, showing a single reverse-proxy box sitting between clients on the internet and a row of backend application servers, with labelled responsibilities attached to the proxy — TLS termination decrypting HTTPS at the edge, load balancing across the backends, caching repeated responses, compression, request routing by path to different services, hiding the backend topology, and a security and WAF layer filtering and rate-limiting traffic — illustrating that the reverse proxy consolidates cross-cutting work in front of the servers.

System Design
HLD · Core concept
Name a reverse proxy's responsibilities out loud

Practise on Zynter →

What a forward proxy is for: egress control, filtering, anonymity

The forward proxy almost never appears in a product design, but you should be able to say what it is for, because that is how you prove you know the reverse proxy is the one you meant. A forward proxy sits at the boundary where clients leave a network, so its uses are all about controlling and concealing outbound traffic:

  • Corporate egress control. An organisation routes all outbound traffic through one forward proxy so it can authenticate users, enforce policy, and log every external request from a single chokepoint — the standard "all office traffic goes through the proxy" setup.
  • Content filtering. Because every outbound request passes through it, the proxy can block categories of sites or specific destinations — the mechanism behind school, workplace and parental-control filters.
  • Caching outbound requests. A shared forward-proxy cache serves commonly fetched external resources once instead of once per user, saving bandwidth across the whole network.
  • Anonymity and privacy. By making requests on the client's behalf, the proxy hides the client's real IP and location from destination servers — the same role a VPN plays for an individual user.

The sentence that scores: a forward proxy lives on the client's side of the boundary, so it's used to control, filter, cache and anonymise outbound traffic — corporate egress gateways, content filters, shared caches and VPN-style privacy — it represents the people making requests, not the servers answering them. Knowing that forward proxies are a client-network tool, not a service tool, is the judgment that keeps you from mislabeling the box in your design.

A diagram of common forward-proxy use cases, showing a forward proxy at the edge of a corporate network with several employee client machines routing their outbound requests through it before reaching the internet, with labelled roles — egress control and policy enforcement at a single chokepoint, content filtering that blocks disallowed destinations, a shared outbound cache serving commonly fetched resources, and anonymity that hides the clients' real IP addresses from external servers — illustrating that a forward proxy controls and conceals traffic leaving the client network.

System Design
HLD · Core concept
Explain a forward proxy's use cases out loud

Practise on Zynter →

Load balancer, reverse proxy and API gateway: why they overlap

The follow-up that trips people up is why your diagram seems to have three boxes doing the same thing. The resolution is that they are not three unrelated things — they sit on a spectrum, with the reverse proxy as the umbrella:

  • Reverse proxy is the general category: anything that sits in front of servers and forwards requests on their behalf, handling TLS, caching and routing.
  • Load balancer is a reverse proxy specialised for spreading load across a pool of identical backend instances, with health checks and a balancing algorithm. Every load balancer is a reverse proxy; not every reverse proxy is primarily balancing load.
  • API gateway is a reverse proxy specialised for API concerns — routing to the right microservice, authentication, rate limiting, request/response transformation, and aggregating calls — sitting in front of many distinct services rather than copies of one.

A load balancer, a reverse proxy, an API gateway — a client's request can pass through all three. Which is which, and why isn't that redundant?

The answer is that each solves a different concern even though the shape is identical: the load balancer distributes load across copies of a service, the API gateway handles API-level cross-cutting concerns across different services, and "reverse proxy" is the generic forwarding/TLS/caching layer underneath both. A request can legitimately hit a load balancer, which forwards to an API gateway, which routes to a service — three boxes, three jobs, one family. The sentence that scores: they overlap because they're all reverse proxies; a load balancer is one tuned for spreading load across identical backends, an API gateway is one tuned for routing and auth across different services, and calling them redundant misses that each owns a distinct concern.

How to talk about forward vs reverse proxy in an interview

The probes from every section rhyme. Master these five and you can place and defend a proxy in any design, not just this checklist.

  • "Is that a forward proxy or a reverse proxy?" → A reverse proxy — it sits in front of my servers and acts on their behalf; a forward proxy would sit in front of clients and act on theirs. (communication)
  • "What is that reverse proxy actually doing?" → Terminating TLS, balancing load across backends, caching, routing by path, and hiding the backend topology behind one entry point. (technical execution)
  • "Who does each proxy hide?" → A forward proxy hides the clients from the servers they reach; a reverse proxy hides the backend servers from the clients reaching them. (problem solving)
  • "Isn't that just your load balancer?" → A load balancer is a reverse proxy specialised for spreading load; the reverse proxy is the umbrella, and it also does TLS, caching and routing. (technical execution)
  • "Where would a forward proxy ever go?" → On the client side of a network boundary — corporate egress control, content filtering, shared outbound caching, or VPN-style anonymity — not in front of a product's servers. (problem solving)

Each maps to a debrief dimension. Reading them teaches the answers; it does not teach you to deliver them while someone asks "why isn't that redundant?" mid-design — that only comes from saying them out loud.

How to prepare: a short plan

You do not need a new topic for every design. You need the proxy vocabulary automatic, so when you draw the first box after the client you can name it and defend it without breaking stride.

  • Day 1: Lock the one-line distinction — forward proxy acts for clients and hides them, reverse proxy acts for servers and hides them — until you can say which side each represents from memory.
  • Day 2: Drill the reverse-proxy responsibilities (TLS termination, load balancing, caching, compression, routing, hiding topology, security) and the forward-proxy use cases (egress control, filtering, caching, anonymity) until you can rattle off four of each.
  • Day 3: Place a reverse proxy inside a real design and defend the overlap — how it relates to the load balancer and the API gateway next to it. Then do it out loud, timed, with someone asking "isn't that just your load balancer?"

This explainer feeds the broader Top 25 system design interview questions — a reverse proxy sits at the front of nearly every one of them, so getting the concept automatic pays off across the whole list.

Frequently asked questions

What is the difference between a forward proxy and a reverse proxy?

The difference is which side of the connection the proxy represents. A forward proxy sits in front of clients and acts on their behalf: clients are configured to send their outbound requests through it, and it forwards them to servers on the internet, so the destination server sees the proxy rather than the real client — the client is hidden. A reverse proxy sits in front of servers and acts on their behalf: clients send requests to it as if it were the server, and it forwards them to one of the backend servers behind it, so the client only ever sees the proxy — the backend is hidden. Both are intermediaries that forward requests, but a forward proxy is a client-side tool that conceals who is making the request, while a reverse proxy is a server-side tool that conceals what is answering it.

What is a reverse proxy and what does it do?

A reverse proxy is a server that sits in front of one or more backend servers and forwards client requests to them, presenting a single entry point to the outside world. It does the cross-cutting work you do not want to duplicate in every service: it terminates TLS by decrypting incoming HTTPS at the edge, balances load by spreading requests across identical backend instances, caches responses so repeated requests never reach the backend, compresses responses, and routes requests to the right service based on the path or host. It also hides the backend topology — clients only ever see the proxy, so you can add, remove or relocate servers freely, and attackers cannot address your app servers directly — and it is the natural home for a web application firewall, rate limiting and DDoS protection. It is the box you draw at the front of almost every system design.

Is a load balancer a forward proxy or a reverse proxy?

A load balancer is a reverse proxy. It sits in front of servers and forwards client requests to them on the servers' behalf, which is exactly the reverse-proxy role; a forward proxy, by contrast, sits in front of clients and acts for them. More precisely, a load balancer is a reverse proxy specialised for one job — spreading incoming requests across a pool of identical backend instances using health checks and a balancing algorithm. So every load balancer is a reverse proxy, but not every reverse proxy is primarily a load balancer: a reverse proxy might instead be there mainly to terminate TLS, cache, or route to different services. This is why the two terms overlap, and why saying "load balancer" and "reverse proxy" in the same design is not redundant.

How does a reverse proxy differ from an API gateway?

Both are reverse proxies, so they share the shape of sitting in front of servers and forwarding requests, but an API gateway is specialised for API concerns. A plain reverse proxy mostly handles generic forwarding work — TLS termination, caching, compression, load balancing, basic path routing — often in front of copies of one service. An API gateway adds the cross-cutting concerns of a microservices API: routing to many different services, authentication and authorisation, rate limiting per client, request and response transformation, and sometimes aggregating several backend calls into one response. In practice a request might pass through a load balancer, then an API gateway, then reach a service, and that is not redundant because each box owns a distinct concern — distributing load, handling API-level policy, and running the business logic.

How do I practise a system design interview out loud?

Reading about forward and reverse proxies is not the same as defending the box in your diagram while an interviewer asks "isn't that just your load balancer?" On Zynter, the HLD track runs live voice rounds modelled on how real system design loops run — you talk through a design on a shared canvas, place your proxy, and a voice interviewer follows up one question at a time ("forward or reverse?", "what is it terminating?", "why isn't that redundant with the API gateway?"), then gives you a debrief on problem solving, communication, technical execution and time management. The score is a practice signal, not a hiring decision.

Practise it on Zynter

You can say "I'll add a reverse proxy." The round is won on what it does and why it isn't your load balancer.

Pick an HLD system design round, draw your reverse proxy at the front of the design, and defend it out loud to a voice interviewer that keeps asking "forward or reverse?", "what's it terminating?" and "why isn't that just your load balancer?" — then read the debrief. Zynter.ai is on-demand mock interviews modelled on real company loops, with 150+ rounds across 20 companies including the HLD system design track (Sep 2026).

Practise an HLD system design round →
Browse all interview tracks

Top comments (0)