Azure for Architects
上QQ阅读APP看书,第一时间看更新

Load balancing

Load balancing, as the name suggests, refers to the process of balancing the load among VMs and applications. With one VM, there is no need for the load balancer because the entire load is on a single VM and there is no other VM to share the load. However, with multiple VMs containing the same application and service, it is possible to distribute the load among them through load balancing. Azure provides a couple of resources for enabling load balancing, which are as follows:

  • Load balancers: The Azure load balancer helps in designing solutions with high availability. Within the TCP stack, it is a layer 4 transport-level load balancer. It is a layer 4 load balancer that distributes incoming traffic among healthy instances of services defined in a load-balanced set. Level 4 load balancers work at a transport level and have network-level information, such as an IP address and port, to decide the target for the incoming request. Load balancers are discussed in detail later in this chapter.
  • Application gateways: Azure application gateway delivers high availability to your applications. They are a layer 7 load balancer that distribute the incoming traffic among healthy instances of services. Level 7 load balancers can work at the application level and have application-level information such as cookies, HTTP, HTTPS, and sessions for the incoming request. Application gateways are discussed in detail later in this chapter. Application gateways are also used when deploying Azure Kubernetes services specifically for scenarios in which ingress traffic from internet should be routed to Kubernetes services in cluster.