Generated by GPT-5-mini| nghttp2 | |
|---|---|
| Name | nghttp2 |
| Developer | Tatsuhiro Tsujikawa |
| Released | 2012 |
| Operating system | Unix-like; Microsoft Windows |
| Licence | MIT License |
nghttp2 nghttp2 is an open-source implementation of the HTTP/2 protocol and associated utilities, developed primarily by Tatsuhiro Tsujikawa. It provides a client and server library, command-line tools, and bindings used across networking stacks and web infrastructure projects. The project interacts with ecosystems such as OpenSSL, LibreSSL, GnuTLS, and integrates with web servers and proxies exemplified by Apache HTTP Server, Nginx, and HAProxy.
nghttp2 implements the binary framing and multiplexing semantics defined in RFC 7540 and related RFC 7541 semantics for header compression via HPACK. The software forms part of broader efforts around HTTP/2 adoption alongside projects like Google Chrome, Mozilla Firefox, and server implementations from Microsoft and LiteSpeed Technologies. It is used in contexts that include reverse proxies, content delivery networks such as Akamai Technologies, and cloud providers like Amazon Web Services and Google Cloud Platform.
nghttp2 exposes features that map to core HTTP/2 capabilities: stream multiplexing, stream prioritization, header compression with HPACK, flow control, and settings negotiation as in RFC 7540. It supports TLS integration with libraries like OpenSSL and BoringSSL for secure connections, ALPN negotiation used by Let's Encrypt and IETF TLS Working Group deployments, and server push mechanics similar to patterns used by Google for resource preloading. Utilities include the nghttp client and nghttpd server tools, which serve as reference implementations in interoperability testing alongside suites maintained by IETF HTTP Working Group contributors.
The architecture centers on a core framing engine that translates HTTP/2 frames into API events and callbacks. Components include a session layer managing connection state, stream state machines akin to those in RFC 7540, HPACK encoder/decoder modules, and TLS adapters interfacing with OpenSSL, LibreSSL, and GnuTLS. The codebase organizes client-side tools, server-side daemons, and helper libraries which have been integrated into stacks like cURL, Node.js native modules, and reverse proxy integrations seen in Envoy (software).
nghttp2 is implemented in C with a focus on portability across POSIX-compliant systems and Microsoft Windows. It provides a clear C API for session management, frame submission, and callback registration; higher-level bindings exist for Python, Ruby, and Rust through third-party projects and community-maintained wrappers. The library exposes functions for submitting HEADERS and DATA frames, handling GOAWAY semantics, and integrating with event loops such as those in libevent and libev. Interoperability testing occurs against implementations from Nginx, Apache HTTP Server, and browser stacks including Mozilla Firefox.
Benchmarks for nghttp2 focus on HTTP/2 throughput, latency under multiplexed streams, and TLS handshake overhead when paired with OpenSSL or BoringSSL. Comparative studies often reference results from wrk, ApacheBench, and in-house tools used by Cloudflare and Akamai Technologies. Performance characteristics emphasize reduced connection churn versus HTTP/1.1 implementations in NGINX and HAProxy, with server push and prioritization effects measured in synthetic workloads inspired by Google performance guidelines and W3C optimization recommendations.
nghttp2 is adopted in client libraries such as cURL, in proxy stacks like Envoy (software), and in experimental or production servers used by companies including Amazon Web Services and Cloudflare. Use cases include HTTP/2 gatewaying for microservices architectures common in Kubernetes deployments, integration into continuous delivery pipelines employed by GitHub, and CDN edge stacks operated by Fastly. It’s employed in testing and interoperability labs maintained by the IETF HTTP Working Group and by browser vendors including Google and Mozilla for protocol conformance validation.
The project is hosted with community contributions guided by its maintainer, Tatsuhiro Tsujikawa, and adheres to an open development model similar to GitHub workflows used by projects such as Linux kernel-adjacent tooling. nghttp2 is released under the MIT License, facilitating inclusion in proprietary and open-source products used across ecosystems involving Red Hat, Debian, and Ubuntu. Development discussion and specification alignment often reference IETF drafts, RFC 7540, and collaborative implementations contributed by companies like Google and Facebook.