Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to configure in some way (ideally on dns level) such scenario:

1) when all is fine, all requests goes to www.domain.com

2) in case when www.domain.com is down, all requests immediately go to other box (other IP in different datacenter) so users will get nice "maintanace page"

I am using IIS7, but i want this to work even when server is rebooting ort not available

share|improve this question

1) when all is fine, all requests goes to www.domain.com 2) in case when www.domain.com is down, all requests immediately go to other box (other IP in different datacenter) so users will get nice "maintanace page"

No. Beacuse the web server has no say ni the IP - basically if your server isdown, yo need to dfeed a different IP via DNS. THis means a VERY short TTL which ahs other problems.

Normally people using this use a special routing setup, but this is not feasible for a small dude.

What you need is TWO servers in a NLB based cluster, then one can get out and the other gets all requests. Same data center.

share|improve this answer
    
Thanks for help Tom. During last 3 months I faced situaltion when whole datacenter was not accessible for couple of hours, so just reserved server + load balancing will not help. – st78 Nov 23 '10 at 10:36

Not really. It's not quite possible to achieve the seamlessness you're looking for. A short DNS TTL will likely be ignored among other things. There are two other solutions, but neither is ideal:

  • Less load, but less seamless: Tell your users to bookmark example.com. /index.php is a PHP file that tests to see if the main server is up, in which case it redirects to www.example.com/ (your main site). Otherwise it echos the maintenance page.

  • More seamless, but more load: www.example.com/* requests 10.12.34.56/* (your main server), and on failure, displays the maintenance page.

Neither of these solutions are ideal! The only good solution in my opinion is using a cluster or advanced routing mechanism in a dependable network.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.