About
An proxy is an application that re-route the network traffic server. It sits between the client and the origin server.
A proxy may reroute:
- http: (ie http request and http response)
This article is talking about the http rerouting.
Type
There is two kind of proxy but they are just the same application, they takes an HTTP request and process it. They can:
- forward (reroute),
- cache,
- authenticate,
- filter,
- secure
- ..
The proxy type is just an indicator for the direction of the request.
if the request is coming from | to | the proxy is called |
---|---|---|
the intranet (or private process) | internet | a forward proxy |
the internet | a private host (service) | a reverse proxy (Or gateway) |
Reverse
HTTP - Gateway (Reverse Proxy) - the proxy receive public network request. It is an intermediate between the client and a private network.
A load balancer is a reverse proxy that balance the traffic from an origin to different servers.
Forward
HTTP - Forward Proxy - the first job of a proxy server is to receive internal request and forward them as if it was the client. We say that it impersonates the original client.
It controls the internal request from the private network (intranet) to the public network (internet).
Software
Management
Cache
Proxy caches resource by reading only the following Cache-Control headers:
- max-age,
- s-maxage,
- and private
The others will not influence proxy caching.
Headers
See gateway headers