Facebook Open Sources FriendFeed’s Web Server, “Tornado”

New Facebook hire David Recordon announced this morning that Facebook has open sourced a piece of technology it gained through the FriendFeed acquisition called Tornado. The software was a key piece of a web server the FriendFeed team originally developed to handle thousands of simultaneous connections without blocking (slowing down), making it ideal for real-time services.

tornado-chart

According to Facebook Director of Products and FriendFeed co-founder Bret Taylor, some of the distinctive features of Tornado include:

  • All the basic site building blocks – Tornado comes with built-in support for a lot of the most difficult and tedious aspects of web development, including templates, signed cookies, user authentication, localization, aggressive static file caching, cross-site request forgery protection, and third party authentication like Facebook Connect. You only need to use the features you want, and it is easy to mix and match Tornado with other frameworks.
  • Real-time services – Tornado supports large numbers of concurrent connections. It is easy to write real-time services via long polling or HTTP streaming with Tornado. Every active user of FriendFeed maintains an open connection to FriendFeed’s servers.
  • High performance – Tornado is pretty fast relative to most Python web frameworks. We ran some simple load tests against some other popular Python frameworks, and Tornado’s baseline throughput was over four times higher than the other frameworks (see image above).

Tornado continues Facebook’s tradition of open-sourcing many of the infrastructure projects it’s developed internally, including Thrift, Scribe, Hive, and many memcached enhancements. For more information, check out the Tornado home page.