VM load balancing for the Windows Azure experience

Source: Internet
Author: User
Tags azure load balancer

Microsoft Azure provides load balancing services for virtual machines (IaaS) and cloud Services (PaaS) hosted in it. Load balancing supports application scaling and provides application failure recovery and other benefits. Specify the input endpoints on the service through the Microsoft Azure portal or the application's service model. When you deploy a managed service with one or more input endpoints on Microsoft Azure, it automatically configures the load balancing service provided by the Microsoft Azure platform. To take advantage of the resiliency/redundancy benefits of a service, you need to have at least two virtual machines serving the same endpoint.

Key features of the Microsoft Azure load Balancing Service:

Paas/iaas Support: Microsoft Azure Load Balancing services are available for all tenant types (IaaS or PaaS) and all operating system types (supported for Windows or any Linux-based operating system).

Note : The PaaS tenant is configured through the service model. IaaS tenants are configured through the management portal or PowerShell.

Layer-4 load balancer, distributed based on hash algorithm

Microsoft Azure Load balancer is a Layer-4 load balancer. The Microsoft Azure load balancer distributes the load between a set of available servers (virtual machines) by calculating the hash function for the traffic received on a given input endpoint. The hash function is computed so that all packets from the same connection (TCP or UDP) will eventually reside on the same server. The Microsoft Azure load balancer calculates a hash function for mapping traffic to available servers with 5 information (source IP, source port, destination IP, destination port, protocol type). The hash function We choose makes the distribution of connections to the server very random. However, depending on the traffic pattern, different connections may be mapped to the same server. (Note that the distribution of connections to the server is not polling, nor does it have a request queue, as the other articles or blogs mistakenly claim). The basic premise of a hash function is to obtain a large number of requests from different clients so that the request can be optimally distributed across servers.

Multi-protocol support: The load Balancing service in Microsoft Azure supports the TCP and UDP protocols. Customers can specify the protocol through PowerShell or the management portal in the input endpoint specification of their service model.

Multi-point Support

Managed services can specify multiple input endpoints that will automatically be configured on the load balancing service.

Currently, multiple endpoints with the same port and protocol are not supported. The maximum number of ports a managed service can have is also limited and is currently set to 150.

internal Endpoint Support: You can specify up to 25 internal ports per service, which are not exposed to the load balancer and are used for communication between service roles.

Direct Port Endpoint Support (instance input endpoint): Managed Services can specify that a given endpoint should not be load balanced, but rather direct access to the virtual machine hosting the service. This allows the application to control the direct redirection of the client to a given application instance (VM) without having to load balance each request?? (Load balancing may cause redirection to different instances).

automatic reconfiguration of extensions / Shrink, service repair, and update

The load Balancing service works with the Microsoft Azure Compute service to ensure that the number of server instances specified for the input endpoint expands or shrinks (due to an increase in the number of Web Role/worker role instances or the placement of additional persistent VMS under the same load Balancing group). The load Balancing service is automatically reconfigured to load balance against increased or decreased instances.

The load Balancing service is also transparently reconfigured in response to service repair operations performed by Microsoft Azure Fabric Controller or service updates performed by customers.

Service Monitoring

Load balancing services provide a capability to detect the health of various server instances and to keep poorly run server instances from being polled. The following three types of probes are supported: Guest agent probes (on PaaS VMs), HTTP custom probes, and TCP custom probes. For the guest agent, the load Balancing service queries the guest agent in the VM to understand the status of the service. For HTTP, the load Balancing service determines the health of the instance by obtaining the specified URL. For TCP, it relies on the successful establishment of a TCP session with a defined probe port.

Source NAT (SNAT)

All outbound traffic from the service uses the same VIP address as inbound traffic for source NAT (SNAT) processing. We will delve into the workings of SNAT in a future article.

Traffic optimization within the data center

Microsoft Azure Load Balancer optimizes traffic between Microsoft Azure datacenters in the same region, allowing traffic between azure tenants in the same region through VIP communications to completely bypass Microsoft Azu after a TCP/IP connection starts Re load balancer.

VIP Exchange

Microsoft Azure Load Balancer supports exchanging VIPs for two tenants, moving tenants in the staging environment to the production environment, and vice versa. The VIP swap operation allows the client to communicate with the service using the same VIP when deploying a new version of the service. The new version of the service can be deployed and tested in a staging environment without interfering with production traffic. When the new version passes all the necessary tests, it can be delivered to the production environment by exchanging it with the existing production service. Existing connections established with the "legacy" production environment will remain intact. The new connection will be directed to the "new" production environment.

For specific details, please refer to: http://blogs.msdn.com/b/azchina/archive/2014/05/26/microsoft-azure-load-balancing-services.aspx

Here's a quick demonstration of how to build the load balancer for Azure VMS

1. Create a new VM, you can refer to http://gshao.blog.51cto.com/3512873/1344846, because I was a network of azure, so I used the network on Azure.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/58/4B/wKioL1SuHpjDLWdbAAFjMSruh9I639.jpg "height=" 532 "/>

2. Deploy a second VM and remember to select the same cloud service,

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" http:// S3.51cto.com/wyfs02/m02/58/4f/wkiom1suhdas8ltfaaflpfjw5qe109.jpg "height=" 318 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/58/4F/wKiom1SuHdfQQ-jpAAM4pmuu7sI566.jpg "height=" 642 "/>

3. Install IIS on both VMS and configure the relevant web interface

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/58/4B/wKioL1SuHpni9ZPvAAFYNryrhsg889.jpg "height="/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/58/4B/wKioL1SuHpqAXBYMAAG1lYTxRy4091.jpg "height=" 305 "/>

4. In the Azure portal, configure the Load balancer, click the management interface of a VM, click the endpoint;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/58/4B/wKioL1SuHpvziAN_AAGnfc0_S4M574.jpg "height=" 558 "/>

5. Click Add;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/58/4B/wKioL1SuHpuxP7duAAEysABa6wQ196.jpg "height=" 613 "/>

6. Add a standalone Endpoint

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/58/4F/wKiom1SuHdqx9ihWAADm8Mt2wpU347.jpg "height=" 571 "/>

7. Fill in the details of the specified endpoint;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/58/4B/wKioL1SuHpzhNsyMAAFFI-oyL3I836.jpg "height=" 570 "/>

8. Configure the load balancing set;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/58/4B/wKioL1SuHp2C9mKBAAEdyhWLH1s045.jpg "height=" 576 "/>

9. Add the second VM to the Azureweb load balancing set;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/58/4F/wKiom1SuHduQwGHyAAD3Z_9_oVo244.jpg "height=" 578 "/>

10. Accessing the Cloud service DNS

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/58/4F/wKiom1SuHdzB0uRiAABfwJFLt0U332.jpg "height=" 111 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/58/4F/wKiom1SuHdzhkhq9AABfns-W9Aw540.jpg "height="/>

This article is from the "Gs_hao" blog, make sure to keep this source http://gshao.blog.51cto.com/3512873/1600667

VM load balancing for the Windows Azure experience

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.