Introducing Proxygen, Facebook’s C++ HTTP framework

This post announces the open-sourcing of Proxygen, a C++ HTTP framework developed by Facebook. Proxygen supports HTTP/1.1, SPDY/3, SPDY/3.1, and is developing HTTP/2 support. It is designed as a high-performance, easy-to-integrate framework with sensible defaults, differentiating itself from highly configurable servers like Apache and Nginx. The motivation for building Proxygen included deep integration with Facebook infrastructure (e.g., Thrift, ODS), code reuse for event-driven networking libraries, addressing scale limitations of existing stacks, and implementing specific features like SPDY, WebSockets, and custom load-scheduling algorithms. The architecture is described as a four-part abstraction: session, codec, transaction, and handler, enabling support for multiplexing protocols. It utilizes C++ features, Thrift, and Folly, and employs non-blocking I/O with epoll for efficiency. An echo server example demonstrates its usability and performance, with benchmarks showing efficiency for binary protocols. The impact highlights Proxygen's role in rapid feature iteration and experimentation, such as deploying HPACK on SPDY. The post also mentions the open-sourcing of Thrift alongside Proxygen.