1

I am building a multitenant application and I would need to know if I can achieve this in Azure.

Assuming the application will be deployed to multiple regions/datacenters. The tenant will be identified by the subdomain: tenant1.domain.com, tenant2.domain.com and tenant3.domain.com. My question is how can I make the redirect so that tenant1.domain.com will be redirected to an application hosted in an US datacenter, tenant2.domain.com to a datacenter in EU and tenant3.domain.com to a datacenter in Australia for example?

I will guess here I have to use Azure Traffic Manager and DNS? Can somebody point me to correct path?

user2818430
  • 5,853
  • 21
  • 82
  • 148

1 Answers1

0

One possibility would be to use Azure DNS (or any DNS with an API really) to setup the CNAME record for a tenant so that it points to the right datacenter.

You would then have to add that as a custom domain on the app if you run on App Service. Though it does have a limit on the number of domains, max 500 according to: https://stackoverflow.com/a/31565429/1658906.

If you run on virtual machines, you can of course configure the server to accept traffic to *.domain.com. Can't really do that with App Service, since you would only be able to map the wildcard record to one region.

You can't really use Traffic Manager in this case I think, since your tenant's data really is in one datacenter. Unless you have replication to a secondary, in which case you could use a TM profile per region in Failover mode.

juunas
  • 54,244
  • 13
  • 113
  • 149
  • What about if I further define the domains like this: tenant1.us.domain.com, tenant2.eu.domain.com, tenant3.au.domain.com. and then I point *.us.domain.com to the US hosted appservice, *.eu.domain.com to EU one and *.au.domain.com to AU? – user2818430 Apr 07 '18 at 21:27
  • Then the domain will work immediately after their environment is setup of course. – juunas Apr 07 '18 at 21:48