Recently the company's website was migrated to Microsoft public cloud in the test. Microsoft offers a wide range of services that can help us to host our own websites, virtual machines, Web apps and more. We have been compared and finally chose the virtual machine, not the Web app is bad, but we are used to the way the virtual machine.
We will run the site using two virtual machines and load balancing, where load balancing is a special emphasis:
1. We choose 4-tier load balancing;
2. This load balancer is free, and the performance is very good;
3. Can support internal load balancer (only intranet IP) and external load balancing;
4. Can support a load-balanced multi-IP mode;
5. Service monitoring helps monitor the operation of the rear virtual machines.
Here we need to introduce the classification of IP addresses and basic support to help you understand.
Name |
Describe |
From belonging to |
Network type |
How to Generate |
Vip |
Virtual IP Address |
Load Balancing |
Public network |
When load balancing is created |
Pip |
Public IP Address |
NICs for virtual machines |
Public network |
When the VM is created |
DIP |
Internal IP Address |
The IP address on the virtual NIC |
Vnet |
When the VM is created |
So let's get started.
1. Create two virtual machines, and be sure to add the virtual machines to the availability set. Step slightly
2. Create a Load Balancer
3. Add back-end virtual machines
4. Add a run state probe:
The HTTP load balancer probe overrides the default guest agent probe, which means that you can create your own custom logic to determine the health of the role instance.
TCP probes Initialize the connection by performing a three-party handshake using the defined port.
5. Create a load Balancing rule
Done, so the site has the ability to load balance.
Azure creates the 4-tier SLB run Web site