Skip to content

Instantly share code, notes, and snippets.

@JudahSan
Created December 19, 2023 17:01
Show Gist options
  • Save JudahSan/780bbc90498588ff329fd5af8c154e20 to your computer and use it in GitHub Desktop.
Save JudahSan/780bbc90498588ff329fd5af8c154e20 to your computer and use it in GitHub Desktop.
PROXY REVERSE PROXY LOAD BALANCER

Proxy works on Layer 3 while Reverse Proxy works on Layer 7 aka Load Balancer (special type of RP). Proxy generally works on IP and RP works on application layer.

Proxy reroute the port and ip while RP or Load balancer reroute the paths of url example, /image, /getRequest... and so on.

Certainly! Let's break down the concepts of proxy, reverse proxy, and load balancer:

  1. Proxy Server:

    • A proxy server acts as an intermediary between clients (users or devices) and servers. When a client requests resources from the internet, the request is sent to the proxy server instead of directly to the destination server.

    • The proxy server then forwards the client's request to the destination server, receives the response, and sends it back to the client. This process can provide benefits like caching, content filtering, and privacy.

    • Proxy servers are often used to enhance security and performance by adding an additional layer between clients and servers.

  2. Reverse Proxy:

    • A reverse proxy is similar to a regular proxy, but it serves a different purpose. Instead of helping clients access resources on the internet, a reverse proxy assists servers in handling incoming client requests.

    • When clients send requests to a reverse proxy, the reverse proxy determines which backend server should handle the request. This can be based on factors like load balancing, server health, or content type.

    • The reverse proxy can also provide additional features such as SSL termination (decrypting HTTPS requests), caching, and security filtering. Clients often interact with the reverse proxy without knowing about the actual backend servers.

  3. Load Balancer:

    • A load balancer is a specialized type of reverse proxy that distributes incoming client requests across multiple backend servers. Its purpose is to evenly distribute the workload among servers to optimize performance and prevent overloading.

    • Load balancers use algorithms to determine which server should handle each request. This helps improve response times, minimize downtime, and enhance the overall user experience.

    • Load balancers can be hardware devices or software applications. They play a critical role in high-traffic websites and applications to ensure that no single server is overwhelmed with requests.

In a nutshell:

  • A proxy server stands between clients and servers, helping clients access internet resources and adding features like caching and filtering.

  • A reverse proxy is used by servers to handle incoming client requests, manage traffic distribution, and provide additional features.

  • A load balancer is a type of reverse proxy that distributes client requests across multiple servers to optimize performance and prevent overloading.

All three concepts contribute to improving security, performance, and scalability in network environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment