Microsoft Azure Series IX implements virtual machine load balancing based on IaaS cloud services

Source: Internet
Author: User
Tags azure load balancer

If you need to load balance a different virtual machine under a cloud service, you can forward the message of public port through load balancing to each VM, thus enabling automatic load balancing of the request.

The specific topologies are as follows:

650) this.width=650; "title=" clip_image001 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image001 "src=" Http://s3.51cto.com/wyfs02/M02/82/08/wKiom1dIA4exWwtUAAElH3htybA643.png "height=" 287 "/>

We can set up 80-port load balancing on the two virtual machines that we created earlier.

650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image002 "src=" Http://s3.51cto.com/wyfs02/M01/82/08/wKiom1dIA4ixWZRdAABlC7qTE24885.png "height=" 334 "/>

Note: Azure's Load balancer currently supports only four tiers, and cannot retain the session.

The algorithm for load balancing is set up in Azure and cannot be modified. The algorithm relies mainly on five tuples (source IP, source port, destination IP, destination port, protocol type).

Azure virtual Machine By default, only RDP ports and PowerShell ports are turned on, and the other ports are turned off.

To test, we install and open the Web service for 2 virtual machines and add a 80 port endpoint.

650) this.width=650; "title=" clip_image003 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image003 "src=" Http://s3.51cto.com/wyfs02/M00/82/07/wKioL1dIBIDxzWbhAACi1IuWPsM049.png "height=" 567 "/>

Install Web service, second set

650) this.width=650; "title=" clip_image004 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image004 "src=" http://s3.51cto.com/wyfs02/M01/82/07/wKioL1dIBICD5isoAAAkVXc-E7U155.png "height="/>

Test the first Web service, normal!

650) this.width=650; "title=" clip_image005 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image005 "src=" Http://s3.51cto.com/wyfs02/M02/82/07/wKioL1dIBICDQAzzAAAlD6zB53w339.png "height=" "/>

The second Web server.

(Note: In order to differentiate the effect, 2 Web page content is set to different, the actual situation should be the same)

First add an endpoint to the first virtual machine and create a load Balancing cluster

650) this.width=650; "title=" clip_image006 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image006 "src=" Http://s3.51cto.com/wyfs02/M00/82/07/wKioL1dIBIHxEDfVAAExgZ5go14627.png "height=" 494 "/>

Click "Add"

650) this.width=650; "title=" clip_image007 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image007 "src=" Http://s3.51cto.com/wyfs02/M01/82/07/wKioL1dIBIKCVNV8AAEfidb3Zic851.png "height=" 494 "/>

Add stand-alone endpoints

650) this.width=650; "title=" clip_image008 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image008 "src=" Http://s3.51cto.com/wyfs02/M02/82/08/wKiom1dIA4uwFU50AAEtWd9VEeE941.png "height=" 494 "/>

Specify the endpoint name "HTTP", protocol TCP, public port 80, private port 80, tick "Create load Balancing cluster"

650) this.width=650; "title=" clip_image009 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image009 "src=" Http://s3.51cto.com/wyfs02/M02/82/08/wKiom1dIA43D6XkFAAErQ6eIvWw046.png "height=" 494 "/>

Set load Balancing cluster name Nlb-http, probe protocol TCP, probe port and interval, keep default

650) this.width=650; "title=" clip_image010 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image010 "src=" Http://s3.51cto.com/wyfs02/M02/82/07/wKioL1dIBISy3gE9AACyNcwvpi8293.png "height=" 259 "/>

The first virtual machine endpoint creation is complete,

Switch to the second virtual machine

650) this.width=650; "title=" clip_image011 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image011 "src=" Http://s3.51cto.com/wyfs02/M00/82/08/wKiom1dIA47y7KYRAADAWLUGKjA882.png "height=" 238 "/>

End point Page

650) this.width=650; "title=" clip_image012 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image012 "src=" Http://s3.51cto.com/wyfs02/M01/82/08/wKiom1dIA47Spcj-AAEQRmkLa0s324.png "height=" 612 "/>

Add to

650) this.width=650; "title=" clip_image013 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image013 "src=" Http://s3.51cto.com/wyfs02/M01/82/08/wKiom1dIA4_BBpxhAAEi2WiFTIQ071.png "height=" 494 "/>

Select Add endpoint to load Balancing cluster "Nlb-http"

650) this.width=650; "title=" clip_image014 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image014 "src=" Http://s3.51cto.com/wyfs02/M01/82/07/wKioL1dIBIfAr2ItAAE3O0tQc2c969.png "height=" 494 "/>

Set endpoint name HTTP, remaining default

650) this.width=650; "title=" clip_image015 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image015 "src=" http://s3.51cto.com/wyfs02/M02/82/08/wKiom1dIA5Hh_3ALAADPohuxQPs811.png "height=" 258 "/>

The 2nd virtual machine endpoint is added complete.

Start testing below

Find a local computer, we use 2 browser chrome and IE, simulate 2 user access, the effect is as follows:

Ie

650) this.width=650; "title=" clip_image016 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image016 "src=" Http://s3.51cto.com/wyfs02/M02/82/07/wKioL1dIBIixJerUAAArpe90kr0624.png "height=" 167 "/>

Chrome

650) this.width=650; "title=" clip_image017 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image017 "src=" http://s3.51cto.com/wyfs02/M00/82/08/wKiom1dIA5KAbjIeAABCsHMFJXw462.png "height=" 136 "/>

The test is complete.

The rules for Azure load Balancer (load balancer) are composed of five features of the source IP, source port, destination IP, destination port, protocol type

Reference: http://azure.microsoft.com/blog/2014/04/08/microsoft-azure-load-balancing-services/

650) this.width=650; "title=" clip_image018 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image018 "src=" Http://s3.51cto.com/wyfs02/M01/82/07/wKioL1dIBImB64qvAACDDHLHPKc210.png "height=" 222 "/>

The latest azure Load balancer can modify the rules to change to 2 features (source ip,destination IP) or 3 features (source IP, Destination IP, Protocol). This is the same client-initiated request that points to the same Azure destination server. In this way, you can keep the session. As shown in the following:

650) this.width=650; "title=" clip_image019 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image019 "src=" http://s3.51cto.com/wyfs02/M02/82/07/wKioL1dIBIrBIFpYAACBtr3FZ18477.png "height=" 231 "/>



Microsoft Azure Series IX implements virtual machine load balancing based on IaaS cloud services

Related Article

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.