Why Facebook disappeared today (or: A Concise Primer On How The Internet Works.)

This, I’m sad to say, will hopefully be a short article. I mean, I love sitting down and banging on the keyboard endlessly like an angry chimp having at a mysterious obelisk with the nearest excess jawbone, but this particular ditty is better in short, readily-digestible bites because the subject matter is moderately-to-severely arcane.

Back in 2018 I wrote this blog post for my former employer that I look back on with satisfaction and not the faintest hint of regret. Facebook is an awful company peddling a dreadful product that – while it brings flashes of genuine value to the table – mostly succeeds at demeaning and belittling all manner of social discourse and generally should go and die in a trash fire. I understand that there are differing opinions on this issue, and while I respect anyone who says otherwise they are nonetheless no longer my friend and no longer invited to my birthday party or allowed to enjoy the many entertainments afforded sensible and rational people. You get no clowns, no cake, and we’re not speaking, because you’re wrong and you’re bad, and so is Facebook.

Let’s be clear on this – when Facebook went down today, my only regret was that after a few hours it reappeared on the internet instead of quietly disappearing forever and leaving the world an ultimately happier and safer place.

So, yeah, I’m not what you’d call a fan.

Still, it can’t be denied that Facebook is a Brobdingnagian behemoth of the internet, and Brobdingnagian behemoths are not noted for their proclivity to mysteriously disappear and reappear on a whim. It takes a particular chain of events for that sort of thing to happen, and stepping through those is an illustrative and instructive process for anyone who’s interested in how the internet actually works.

Note: What follows is tremendously simplified. Yes, I understand that DNS is not a series of tubes or what have you. Don’t write me.

There are three mechanisms/sets of acronyms at play here – DNS, BGP and AS.

DNS (Domain Name System) is sort of like the telephone operator of the internet – a helpful service that turns who you want to talk to into a number that can be looked up and connected to. When you connect your computer to the internet, chances are that your ISP will – in addition to giving you an IP address – also ensure that you’re connected to their DNS server, so that when you want to go to www.facebook.com then your computer will go and send that request to that DNS server. Your ISP’s DNS server will then look at the request (i.e., “www.facebook.com”), and if it has the IP address of the destination you’re trying to get to cached then it will tell your computer what that IP address is and where to find it.

If your ISP’s DNS server doesn’t have that address cached, then it will send your inquiry on to a higher-level of DNS server that handles anything that ends with “.com”. That, in turn, will look up the address for “facebook.com” and send an inquiry to the DNS server that handles “facebook.com”, which will in turn look up “www” and finally, return the required address for “www.facebook.com” to your computer. This process takes milliseconds, and is largely invisible to you – the end user. You are then free to go and peruse anti-vaccination memes and worry about what your parents are doing on the internet. This last part occurs through the miracle of complicated internet magic.

BGP (Border Gateway Protocol) is… well, it’s the aforementioned complicated internet magic. Simply put, it’s the system responsible for mapping all the paths between the networks that comprise The Internet. Let’s not forget that we tend to talk about The Internet as a monolithic thing, whereas in fact it’s just an enormous (and I mean really enormous) collection of discreet networks all sort of bolted together in an ad-hoc and largely disorganized and chaotic fashion. BGP is used by each of these networks so that they can talk to each other in the most efficient way possible. When the aforementioned complicated ballet of DNS lookups has taken place then your ISP’s routing system consults its BGP table and figures out the shortest and fastest way of getting you to your final destination.

Another Note: There are actually two flavors of BGP that handle both internal traffic inside a network and external traffic between networks. We’re just worrying about the latter right now, because – spoiler alert – that’s what knocked Facebook down.

AS (Autonomous Systems) represent large entities or blocks of networks on the internet. Technically, they’re formalized collections of routing information, but that’s a whole other rabbit hole best avoided for now. Think of them as sort of like special addresses for large networks on the internet. State organizations. Governments. Large utilities. DNS providers, web hosting services, and big companies like, say, Facebook. Each of those entities is assigned an AS number, and at present there are about 100-150k in active use out of an available pool of about 4.2 billion. Each AS advertises its presence so that BGP tables can incorporate that information into a routing table and therefore figure out the quickest way between one place and another.

So; Facebook has an AS number that’s used by BGP so that BGP knows where to route data (including DNS data) to get to Facebook’s many fine products. It’s become increasingly clear that what may have happened is this: in the course of routine maintenance of Facebook’s BGP configuration something happened that locked out access to remote users who might be able to fix the problem. As a result, traffic on the internet was no longer able to be routed to Facebook – including DNS traffic – with the end result being that Facebook’s entire AS simply… disappeared from the world.

As of my writing this, everything seems to be back to normal. At least, inasmuch as Facebook being a functioning entity approximates normality.

Leave a Reply

Your email address will not be published. Required fields are marked *