Proxy server
A proxy server is a computer system sitting between the client requesting a web document and the target server (another computer system) serving the document. In its simplest form, a proxy server facilitates communication between client and target server without modifying requests or replies. When we initiate a request for a resource from the target server, the proxy server hijacks our connection and represents itself as a client to the target server, requesting the resource on our behalf. If a reply is received, the proxy server returns it to us, giving a feel that we have communicated with the target server.
In advanced forms, a proxy server can filter requests based on various rules and may allow communication only when requests can be validated against the available rules. The rules are generally based on an IP address of a client or target server, protocol, content type of web documents, web content type, and so on.
As seen in the preceding image, clients can't make direct requests to the web servers. To facilitate communication between clients and web servers, we have connected them using a proxy server which is acting as a medium of communication for clients and web servers.
Sometimes, a proxy server can modify requests or replies, or can even store the replies from the target server locally for fulfilling the same request from the same or other clients at a later stage. Storing the replies locally for use at a later time is known as caching. Caching is a popular technique used by proxy servers to save bandwidth, empowering web servers, and improving the end user's browsing experience.
Proxy servers are mostly deployed to perform the following:
Reduce bandwidth usage
Enhance the user's browsing experience by reducing page load time which, in turn, is achieved by caching web documents
Enforce network access policies
Monitoring user traffic or reporting Internet usage for individual users or groups
Enhance user privacy by not exposing a user's machine directly to Internet
Distribute load among different web servers to reduce load on a single server
Empower a poorly performing web server
Filter requests or replies using an integrated virus/malware detection system
Load balance network traffic across multiple Internet connections
Relay traffic around within a local area network
In simple terms, a proxy server is an agent between a client and target server that has a list of rules against which it validates every request or reply, and then allows or denies access accordingly.