?
In classic usage scenarios, we typically use the azureloadBalancer to provide load balancing services for the public, while using the Azure Internal Load Balancer provide internal services that are not willing to expose services to the public, such as the database tier. The classic scenario is shown in the following example:
?
?
but in some special usage scenarios, the same Web service, users will want to use both LB access through the public network, you can also use ILB Access through the intranet, and access to the port, the way to access exactly the same, I drew a simple as shown in:
This article describes how to configure the lb and ILB for this scenario, which is convenient for testing and needs to be prepared in advance as follows:
- Install and configure Azure P Owershell, please use the 0.9.8 version, as the version 1.0 uses the Azure ResourceManageR, the configuration methods and commands will vary, and I will describe later articles:
?
- To build a vnet on Azure, the 3 VMS we tested need to be placed in this vnet
- Create 2 Web VMS, in my test case, to be intuitive, use two Ubuntu 14.04 as a Web server, put it in the same vnet, a cloudService, and configure a highly available collection, This is also a best practice for configuring high availability in a production environment
- Create a test VM with WindowsServer 2012in my test and put it in thesame vnet as the Web VM
?
To differentiate between two Web VMs and a test Web service, let's make some simple changes and basically do two things:
- Installing Nginx as a Web server
- Modify the default page, plus the words VM1 and VM2 to differentiate the service's request response VMs.
?
The following are the specific practices:
- First install Nginx
- Configure the Nginx default page to do the testing:
?
- sudo vi/usr/share/nginx/html/index.html
- add an identity statement to distinguish between different VMS :
- Save exit, follow this method, modify the second VM
?
?
Hybrid access to the same Web service using azure lb and ILB