Setting up load balancing for subdomains

Hi,

We want to set up load balancing (Active-Passive mode) for our websites hosted on IIS. We have web server A and identical server B. And want to set up LB between these two. We want to set it up in a way that if a website ab.sample.com is down, traffic will be routed to server B.

We have a root domain sample.com and under the same domain, we have multiple subdomains such as ab.sample.com, vb.sample.com, and more. We want to set up the Load balancing for all subdomains.

We already purchased a plan for Load balancing and set up Load balancers for the testing. But we have consumed all the origins for now. Do we need to add more origins or is there any way we can use the same pool/origins?

Please help us with this.

Hi,

So if it’s the same two servers for all the hostnames then you shouldn’t need any additional pools/origins. As long as you have 20 or less hostnames that you need to load balance then you’re fine on the $5 + usage plan.

If I understand what you want to achieve then you would need a setup like this:

2 pools with 1 origin each:


This example has all default settings, you can of course tweak this to your needs.

1 load balancer for each hostname (using your examples ab and vb.

You can create up to 20 load balancers (one for each hostname) but use the same pools/origins for each.

Alternatively if you have the exact same setup for each you could try a CNAME to one load balancer for each subdomain, I have not tested this but it may also allow you to have more than 20.

Hope that helps!

1 Like

Just to confirm I have tested this and it does work, so if you have the exact same load balancing setup for all your subdomains you can configure one hostname (I did lb.example.com) with the two pools above and then CNAME all the other hostnames to that one. This means you only need to use 2 origins, 2 pools and 1 load balancer to do what you laid out above.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.