Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed introduction of Azure load balancing solution

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

The following is a detailed solution introduction of Azure Load Balancer. I hope it can bring some help to you in practical application. Load Balancer involves many things, but there are not many theories. There are many books on the Internet. Today, we will use the accumulated experience in the industry to make an answer.

Load Balancer was an essential component when we created high availability Web applications in the past. We all use a Load Balancer for traditional on-premises Cloud Virtual Machine, where our application runs on N instances, and the Load Balancer sits in front of these servers and distributes the load to the backend servers based on certain predefined algorithms and settings.

Moving to the cloud, we need to understand how to achieve the same load balancing using Azure components. Load balancing in cloud applications requires more consideration, i.e. having a simple load balancer in front of some servers, just like we can host services on PaaS, we can run services on different instances for different tenants, or we can have applications running on multiple servers distributed around the world.

For this reason, there are several components in Azure that can be used for load balancing. Each of these components serves a different purpose, and we need to choose the right components for the solution to achieve the best application architecture.

Azure Load Balancing Solutions

There are three main load balancing components in Azure.

l Azure Load Balancer

Azure Application Gateway

Azure Traffic Manager

Let's look at each component one by one and try to understand when to use each component effectively.

Azure Load Balancer

Azure Load Balancer is a classic Load Balancer because it can be used to balance the load of VMs just like we used a traditional Load Balancer with our on-premises servers. Now, because Azure Load Balancer is designed specifically for cloud applications, it can also be used to balance loads with containers and PaaS applications as well as VMs.

But this similarity to a traditional Load Balancer is that Azure Load Balancer works at the transport layer (Layer 4 of the OSI model). This means that it distributes network traffic in the same Azure datacenter, but cannot use the features of traditional load balancers provided by the session and application layers because these are Layer 7 constructs of the OSI model.

The Load Balancer is configured with load balancing rules that work at the port level. It accepts source and destination ports and maps them together so that whenever it receives a request for a source port, the request is forwarded from a set of virtual machines (or applications in VNET) connected to the Load Balancer on the destination port to the virtual machine.

Azure Load Balancer can be used in two configuration modes:

External-Common Load Balancing

Internal-Internal load balancing

External-Common Load Balancing

In this mode, the Load Balancer is assigned a public IP address to ensure that the Load Balancer can accept requests from the Internet. Client applications and services will invoke the Load Balancer from the Internet and it will then distribute incoming traffic through VMs, containers or applications according to configured rules.

Internal-internal load balancing

The internal Load Balancer is basically the same as the external Load Balancer, but it uses a private IP address and can only be invoked from applications in the virtual network to which it is connected.

Azure Load Balancer helps us design high availability at the infrastructure level, but because there are situations that require our load balancing components to provide more advanced features and services, such as connection affinity, security, SSL termination, etc., we cannot use Azure Load Balancer to achieve these advanced features. We need a solution that can handle the Layer 7 structure of the OSI model, i.e., applications, sessions, etc. Let's see how we can achieve this in the next section.

Azure Application Gateway

Azure Application Gateway is a 7-tier Load Balancer, so it can payload sessions accessing applications, enabling Application Gateway to provide more than just Load Balancer functionality. such as sticky session, connective affinity, etc. Because Application Gateway has more functionality than Azure Load Balancer, it can configure more complex routing and load balancing. The application gateway acts as a reverse proxy service. It terminates the client connection and forwards the request to the backend endpoint.

I personally think that if we run workloads at the application level where we should use common load balancers, then there are more use cases where the use of application gateways makes more sense than using load balancers.

The application gateway can be thought of as running on Layer 7 and providing more functionality than a Load Balancer. Application gateways can also be used to route traffic based on URLs, which is useful for developing multitenant applications where each tenant has a separate VM running instance and tenant identifier in the URL.

Azure Traffic Manager

So far, we have seen load balancing solutions that satisfy load balancing within the data center. Load balancers and application gateways are components used to achieve high availability within the data center. But with the cloud, we can also build our apps in a geographically distributed way. So how do we balance the load between geographies?

Azure Traffic Manager is only used for this purpose. Azure Traffic Manager uses DNS to redirect requests to the appropriate geolocation endpoint. Traffic Manager does not see traffic passing between clients and services. It simply redirects requests based on the most appropriate endpoint. Geolocation endpoints are accessible public URLs facing the Internet.

Azure Traffic Manager works at the DNS level, meaning it distributes load across multiple zones and datacenters using rules configured at the DNS level. The client issues a DNS request and, depending on the DNS location, Azure Traffic Manager finds the nearest zone and sends it back to the client via a DNS response.

After reading the above detailed solution introduction about Azure Load Balancer, if you still have anything to know, you can find what you are interested in the industry information or find our professional technical engineers to answer. Technical engineers have more than ten years of experience in the industry.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report