A proxy is a computer system or application that allows a client to connect indirectly to another network service through it.
Communication performed on behalf of another party as an intermediary between a server and a client is called a “proxy,” and the component that performs this intermediary function is called a proxy server.
Types of Proxies
Forward Proxy
In general, when people say proxy, they usually mean a forward proxy.
It is a method where a client does not request a server directly, but first sends the request through a proxy server.
To make it easier to understand, when a company intranet makes a request to a server on the Internet, it first calls a proxy server. This method is called a forward proxy.
It hides who the client is from the server.
Because the IP address received by the server is the IP address of the forward proxy server, the server cannot know who the client is.
In the diagram below, if the proxy server is called first, it is a forward proxy.
Example: VPN
Reverse Proxy
A reverse proxy can be understood as the opposite direction from a forward proxy.
When a client calls a server, it calls the reverse proxy, and the proxy server sends the request and delivers the received response to the client.
In an internal intranet, this is a method where a client on the Internet requests the reverse proxy server in order to call a server and receives the response.
A reverse proxy hides who the server is.
Because the client calls the reverse proxy server first, it cannot know the IP address of the actual server.
In the diagram below, the method where a client on the Internet calls a proxy server and then calls a server in the internal network is a reverse proxy.
Example: Gateway
Benefits of Proxies
By using a proxy server, which is an intermediary server, instead of direct communication between client and server, you can gain several advantages such as security, performance, and traffic distribution.
A proxy can cache content requested from a server and return an immediate response for the same request, which can save time and resource usage.
Security
Using a proxy server makes it possible to hide the IP address of the client or server. By hiding the actual server or client IP address and exposing only the proxy server’s IP address, it can help prepare against hacking.
Performance
Using a proxy server can improve performance through caching and distribution.
Caching reuses frequently used identical requests by storing them.
The proxy server responds instead of calling the actual server again, reducing server resource usage.
Traffic distribution
Some proxy servers also provide load balancing, so if there are multiple distributed servers, server traffic can be distributed.
It is also possible to configure which server is called for each endpoint (URL), distributing server traffic by role.
Others
A single proxy server can handle HTTPS certificate management, while the servers running behind it provide service over HTTP. This has the advantage that certificates do not need to be managed on every server.