PeteShack
PeteShack

Reputation: 707

Different versions of web app (cloud services) on Windows Azure

I have a multi-tenant web app running in a Windows Azure cloud service. Each tenant has their own sub-domain such as tenantA.mysite.com and tenantB.mysite.com. A global *.mysite.com points them all to my web app.

I need to be able to introduce new versions of my app, and move tenants over a few at a time slowly, while keeping the others on the old version.

Right now I create a new cloud service with the new app, and add a specific DNS record for that tenant to point to the new service.

The problem is the down-time caused by changing DNS records and propagation.

Any recommendations for a way to do this without changing DNS records?

My only thought is to do some type of redirect when they hit the old app, but seems like that would cause delays for every single request - or would it?

Upvotes: 1

Views: 356

Answers (2)

Fernando Correia
Fernando Correia

Reputation: 22365

This is trickier than just updating the DNS records for a tenant. The way DNS propagation and caching works, for some users the DNS would resolve to the new location and for other users, at the same time, it would still resolve to the previous location. The result is that you could have users accessing two different deployments for the same tenant at the same time. Even using Traffic Manager, as you can read in its documentation, you have no direct control over the clients' behavior ("browsers typically cache these entries for longer periods, even after their TTL has expired").

Another approach would be to use a front-end layer with a reverse proxy that internally forwards traffic to the appropriate cloud services according to rules you define. Changing these rules on the reverse proxy would affect all incoming requests.

Another way would be to use feature toggles so that you would run a single cloud service and update it for all tenants (using VIP swap to avoid downtime), but only selected tenants with the new features set as active would see them.

Upvotes: 1

viperguynaz
viperguynaz

Reputation: 12174

One recommendation, based on the answer to my comment question, would be to maintain duplicate services in 2 data centers and use Azure Traffic Manager (or a DNS service like DynDNS) to load balance the services. When you have an update, roll out to one data center and change the traffic manager settings to point appropriately.

Upvotes: 0

Related Questions