Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In computing, a proxy is typically a server, and it is a server that acts as a middleman between a client and another server. It literally is a bit of code that sits between client and server. That's the crux of proxies.

If there is a middleman server that receive requests , then sent them to another service, then forwards the response it got from that other service back to the originator client, it would be a PROXY SERVER.

So when a client sends a request to a server via the proxy, the proxy may sometimes mask the identity of the client - to the server, the IP address that comes through in the request may be the proxy and not the originating client.

Forward Proxy versus Reverse Proxy

A forward proxy is one where the proxy acts on behalf of (substitute for) the client in the interaction between client and server.

A reverse proxy is designed substitute for the server.  Often clients won't even know that the network request got routed through a proxy and the proxy passed it on to the intended server (and did the same thing with the server's response).

Forward Proxy

Here’s an example of proxy communication involving 3 computers :

  • A - This is a user’s device

  • B - This a forward proxy server

  • C - This is a website’s origin server

...

In a standard Internet communication, computer A would reach out directly to computer C, with the client sending requests to the origin server and the origin server responding to the client. When a forward proxy is in place, A will instead send requests to B, which will then forward the request to C. C will then send a response to B, which will forward the response back to A.

Why use an extra middleware to the internet activity ?

  • To avoid state or institutional browsing restrictions : use firewalls to give users access to a limited version of the Internet, no direct connection to the site, but rather to the proxy server.

  • To block access to certain content : implement content filtering rules, etc.

  • To protect their identity online : use anonymity online, the IP address uses to post the comments to be harder to trace back.

Reverse Proxy

Here’s an example of proxy communication involving 3 computers :

  • D - This is a user’s device

  • E - This a reverse proxy server

  • F - This is a website’s origin server

...

Typically all requests from D would go directly to F, and F would send responses directly to D. With a reverse proxy, all requests from D will go directly to E, and E will send its requests to and receive responses from F. E will then pass along the appropriate responses to D.

We can outline some of the benefits of a reverse proxy:

  • Load Balancing : to handle the incoming site traffic…

  • Protection from attacks : with a reverse proxy, a site or service never needs to reveal the IP address of their origin server(s). Protection against DDoS attack.

  • Global Server Load Balancing : same as Azure Traffic Manager, distribution to the server that is geographically close to the user.

  • Caching : helps to cache content, resulting in faster performance.

  • SSL encryption : Encrypting and decrypting SSL (or TLS) communications for each client can be computationally expensive for an origin server. A reverse proxy can be configured to decrypt all incoming requests and encrypt all outgoing responses, freeing up valuable resources on the origin server.