0

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

st78
  • 277
  • 2
  • 12

2 Answers2

1

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.

TomTom
  • 51,649
  • 7
  • 54
  • 136
  • 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
0

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.

Dessa Simpson
  • 539
  • 7
  • 27