No matter how you might feel about Facebook, it's difficult to not be in awe of its technology. Five years ago that wasn't so much the case, with most users experiencing almost daily downtime as the system sputtered and hiccuped. Not anymore. The only problem I've had with the site in recent years is that it wastes way too much of my time.
This is an impressive feat considering the heavy lifting necessary to put together a Facebook page. And the pages are rendered at breakneck speed. According to digital marketing firm Zephoria, Facebook accounts for one in five page views in the US, with 510,000 comments posted every minute. That's a lot of computing.
How do they do it? Partly through the use of a versatile routing platform the company developed in-house called open/R.
Today the social network open sourced open/R, making it free to use by anyone who might be designing applications that will require routing at the speed of Facebook. It's being released under the "permissive" MIT license, which allows it to be used in both open source and proprietary projects. This isn't unusual. The company has open sourced so much of its software that you could come close to starting your own Facebook clone if you wished. That clone can even run on the same hardware and in in similarly designed data centers, as much of that intellectual property has been open sourced too through the Open Compute Project.
The open/R platform has already proven itself in a variety of use cases. In fact, it wasn't originally developed for use on Facebook prime, but for its Terragraph project, a multi-node wireless system intended to bring high-speed internet to dense urban areas. Terragraph's first planned implementation is in San Jose, California, which recently entered the testing phase.
"We've just finished putting 50 devices up on poles and traffic lights around the core of our city, and we're currently in engineering tests to test the network and its ability to handle traffic," Kip Harkness, San Jose's deputy city manager for civic innovation, told IoT Agenda. "If this works as we're hoping, you could be downtown watching a 4K high-def movie on your laptop and be walking around and never hit a glitch."
To accomplish this, Facebook designed open/R as a distributed networking platform to run on top of the Terragraph network, to deal with its large scale and rapid changes while also allowing for fast extensibility.
The project initially drew interest primarily from networkers involved in wireless technology, but Facebook engineers believed it could address some issues within the social site's backbone, its core network.
"While the backbone is an entirely different domain from a metro wireless mesh (the backbone has thousands of miles of fiber that span continents, cross oceans, and circle the globe), from a networking perspective it faces similar problems," the company wrote in a blog published today. "Our new Express Backbone required control of traffic and routing across many widely different paths and rapid response to failures."
Since then Facebook has found another use, on its data center fabric. This has provided a testing ground that's much different from its other uses, in an environment that's highly uniform and densely meshed, with many possible paths to account for and leverage.
In other words, it's tested and tried in a variety of scenarios and good to go for developers with a need.
It's also under active development with an expanding feature list:
- IPv6 first, leveraging IPv6 link-local addresses to achieve zero-touch configuration. No special network configuration is required.
- Support for native IPv4 routing when needed.
- Ad hoc network prefix allocation and IP configuration for nodes in the network from a larger aggregate prefix.
- A graceful restart that enables live software updates without disrupting traffic forwarding.
- Support for draining and undraining for nodes and links.
- Dynamic link RTT metrics computed and smoothed out from active probes.
- The ability to set custom metric values, statically or dynamically.
- Fast network convergence with smart back-off timers for link or node failures.
- Continuous health checking of the network through live reachability probing.
- An API for integration with centralized controllers.
- A Python library to interact with all the main Open/R processes.
- The ability to extend the platform to disseminate all sorts of additional information, and even to introduce enhancements or variations to the path computation logic.
"While traditional routing protocols have been instrumental to the progress of technology in the past few decades, we are approaching the point where networks need to evolve even faster," Facebook said. "Open/R is an open platform that makes it easy to rapidly test and deploy new ideas at scale, making our networks more efficient, quicker to deploy, and easier to manage."
All that, and it's free too -- available on GitHub. Such a bargain.