The Maintenance 200 module allows a site to return a Status code of 200 rather than the default 503 (Service Unavailable) code.

"But wait," you ask, "why would I want that? The site is truly in a 503 state and should report that." The reason you'd want to return a 200 is so that your CDN or caching layer (e.g., Varnish) will cache the maintenance page and serve it to new requests rather than passing the request down to your origin server.

Admittedly, this is kind of a double edge sword, since once the page is in cache you'll have to flush your cache to bring the site back up, which may incur more origin load than is spared by caching the maintenance page, but c'est la vie.

Related Modules

Varnish Maintenance Mode provides similar functionality specifically for Varnish.

Notes about the 8.x version

#D8CX: I pledge that maintenance200 will have a full Drupal 8 release on the day that Drupal 8 is released.

The 8.x-1.0-alpha1 version of the module has been rebuilt using the Symfony event model. This release has been tested against drupal-8.0-alpha3. - runeasgar

Remember, this is open source; patches are welcome and if it breaks you get to keep the pieces.

Project information