Application vs. network load balancing: What’s the difference? | TechTarget

None of the services people take for granted on the internet — such as online shopping, reading the news or checking investments — would work without load balancing.

Load balancing spreads traffic over multiple systems that may be geographically distributed in clouds or data centers and located in virtual servers or dedicated systems around the world. For example, without load balancing, everyone who checked a news website or shopped online would access the same system. If all that traffic flowed to any single system, the servers would become hopelessly bogged down. Load balancing directs that traffic among servers so they share the load more evenly.

Two common types of load balancing are network load balancing and application load balancing. Each differs by whether it operates at Layer 4 or Layer 7 of the seven-layer OSI model.

What is application load balancing?

Application load balancing operates at Layer 7, the application layer. An application installed on a server examines each incoming request, such as HTTPS or Simple Mail Transfer Protocol requests. Application load balancing can direct requests toward one of the servers best able to satisfy the request. For example, an online shopping request could be directed to a system maintaining the inventory for that type of product.

While a network load balancer simply forwards requests, application load balancing examines the application layer protocol data from the request header. This examination takes more time than network load balancing, but it enables the balancer to make a more informed decision of where to direct the request.

Comparison diagram of network load balancing vs. application load balancing
Compare the differences between network load balancing and application load balancing.

Load-balancing algorithms

As requests arrive, load balancers choose among possible routes based on a number of possible algorithms. Load-balancing algorithms include the following:

  • fastest response, which determines which server is responding most quickly;
  • round robin, which evenly cycles through the possible server destinations;
  • weighted round robin, which enables network administrators to designate weights to servers based on each system’s capacity; and
  • least outstanding request, common in AWS Application Load Balancer, which selects servers with the fewest number of queued requests.

While network load balancing typically supports more algorithms, application load balancing tends to use round robin or least outstanding request.

Differences in speed and efficiency

Network load balancing and application load balancing each have advantages, depending on the type of internet service required. Network, or Layer 4, load balancers can provide faster responses, as they forward requests without examining them. Application, or Layer 7, load balancers can provide greater overall efficiency, as they can send requests where they are most efficiently handled.