I have a RackSpace cloud load balancer running two servers on Rackspace I'd like to take the two servers offline to do some maintenance on them. My question is, with my servers down, what is the best way to display a maintenance page?
-
What's the load balancer?– mgorvenCommented Feb 7, 2013 at 20:55
-
What do you mean?– PardonerCommented Feb 7, 2013 at 20:56
-
What hardware or piece of software is the load balancer? Since this is a case of configuring the load balancer we need to know what it is.– mgorvenCommented Feb 7, 2013 at 20:57
-
It's a Rackspace cloud loadbalancer. The algorithm for this load balancer is Round Robin. That's all I can really tell you.– PardonerCommented Feb 7, 2013 at 21:01
3 Answers
You need to configure the load balancer with an error page. I don't know anything about the Rackspace API clients so I can't tell you exactly how.
-
You can, in fact, create a custom error page for Rackspace load balancers. Here's a link to the docs if anyone is looking for a way to do this. docs.rackspace.com/loadbalancers/api/v1.0/clb-devguide/content/…– PardonerCommented Feb 7, 2013 at 21:19
If you are not comfortable using the API to create a custom error page, you can actually achieve this via the Rackspace Control Panel. Under your load balancer details, if you scroll to the bottom, you should be able to click the small pencil icon next to Error Page
. You can then paste in your custom HTML to display if all nodes are offline or returning errors.
Alternatively, if you want to temporarily redirect visitors to a static site during your maintenance, you can create a static page in the Rackspace CDN, following these instructions provided that your DNS TTL is set low enough (i.e. 300 seconds is a good default).
Once the DNS change (Mentioned in the blog post) propagates, your users will be directed to the static maintenance page while you work on your servers. Then, when you are done, point the DNS records back to the load balancer's IP address.
Add another temporary server instance at RackSpace that does nothing but serve a maintenance page, point the load balancer at it instead of your production instances.
-
Yes I was thinking I would do that but then I'll have to fire up another server instance at $16 a month. Is there a way without created another server?– PardonerCommented Feb 7, 2013 at 21:13
-
How long is your maintenance going to take? $16 a month is what, $0.02/hour?– ceejayozCommented Feb 7, 2013 at 21:13