SD Core

Forward & Reverse Proxy

Forward proxy acts for clients (hide identity, filter). Reverse proxy acts for servers (LB, TLS, cache, WAF).

Interview tip Lead with a 30-second definition, then one real system example and name 2–3 designs where Forward & Reverse Proxy is non-negotiable.

① What it is (30 seconds)

Forward proxy acts for clients (hide identity, filter). Reverse proxy acts for servers (LB, TLS, cache, WAF).

② How it works in system design

Forward: corporate proxy, VPN. Reverse: client thinks it talks to one server; nginx/ALB routes to fleet. Reverse proxy enables SSL, compression, rate limit at edge.
Typical placement
ClientEdge / GatewayForwardServicesData stores

③ Concrete system design example

Scenario: All traffic to api.example.com hits nginx reverse proxy → routes /payments to payment cluster, /search to search cluster, blocks admin paths.

④ Important interview Q&A

QuestionAnswer
Reverse proxy vs API gateway?Gateway adds auth, composition, developer portal; reverse proxy more transport-focused — often layered together.
Forward proxy use?Outbound filtering, geo bypass, developer debugging (Charles).
CDN is reverse proxy?Yes — edge reverse proxy caching static and cacheable responses.

⑤ Seen in these system designs

In interviews, after explaining the concept, say: "This shows up directly in …" and link two designs.

⑥ Revision checklist

  • Forward vs reverse defined
  • SSL termination
  • Path-based routing
  • CDN relationship
proxynginxedge