Proxies 101 - What is a Reverse Proxy?
upstart writes:
What Is a Reverse Proxy, and How Does It Work?:
A regular proxy, called a Forward Proxy, is a server through which a user's connection is routed through. In many ways, it's like a simple VPN, which sits in front of your internet connection. VPNs are a common example of these, but they also include things like school firewalls, which may block access to certain content.
A reverse proxy works a little differently. It's a backend tool used by system administrators. Instead of connecting directly to a website serving content, a reverse proxy like NGINX can sit in the middle. When it receives a request from a user, it will send forward, or "proxy," that request to the final server. This server is called the "origin server" since it's what will actually be responding to requests.
While a user will probably know if they're being routed through a forward proxy like a VPN or firewall, reverse proxies are backend tools. As far as the user knows, they're just connecting to a website. Everything behind the reverse proxy is hidden, and this has numerous benefits as well.
This effect also happens in reverse though. The origin server does not have a direct connection to the user and will only see a bunch of requests coming from the reverse proxy's IP. This can be a problem, but most proxy services like NGINX will add headers like X-Forwarded-For to the request. These headers will inform the origin server of the client's actual IP address.
Reverse proxies are pretty simple in concept but prove to be a surprisingly useful tool with many unexpected use cases. One of the main benefits of a reverse proxy is how lightweight they can be. Since they just forward requests, they don't have to do a ton of processing, especially in situations where a database needs to be queried.
[...] Since a reverse proxy is often much faster at responding than the origin server, a technique called caching is commonly used to speed up requests on common routes. Caching is when the page data is stored on the reverse proxy, and only requested from the origin server once every few seconds/minutes. This reduces the strain on the origin server dramatically.
I have been specifically asked to include topics for discussion that are suitable for those earlier on in their studies or careers. More experienced community members can expand the topic further if they so wish. [JR]
Read more of this story at SoylentNews.