Baama
Baama

Reputation: 2642

Azure load balancing Round Robin and VM Instance IDs

Hi I am working with a single http endpoint that i can send requests to. I am working with Azure load balancer which should balance requests between 4 VMs. According to what i have read so far. The load balancer should use a round robin method to do the routing.

How do I make http requests in such a way that I am sure I have hit all the VMs and not just the first VM. I suppose I must do a concurrent request of some sort. Maybe an asynchrounous parallel request? The VMs have identical data so its pertinent that I hit all 4 VMs with 4 requests. I hope my question is clear enough

Also I have the VM server instance Id's. How do i use the id's to specify the server i want to hit in the request.

Upvotes: 0

Views: 3722

Answers (1)

Jason Ye
Jason Ye

Reputation: 13974

The load balancer should use a round robin method to do the routing.

As JohnMark13 said, Azure load balancer have two modes: Hash-based distribution mode and Source IP affinity mode.

For now, Azure Load balancer does not support specify VM id to access it, just support IP address + port.

As a workaround, I think we can set NAT rules, set different ports to different VMs, so we can access different VMs with IP address and different ports.

enter image description here
More information about Azure load balancer and NAT rules, please refer to this link.

Upvotes: 1

Related Questions