Operations 5 min read

Understanding Load Balancing: HTTP Redirects, Reverse Proxies, IP & DNS Methods

Load balancing distributes traffic across multiple servers using techniques such as HTTP redirects, reverse‑proxy (layer‑7) routing, IP‑based (layer‑4) balancing, and DNS round‑robin, each with distinct advantages and drawbacks regarding performance, scalability, configuration complexity, and fault tolerance.

Java High-Performance Architecture
Java High-Performance Architecture
Java High-Performance Architecture
Understanding Load Balancing: HTTP Redirects, Reverse Proxies, IP & DNS Methods

HTTP Redirect

When a client sends a request, the web server can modify the Location header in the HTTP response to point to a new URL, causing the browser to request that URL and effectively redirect the page. This simple method can be used for basic load distribution but suffers from poor performance and added latency at large scales, making it suitable only for learning purposes.

Reverse Proxy Load Balancing (Layer‑7)

The core function of a reverse‑proxy service is to forward HTTP requests, acting as an intermediary between browsers and backend web servers. Operating at the application layer (layer‑7), it is often called “seven‑layer load balancing.” Nginx is a common reverse‑proxy that allows flexible routing policies and weight‑based traffic distribution.

Advantages Simple implementation and deployment, good performance, and easy customization of forwarding rules.

Disadvantages Single‑point‑of‑failure risk; if the proxy fails, the whole system is affected, and as the number of backend servers grows, the proxy itself can become a bottleneck.

IP Load Balancing (Layer‑4)

This method modifies the destination IP address and port of packets at the network layer (layer‑4) to achieve load distribution. When a load‑balancing server receives a client’s IP packet, it rewrites the packet’s target address before forwarding it to an internal web server. After processing, the response packet is sent back through the balancer, which restores the original client address.

Commonly implemented with LVS (Linux Virtual Server) using IPVS (IP Virtual Server).

Advantages Higher performance and stability compared to reverse‑proxy load balancing.

Disadvantages Limited functionality and complex configuration.

DNS Load Balancing

DNS (Domain Name System) resolves domain names to IP addresses. Since a single domain can be configured with multiple IP addresses, DNS can distribute traffic by returning different IPs to clients, effectively acting as a load‑balancing mechanism.

Advantages Simple configuration and excellent performance.

Disadvantages Inability to define custom routing rules, complications when IPs or servers change, and DNS propagation delays.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

load balancingreverse proxyDNSApplication LayerIPVSnetwork layer
Java High-Performance Architecture
Written by

Java High-Performance Architecture

Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.