Facebook Open-Sources C++ HTTP Library Collection Proxygen

Facebook’s open-source train keeps rolling, as the social network announced the release of Proxygen, a collection of C++ HTTP libraries, which also includes an easy-to-use HTTP server.

ProxygenLogo650Facebook’s open-source train keeps rolling, as the social network announced the release of Proxygen, a collection of C++ HTTP libraries, which also includes an easy-to-use HTTP server.

Software engineers Daniel Sommermann and Alan Frindell announced in a post on the Facebook engineering blog that Proxygen supports HTTP/1.1, SPDY/3 and SPDY/3.1, and support for HTTP/2 is being developed.

They also described the motives behind Proxygen:

Proxygen is not designed to replace Apache or nginx — those projects focus on building extremely flexible HTTP servers written in C that offer good performance but almost overwhelming amounts of configurability. Instead, we focused on building a high-performance C++ HTTP framework with sensible defaults that includes both server and client code and that’s easy to integrate into existing applications. We want to help more people build and deploy high performance C++ HTTP services, and we believe that Proxygen is a great framework to do so. You can read the documentation and send pull requests on our Github site.

Proxygen began as a project to write a customizable, high-performance HTTP(S) reverse-proxy load balancer nearly four years ago. We initially planned for Proxygen to be a software library for generating proxies, hence the name. But Proxygen has evolved considerably since the early days of the project. While there were a variety of software stacks that provided similar functionality to Proxygen at the time (Apache, nginx, HAProxy, Varnish, etc.), we opted go in a different direction.

Proxygen has allowed us to rapidly build out new features, get them into production and see the results very quickly. As an example, we were interested in evaluating compression format HPACK. However, we didn’t have any HTTP/2 clients deployed yet, and the HTTP/2 spec itself was still under heavy development. Proxygen allowed us to implement HPACK, use it on top of SPDY and deploy that to mobile clients and our servers simultaneously. The ability to rapidly experiment with a real HPACK deployment enabled us to quickly understand performance and data efficiency characteristics in a production environment. As another example, the internal configuration systems at Facebook continue to evolve and get better. As these systems are built out, Proxygen is able to quickly take advantage of them as soon as they’re available. Proxygen has made a significant positive impact on our ability to rapidly iterate with our HTTP infrastructure.