ml123
ml123

Reputation: 1251

Load Balancing within cloud service in Azure

I have a Cloud Service in Azure which contains 3 VMs (A, B and C). B & C are BizTalk servers, and A is a client application.

B & C should be load balanced, meaning - A will call some URL, which will load balance the call to B or C, no matter using which algorithm (it can be round robin).

How can I do that?

From what I understand, load balancing in Cloud Service is for scenarios where the whole service is balanced.

Upvotes: 1

Views: 178

Answers (1)

David Makogon
David Makogon

Reputation: 71118

Within a cloud service, you can define endpoints, each endpoint being either direct-mapped or load-balanced. With the former, you specify a port (e.g. 1433) that maps to a specific VM. For the latter, you create a load-balanced endpoint (say, port 80), and then set it up for one or more VMs.

Now: In your particular case, you could have VM A accepting traffic on, say, port 80 (either port-forwarded or load-balanced, assuming you had more than one app server). Then, let's say your BizTalk server was listening on port 8000. The app server(s) could call yourcloudservice.cloudapp.net:8000, which would then be load-balanced across the BizTalk servers.

This has one potential security flaw, that others could call yourcloudservice.cloudapp.net:8000. To prevent this, you can set up an access control list (ACL) on the endpoint, so that only your particular IP address is allowed in (basically add the cloud service's public IP address as the only allowable inbound IP address).

You could also deploy your BizTalk servers to another cloud service, and have both cloud services connected via Virtual Network. However, if you do this, you'd then be responsible for doing your own load-balancing, since you'd be accessing the BizTalk VMs directly.

Upvotes: 1

Related Questions