1
votes

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?

1

1 Answers

0
votes

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.