Proxies, whom am I talking to?
There are two types of proxies, forward and reverse.
Forwards proxies make requests on behalf of the client. The client knows the server it wants to reach, but the server does not know the client.
Use cases for a forward proxy:
- Caching
- Anonymity (VPN)
- Logging (sidecar containers, service mesh e.g. Linkerd)
Reverse proxies sit in front of one or more servers and acts as a gateway. As opposed to a forward proxy, in a reverse proxy, the client does not know the true, final destination of the server.
Use cases for a reverse proxy:
- API gateway
- Load balancing
- CDN
When clients make requests to a proxy, a TCP connection will be established with the proxy, and the proxy will use a different TCP connection to connect to the upstream service.