Hello @PauloMatos ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you would like to evenly distribute incoming web requests across a farm of Azure App VMs and would like to know if it is recommended to use Azure Application Gateway or Azure Load Balancer.
First, I would recommend you to go through the below article where you have a Decision tree for load balancing in Azure and you can determine which load balancing solution is better for your setup:
Now, coming to your question of even distribution of requests:
Azure Load Balancer doesn't support true round robin load balancing but supports a hash-based distribution mode.
Azure Load Balancer supports two distribution modes for routing connections to your load-balanced applications:
- Hash based
- Source IP affinity/Session persistence
The default distribution mode for Azure Load Balancer is a five-tuple hash.
Hash-based mode has one configuration type:
- None (hash-based) - specifies that successive requests from the same client may be handled by any virtual machine.
Refer: https://learn.microsoft.com/en-us/azure/load-balancer/concepts
https://learn.microsoft.com/en-us/azure/load-balancer/distribution-mode-concepts
If you need a more round-robin type of load balancing, then I would suggest you go with Azure Application gateway.
When the Application gateway selects the backend pool, it sends the request to one of the healthy backend servers in the pool (y.y.y.y). The health of the server is determined by a health probe. If the backend pool contains multiple servers, the application gateway uses a round-robin algorithm to route the requests between healthy servers. This load balances the requests on the servers.
Refer: https://learn.microsoft.com/en-us/azure/application-gateway/how-application-gateway-works
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.