100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

What is a Proxy Server?

What is a proxy server — forward vs reverse proxy, caching, load balancing, and SSL termination explained with an Nginx example.

mediumQ14 of 224 in Computer Networks Est. time: 5 minsLast updated:
Open Code Lab

Expected Interview Answer

A proxy server is an intermediary that sits between a client and the destination server, forwarding requests and responses on the client’s behalf while optionally caching, filtering, logging, or masking the original requester’s identity.

A forward proxy sits in front of clients, forwarding their outbound requests to the internet — commonly used for content filtering, caching frequently requested resources, and hiding client IP addresses from destination servers. A reverse proxy sits in front of servers, receiving inbound requests from clients and forwarding them to the appropriate backend, which is used for load balancing, SSL termination, caching, and hiding backend server details from the public internet. Both types intercept and relay traffic, but the direction of who they protect and represent differs. Interviewers ask this to check whether you can distinguish forward proxies (protect/represent the client) from reverse proxies (protect/represent the server).

  • Caches responses to reduce repeated backend or origin load
  • Filters or logs traffic for security and policy enforcement
  • Masks client or server identity depending on proxy type
  • Enables load balancing and SSL termination (reverse proxy)

AI Mentor Explanation

A forward proxy is like a team manager who makes every media request on behalf of the players, so journalists never contact players directly and only ever see the manager’s name. A reverse proxy is like a stadium’s single press liaison who receives every incoming journalist request and decides which specific player or coach actually answers it, so outsiders never know who is really being contacted. One hides who is asking; the other hides who is actually answering.

Step-by-Step Explanation

  1. Step 1

    Client sends request

    The client directs its request to the proxy instead of the final destination directly.

  2. Step 2

    Proxy processes

    The proxy applies caching, filtering, logging, or load-balancing rules as configured.

  3. Step 3

    Proxy forwards

    The proxy relays the request to the actual destination server (forward) or correct backend (reverse).

  4. Step 4

    Response relayed back

    The proxy returns the response to the client, optionally caching it for future requests.

What Interviewer Expects

  • Clear distinction between forward proxy (client-side) and reverse proxy (server-side)
  • Understanding of common use cases: caching, filtering, load balancing, SSL termination
  • Awareness that a proxy masks identity of the party it represents
  • Ability to give real examples (corporate proxy, CDN, Nginx as reverse proxy)

Common Mistakes

  • Using "proxy" and "reverse proxy" interchangeably without distinguishing direction
  • Confusing a proxy with a VPN
  • Forgetting that reverse proxies enable load balancing and SSL termination
  • Not mentioning caching as a major proxy benefit

Best Answer (HR Friendly)

A proxy server sits in the middle of a request and forwards it on someone’s behalf. A forward proxy represents the client, hiding who is asking and often filtering or caching content, while a reverse proxy sits in front of servers, deciding which backend actually handles the request and hiding that backend from the outside world.

Code Example

Nginx as a reverse proxy
server {
    listen 80;
    server_name example.com;

    location / {
        proxy_pass http://127.0.0.1:5000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Follow-up Questions

  • How does a reverse proxy help with load balancing?
  • What is the difference between a proxy and a VPN?
  • How does SSL/TLS termination work at a reverse proxy?
  • How does a CDN act as a distributed reverse proxy?

MCQ Practice

1. Which type of proxy sits in front of backend servers to route incoming client requests?

A reverse proxy represents and protects backend servers, routing inbound client requests to them.

2. Which type of proxy is commonly used by a company to filter and log employee internet access?

A forward proxy sits in front of clients and is typically used for outbound filtering, logging, and caching.

3. What is a common reverse proxy responsibility besides routing requests?

Reverse proxies commonly terminate SSL/TLS and distribute load across backend servers.

Flash Cards

Forward proxy in one line?Sits in front of clients, forwarding and often masking their outbound requests.

Reverse proxy in one line?Sits in front of servers, routing inbound client requests to the right backend.

Name one reverse proxy tool.Nginx (or HAProxy, Envoy).

What does a reverse proxy commonly enable?Load balancing, SSL termination, and caching in front of backend servers.

1 / 4

Continue Learning