502 Bad Gateway – Labour Party Website Crashes
In a flurry of activity ahead of the announcement of the new Leader and Deputy Leader of the UK Labour Party, the Labour website crashed as many people flocked there for the results.
The website recovered quite quickly, within minutes – all credit to the Labour infrastructure team!
What Causes 502 Bad Gateway Errors?
Traditionally these are caused by the following:
- There’s an SSL negotiation failure because the origin is using SSL/TLS protocols and ciphers that aren’t supported by CloudFront.
- There’s an SSL negotiation failure because the SSL certificate on the origin is expired or invalid, or because the certificate chain is invalid.
- There’s a host header mismatch in the SSL negotiation between your CloudFront distribution and the custom origin.
- The custom origin isn’t responding on the ports specified in the origin settings of the CloudFront distribution.
- The custom origin is ending the connection to CloudFront too quickly.
The sheer number of visitors can also often overwhelm IT systems and unfortunately cause server to malfunction as happened this morning.
How Did Labour Recover The Website?
Labour haven’t confirmed exactly how the site is recovered – and our expectation would be that, in line with usual practice of most businesses, they will not be making a comment on the recovery, other than to maybe confirm all is OK now.
In all likelihood, the Labour infrastructure is hosted on a cloud based provider – as Labour are using Cloudfront this is likely to be Amazon Web Services. As part of the AWS setup you can configure something called auto-scaling. This ensures that you can scale up when demand is high and scale down when it’s not.
Auto Scaling Sounds Great – So Why Did It Go Down?
Auto scaling is indeed fantastic – but it’s not a cure all. And in the case of a significant event, such as a big announcement, the surge in traffic can be extreme and fast occurring.
Auto scaling is fast, but not instantaneous. There is lag between a new system being requested and the system being available to serve the website.