Tags

  • AWS (8)
  • Apigee (3)
  • ArchLinux (5)
  • Array (6)
  • Backtracking (6)
  • BinarySearch (6)
  • C++ (19)
  • CI&CD (3)
  • Calculus (2)
  • Database (1)
  • DesignPattern (43)
  • DisasterRecovery (1)
  • Docker (8)
  • DynamicProgramming (20)
  • FileSystem (11)
  • Frontend (2)
  • FunctionalProgramming (1)
  • GCP (1)
  • Gentoo (6)
  • Git (16)
  • Golang (1)
  • Graph (10)
  • GraphQL (1)
  • Hardware (1)
  • Hash (1)
  • Kafka (1)
  • LinkedList (13)
  • Linux (27)
  • Lodash (2)
  • MacOS (3)
  • Makefile (1)
  • Map (5)
  • Miscellaneous (1)
  • MySQL (21)
  • Neovim (11)
  • Network (72)
  • Nginx (6)
  • Node.js (33)
  • OpenGL (6)
  • PriorityQueue (1)
  • ProgrammingLanguage (9)
  • Python (10)
  • RealAnalysis (20)
  • Recursion (3)
  • Redis (1)
  • RegularExpression (1)
  • Ruby (19)
  • SQLite (1)
  • Sentry (3)
  • Set (4)
  • Shell (4)
  • SoftwareEngineering (12)
  • Sorting (2)
  • Stack (4)
  • String (2)
  • SystemDesign (13)
  • Terraform (2)
  • Tree (24)
  • Trie (2)
  • TwoPointers (16)
  • TypeScript (3)
  • Ubuntu (4)
  • Home

    Reverse Proxy Load Balancer

    Published Jun 18, 2025 [  Network  ]

    Reverse proxy load balancers are components in a network architecture that serve two main purposes:


    πŸ” 1. Reverse Proxy

    A reverse proxy sits in front of backend servers and handles client requests on their behalf. It:

    • Receives requests from clients (e.g., web browsers)
    • Forwards those requests to one of the backend servers
    • Returns the server’s response to the client

    πŸ“Œ Think of it as a gatekeeper between clients and servers.


    βš–οΈ 2. Load Balancer

    A load balancer distributes incoming traffic across multiple backend servers to:

    • Maximize speed and capacity utilization
    • Prevent any one server from being overwhelmed
    • Provide redundancy and high availability

    πŸ”§ Combined: Reverse Proxy Load Balancer

    When combined, this system:

    • Accepts all client requests
    • Chooses a backend server based on a load balancing algorithm
    • Forwards the request to that server
    • Returns the response to the client

    πŸ“Š Common Load Balancing Algorithms

    • Round Robin – rotates through servers in order
    • Least Connections – sends to the server with the fewest active connections
    • IP Hash – hashes the client IP to choose a server
    • Weighted Round Robin / Least Connections – gives preference to more powerful servers

    πŸ” Benefits

    • Scalability – easily add/remove backend servers
    • Security – hides internal servers, enabling TLS termination and DDoS protection
    • Caching – can cache responses to reduce backend load
    • SSL Offloading – handles encryption at the proxy instead of each backend

    πŸ› οΈ Examples

    • Nginx and HAProxy – widely used open-source reverse proxy/load balancers
    • AWS ELB, Cloudflare, Traefik – managed or modern alternatives