Search code examples
azureroutesurl-routing

What to use for routing thousands of subdomains in Azure?


We have an application that we are hosting in multiple environments in Microsoft Azure. We want to route the traffic based on subdomains, like xxx.mydomain.com should go to the webapp that I have in North Europe and yyy.mydomain.com and zzz.mydomain.com should go to the webapp that I have in the East US.

I know it sounds like simple DNS, but it is more than that. Because:

  • I need to be able to add or update entries dynamically using code so an API should be available for that.
  • A normal DNS entry has a 24 hours time to live meaning that if I want to move my app from one environment to another, for up to 24 hours, users will hit both environments.
  • I expect to have hundreds of thousands of subdomains. Azure DNS has a limit of 25,000 entries.

I've looked into Azure Traffic Manager. It doesn't seem to have an option for traffic based on subdomains. Also, I've looked at Azure Application Gateway. It seems to be the correct choice and it supports API's, but I cannot find the limits for subdomains.

Any suggestions?


Solution

  • If anyone interested, we've ended up using Azure DNS. We have contacted Microsoft and they confirmed that they can increase the quota to 500,000 which is more than enough for us. :)