Notes

Notes and References

View the Project on GitHub leabstrait/notes

“Proxy vs Reverse Proxy”

Proxy Server

Aspect Proxy Reverse Proxy
Definition Acts as an intermediary between client and server, forwarding client requests to the server and relaying server responses back to the client. Serves as an intermediary between clients and multiple backend servers, distributing client requests to the appropriate server and relaying server responses back to clients.
Use Cases 1. Access control and filtering.
2. Anonymity and privacy.
3. Caching and load balancing.
1. Load balancing for high availability.
2. SSL termination (handling encryption).
3. Security and protection for backend servers.
4. Caching and compression.
Technical Details - Clients connect to the proxy.
- Proxy forwards client requests to the server.
- Server responds to proxy.
- Proxy relays server response to the client.
- Clients connect to the reverse proxy.
- Reverse proxy decides which backend server to forward the request to.
- Backend server processes the request and sends the response to the reverse proxy.
- Reverse proxy sends the response back to the client.
Client Perception Clients are usually aware of the proxy’s existence and intentionally route their traffic through it. Clients are often unaware of the reverse proxy’s presence, as they connect to it directly, and the reverse proxy forwards their requests to backend servers.
Load Balancing Typically doesn’t involve load balancing across multiple servers. Primarily used for load balancing to distribute incoming requests across multiple backend servers.
SSL Handling May or may not handle SSL encryption/decryption. Often handles SSL termination (decrypting SSL traffic and forwarding it unencrypted to backend servers).
Security Can provide some security by filtering and blocking content. Provides security by shielding backend servers from direct exposure to the internet, preventing direct attacks on them.
Caching Can implement caching to store and serve frequently requested content. Can cache content to reduce server load and improve response times.
Examples - Web proxies.
- Content filtering proxies.
- Transparent proxies.
- Nginx.
- Apache HTTP Server (with mod_proxy).
- HAProxy.