Trying to understand load balancing in azure cloud service

限于喜欢 提交于 2019-12-11 23:36:44

问题


I am maintaining a azure cloud service which has 1 web role and few worker roles. The webrole has multiple instances. When I open the cloud service from the resources, I can see the service endpoint and public ip address. I want to understand how is the traffic load balanced in this azure cloud service. I searched for load balancers but I could not find it in the subscription. I was also not able to get the reference of some document which explains load balancing in the cloud service specifically.

Any info in this regard?


回答1:


Internal load balancer is supported for cloud services. An internal load balancer endpoint created in a cloud service that is outside a regional virtual network will be accessible only within the cloud service.

I found these docs which might be helpful to you. These explain setting internal load balancer for cloud services.

  1. Classic : https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-get-started-ilb-classic-cloud
  2. ARM : https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-get-started-ilb-arm-ps

Let us know if that helps.




回答2:


Just to make it clear, the information below is about classic services. For information about classic and resource manager model, see this page.

In cloud services you get a load balancer automatically configured when you create the service. If you want to configure it, you can do so using the service model.

The load balancer can be of two different types,

  • internal load balancer
  • external loab balancer

The internal one can only be accessed inside the cloud service, while the external one got a public IP. See this page for how to make an internal load balancer.

Load balancers keep track of the health state of the endpoints by regularly probing them. Check out this page for how to configure the probing. As long as the internal services return a HTTP 200, they are kept in the load balancers pool.

Have a look at this page for more general information on load balancers for cloud services.

Also, see this page as well. It contains a good information about the service.




回答3:


Long story short,

The default distribution mode for Azure Load Balancer is a 5-tuple hash. The tuple is composed of the source IP, source port, destination IP, destination port, and protocol type. The hash is used to map traffic to the available servers and the algorithm provides stickiness only within a transport session.

https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-distribution-mode



来源:https://stackoverflow.com/questions/49473906/trying-to-understand-load-balancing-in-azure-cloud-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!