Skip to main content

Decide on Maintenance Page Solution

Problem


When your sites go down, we need to be able to communicate more graciously to customers that you’re having issues than a generic “502 Bad Gateway” message.

info

Specifically, this decision relates to services behind an ALB. CloudFront and S3 are out of scope.

Solution

We recommend deploying a static maintenance page. The industry best practice is to host the downtime page on a cloud provider that does not share infrastructure with your primary cloud provider. E.g. S3 is not recommended, as even S3 has gone down. That said, using a separate cloud provider is a micro-optimization for a very narrow set of failure scenarios.

Some related considerations are how the maintenance page will be activated.

Considered Options

There are a few options:

Option 1

Use route53 health checks. Cloud Posse does not recommend it because poorly implemented DNS-clients clients may cache the downtime host.

Option2

Use CloudFront dynamically redirect to downtime page using an Origin Group with fail-over.

Here’s a simple example using terraform to provision a maintenance page on Cloud Flare.

Use ALB with fixed response

  • Use fixed-response with iframe (not ideal) to S3 static site

  • Use fixed-response populated with HTML from file with inline CSS, SVGs, etc. and no external dependencies (if possible)

  • Add GA code for analytics