0

I am hosting a service on Windows Azure and using an external DNS (Gandi) to manage zone files. What I would like is to redirect all the incoming Azure traffic to another web page, while I am updating the service (like we'll be back soon).

I know that I can do this by updating the zone file, but it takes time to propagate, then time to put back into normal. So 1 hour update finally takes 6-8 hours.

This is not good. Is there any other way to redirect traffic with IMMEDIATE effect and not wait DNS to propagate? Adding redirection inside the code is not really an option, because Azure service packages take an eternity to upload.

Thanks

Vlad
  • 217
  • 1
  • 4
  • 14

2 Answers2

0

Not sure what your full requirement here is, but could VIP swap do the trick for you? You would deploy the alternate 'well be back' site to the staging slot and when you wish to update the service you'll use VIP swap to make that production whilst you update your service, which is now on staging with the latest build.

When that's ready you can VIP swap back and the new site is now in production?

Edited to add:

I take your point regarding wanting to leave the staging slot for rollbacks, makes perfect sense.

Another option could be to use the Traffic Manager -

Have your main application in one cloud service and your temporary landing page in another. Configure a traffic manager failover policy with both services (main one first, alternative second).

when you want to go to 'maintenance mode' disable traffic to the main service and all traffic will get routed to the 'maintenance mode' one although there is some lag in propagating it measured in minutes rather than hours when I played with it a little bit just now - there's a DNS time-to-live setting available to you which defaults to 5 minutes.

When you're ready to come-back online re-enable the main site (and you can chose to remove the 'maintenance mode' deployment when all is working

Yossi Dahan
  • 5,389
  • 2
  • 28
  • 50
  • Already thought about it, but the issue is that I have to preserve the current production deployment, so when I VIP swap I can reverse immediately if something goes wrong with the new version. So this solution would require 3 slots :) Thanks anyway – Vlad Feb 10 '13 at 13:25
0

There's a feature in ASP.NET to quickly stop serving content. If you put a file called app_offline.htm in the root of the site, it will serve that instead of regular content. There are details in this blog post.

Using it in Azure may be difficult. I would suggest using VIP Swap, but I see you don't want to do that. You could remote into each VM and manually add the file, though that could be painful. It may be possible to script it, but I don't know an easy way to do so.

Brian Reischl
  • 7,216
  • 2
  • 35
  • 46