lekso
lekso

Reputation: 1813

Sitecore CMS: maintenance page for a load-balaced website

I'd like to implement a "Website under maintenance" page on a Sitecore powered website, where CMS editors can switch on/off the maintenance mode. During the maintenance mode all requests are forwarded to the maintenance page. A solution with app_offline.htm in website root would be ok, however the problem is that website is load-balanced.

What is the best practice to implement what I want on load balanced websites, and specifically for Sitecore CMS?

Upvotes: 2

Views: 2413

Answers (3)

Kyle Heon
Kyle Heon

Reputation: 412

I used this article when I first started working with a CM to CD load balanced environment: http://csuwannarat.wordpress.com/2011/12/20/sitecore-deployment-process-in-load-balanced-production-environment/

Hopefully this helps you too.

Upvotes: 1

Ahmed Okour
Ahmed Okour

Reputation: 2422

You can create httpmodule that reads some setting that CMS editor can turn on/off inside sitecore, if the setting is turned off, you redirct to your custom maintainace page. Make sure that you dont redirect any http request coming from sitecore desktop, by checking logged in user domain.

Upvotes: 2

Marek Musielak
Marek Musielak

Reputation: 27132

In any load-balanced environment you should avoid having this app_offline.html page as a part of your website. Please remember that if you are deploying new code the site may encounter some exceptions or config problems and even your plain html maintenance page won't be accessible.

You should rather think about having a app_offline page redirection set directly on the load balancer. In this case you need to set it only in one place and you don't need to worry about your site being unavailable. Of course you will not be able to manage this page from Sitecore in this case.

And the best solution in the load-balanced environment is not to have app_offline.html page at all. When you're doing any maintenance, you're performing it on one (of half) of the load-balanced servers at the time. The other servers should serve the responses to users' request in the meantime. And when you're ready with maintenance on one server, you put it back to load-balancer and start maintenance of the other servers (taking them out from the load-balancer before making any updates on them).

Upvotes: 7

Related Questions