Everything About the ‘502 Bad Gateway’ That Hit Many Websites Yesterday (2 July 2019)


Advertisements
 

Did you go online to your favourite websites yesterday, and was faced with this?

And as you went to even more websites, you saw the same thing?

You checked your Internet connection and it seemed to be fine. Why did you see this everywhere?

Have Thanos decided to target websites instead of people?

Or maybe, Levi’s has placed advertisements in many websites to promote their 502 jeans?

If you intend to brush it off as just another unsolved Internet mystery because everything’s back to normal, hold your horses.

Because we’re your BFF, we’re here to tell you what happened: in the simplest manner ever.

502 Bad Gateway

Before anything, here’s what you need to know about 502 Bad Gateway.

It’s not a pair of Levi’s jeans. Basically, it means that it’s nothing to do with your Internet connection, but the website’s server instead.

Every website is hosted on a physical server—a server looks like a CPU without a monitor. If a website has high traffic, it might take a server or several servers, while websites with low traffic would share a server with other websites.

Web hosting companies are companies with many servers that rent these server spaces to websites. There are many web hosting companies in the world, so your company’s website is probably using Web Hosting Company A while your friend’s company’s website is using Web Hosting Company B.

So, a 502 Bad Gateway usually means a problem with the website’s server, or the connection in the server.

XiaoBeach73: But many websites are down with 502 Bad Gateway, and you said companies use different web hosting companies. How can all of them go down at the same time? Did Thanos enter the web hosting world?

Well, no. Because there’s something else that separates you, the user, and the servers.

Cloudflare

The world would be a better place if everyone just goes online to Google for cat videos, but unfortunately, that’s not the case.


Advertisements
 

Most major websites place a “security” thingy “in front” of the servers for security purposes: think of it as a “filter”.

If bad actors try to hack the server (i.e. a website), that filter would know, and deny access to the hacker. An example would be a DDoS attack: a hacker can just send millions of traffic to one website to bring it down. However, the “filter” will detect that and deny access to that hacker after, say, one thousand hits.

Cloudflare is one of the more popular ones that provide this service. Not only do they have security measures, they’ll also “hide” the real IPs of the server so hackers cannot even know where to hack.

And here’s what happened yesterday.

Cloudflare Outage

Yesterday’s incident wasn’t due to Thanos’ snap in the digital world, but a Cloudflare outage.


Advertisements
 

According to them, there was a major outage that impacted all Cloudflare services globally. Just imagine all the digital locks in the world going offline; people are all stuck with that 502 error.

The outage apparently occurred for 30 minutes, but when we’re talking about most of the Internet, that’s like forever.

They claimed in their blog that “a massive spike in CPU utilization on our network. This CPU spike was caused by a bad software deploy that was rolled back. Once rolled back the service returned to normal operation and all domains using Cloudflare returned to normal traffic levels.”

The software in question is a “single misconfigured rule within the Cloudflare Web Application Firewall (WAF) during a routine deployment of new Cloudflare WAF Managed rules.”

Chim?

Chim.


Advertisements
 

Basically, as they implemented a new rule to prevent attacks, it resulted in an error that caused the downtime.

They’ve also highlighted that this wasn’t an attack.

So if you were affected yesterday, no worries; everything’s back to normal.

At least you’ve learned something, right?