NETWORKING / A CONCEPT NOTE
Reverse Proxy
the middleman in front of your app
Overview · mechanism
pitfall · examples
01 / THE SHORT VERSION
The idea in a few sentences.
A server (like Nginx, HAProxy, Caddy) placed in front of your applications. It receives client requests, handles SSL termination, compression, and routes traffic to internal backends.
02 / FOLLOW THE MECHANISM
How a reverse proxy flows
Client
sends a request to https://supraj.dev.
Proxy
terminates the TLS connection, checks headers and path.
Forwarding
proxy forwards the request over unencrypted HTTP (or internal TLS) to backend 10.0.1.5:3000.
Response
proxy buffers the backend response and streams it back to the client.
04 / COMMAND NOTES
Read the command, then the result.
Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.
test Nginx configuration syntax
nginx -tquery proxy locally
curl -I -H 'Host: supraj.dev' http://localhost05 / CHECK YOURSELF
Could you explain Reverse Proxy to a teammate?
Try it out loud in two sentences: what it is, and the one detail that changes the picture. If you stall, the gap is the part to reread.
Up next in NetworkingFirewallswho gets in, who gets out