What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

What is the technique for serving the website offline message?

Do they have a different IIS site that takes charge on the deploy action?

share|improve this question
6  
I'd link to a pertinent SF discussion ... but SF is down –  Zypher May 26 '10 at 4:06
    
The imp plugs the network cable into the other PC. –  Time Traveling Bobby Oct 7 '11 at 13:56

2 Answers 2

up vote 5 down vote accepted

I'm pretty sure I asked a similar question on Stack Overflow regarding how to implement such a thing.

The answer was quite simple: all you have to do is add an HTML file to the root directory of an IIS application that is named app_offline.htm. Once this is done, any users who request something are shown that page.

If I'm not mistaken, that's how Stack Overflow does it.

Of course, there are other ways of approaching this problem, but this seems the most straight-forward.

share|improve this answer
    
Do you mean if it redirects all urls/requests to app_ofline.htm? EDIT: Never mind. @Stacker seems to have removed his comment... –  Maxim Zaslavsky May 26 '10 at 4:36
    
While true, this isn't really now it works with our sites, we actually take the site offline at the IIS level and it's the load balancer (if no servers are available) that serves the page up. –  Nick Craver Jun 6 '11 at 17:00
    
@NickCraver: Really? That sounds like a good strategy - cool stuff! Are there any other posts on Meta (or elsewhere) about how this is set up? I'm curious to see how it works. Thanks! :) –  Maxim Zaslavsky Jun 7 '11 at 6:25

Basically, when StackOverflow goes offline, the server puts up a static webpage telling us all that it is down for maintenance.

Then, the server searches through its database and absorbs some of the awesomeness that Jon Skeet has rubbed off on the website and uses it to make changes that benefit the website.

$('#jon-skeet').absorb();

The problem is, too much of a good thing can be bad. So just before the server absorbs too much of Jon's awesomeness, it stops and comes back online. It will then repeat this process a week or two later.

share|improve this answer
    
If you put here a comment, how the views can be still zero? –  stacker May 26 '10 at 4:11
1  
@stacker because they are buffered and written in batches? –  Jeff Atwood May 26 '10 at 4:12
    
@Jeff I thought it was just because I was such a super awesome ninja programmer that the server never saw me.... –  Tyler Carter May 26 '10 at 4:13
    
@Jeff 15 minutes later? –  stacker May 26 '10 at 4:18
    
@Tradition can you be serious for once? :) –  stacker May 26 '10 at 4:18
    
@stacker It's against my religion... –  Tyler Carter May 26 '10 at 4:20
2  
@stacker yep, new bug based on the database sites table we just deployed. will be fixed soon. –  Jeff Atwood May 26 '10 at 4:31
    
+1 for using jQuery plugin. –  Colonel Sponsz May 26 '10 at 11:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .