0
votes

I have a web app deployed to a Cloud Service on two instances, size A1v2 standard. My understanding is that once I have multiple instances deployed that service the same public endpoint, load balancing should automatically be handled by Azure (since it's a Cloud Service).

I RDP into each instance. Here is the first instance: enter image description here

As you can see, it's using 100% of CPU.

Here is the second instance: enter image description here

Just sitting there! Not doing a bloody thing!

The worst part is that this also kills autoscaling. The average CPU usage is 50% so Azure doesn't provision any more instances. Possibly a good thing since they'd just be sitting there doing nothing anyway (facepalm).

1

1 Answers

1
votes

In Azure, the cloud service can work as a load balancer, the VMs should in the same Availability set, and should set load balancer rules at the endpoint. Load balancing endpoints have a one-to-many relationship between the public IP address and the local ports assigned to the services on the virtual machines in the cloud service.

One VM’s CPU usage is close to 100%, and another is 3%. Because of the Azure Load Balancer one time will send all the new requests to one VM, and after the LB probe the health of another (in my case is 15s), the LB will send new connections to another, so one VM’s CPU usage will higher than another.
Here is my LB rules: enter image description here About the auto scaling, we should check the configuration of the SCALE.
1. we should check the Instance range, if you just create 2 instances, even if the average CPU usage higher than your target, the auto scaling will not scale to 3 instances.
2. We should check the Target CPU settings. This range represents average CPU usage for the entire role. Windows Azure will add or remove virtual machines to keep you in this range. And the average CPU usage (5mins) higher\lower than the target, then the auto scale will add\remove the VM.
Here are my auto scale settings: enter image description here

Also we can find the Autoscale operation logs here: enter image description here