r/ProgrammerHumor • • Dec 14 '20

Google Engineers right now!

Post image
53.7k Upvotes

550 comments sorted by

View all comments

3.1k

u/CursedAuroran Dec 14 '20

Godspeed to the on-call engineers

30

u/--DJDISDABEST-- Dec 14 '20

What the on call engineers do? Do they like fly on a jet to the google servers whenever google goes down?

43

u/UniqueUsername27A Dec 14 '20

For cases like this where the damage is so large, there are likely engineers constantly on site that monitor the system and can intervene when necessary. But as this was a global outage it is likely this was not about a broken server, but rather a software problem. That means likely people didn't have to go anywhere. The fact that they managed to fix it quickly also means no one can have moved very far.

Running a data center is more like running a power plant. You constantly have people checking things and going over mildly weird measurements that could indicate the next problem. Most problems are likely caught before they do any damage.

1

u/[deleted] Dec 14 '20

[removed] — view removed comment

5

u/UniqueUsername27A Dec 14 '20

It certainly can. An unexpected input may trigger a problem that was so far unknown. Most attacks on systems are based on triggering unknown bugs in ways that have consequences intended by the attacker.

The theory that they changed something is also likely. Software is constantly changing.

Problems where a system goes down globally are often also caused by cascading failures. For some reason a service stops working partially, e.g. because a datacenter has problems and disappears. I had this happen in the past because a ship had thrown an anchor into the pacific ocean and hit a fiber cable.

In such a case load balancers will detect the problem and reroute traffic. That will increase the load on the remaining locations. If the system is not designed carefully this can escalate quickly. The new traffic can overload another location, which may be slow to respond or go down entirely making load balancers shift traffic away from it to the other remaining instances, increasing traffic there again. This spirals into all replicas going into overload. This doesn't even require global traffic to exceed capacity, it can just happen because traffic bounced forth and back between data centers.

As soon as everything is overloaded it is hard to restart, as any replica recovering will instantly get all traffic and die again. The only choice now is dropping all traffic and waiting for things to recover. We call this blackholing. You cut off all users and directly serve an error page. Then traffic can start again slowly, most incoming request will still need to be denied. You can see this behavior in the recent YouTube outages. When the service starts to recover it doesn't just turn on. Engineers are letting a small amount of traffic back to the restored backend and will still return an error for everyone else. They will slowly increase the amount of allowed requests to let load balancers adapt and distribute requests globally to the recovered locations.

2

u/[deleted] Dec 14 '20

[removed] — view removed comment

4

u/Bainos Dec 14 '20

It seems that they had a component that had a limited quota (for example, the authentication system can only make a query 500 million times per hour, no more). A limit that was put there to avoid impacting other services if one starts misbehaving, but accidentally set too low. Once the quota was reached, all further requests were rejected and resulted in a failure.

That seems fairly believable as, for those kinds of components, the storage system and its security measures (including a quota) would be distributed. So if one authentication query fails in Sydney for being over the quota, a subsequent query in Paris will also fail.