Why HTTP/2, TLS 1.3, ECC & Brotli Matter for Faster, Secure Web Servers
This article explains the core features of HTTP/2, TLS 1.3, ECC and Brotli, shows how they improve performance and security, and provides practical nginx configuration steps to enable these modern web technologies.
HTTP/2
HTTP/2 (Hypertext Transfer Protocol 2.0) is the next‑generation HTTP protocol developed by the IETF HTTP/2 working group, succeeding HTTP/1.1 and derived from SPDY.
Key features include:
Binary framing
Header compression
Flow control
Multiplexing
Request priority
Server push
Binary Framing
Binary framing adds a layer between the application and transport layers, splitting all communication into small binary frames. A frame is the smallest unit and contains a header, stream identifier, priority, and payload.
Frame types are:
DATA – carries HTTP message bodies
HEADERS – carries header fields
SETTINGS – negotiates client‑server configuration
WINDOW_UPDATE – adjusts flow‑control windows
PRIORITY – sets or updates resource priority
RST_STREAM – signals abnormal stream termination
PUSH_PROMISE – server‑push permission
PING – round‑trip time measurement
GOAWAY – informs the peer to stop creating new streams
Messages consist of one or more frames; streams are virtual channels identified by unique IDs (odd for client‑initiated, even for server‑initiated).
Header Compression
HTTP/2 uses a header table and the HPACK compression algorithm to avoid sending full header fields on every request, reducing overhead especially on mobile networks.
Flow Control
Flow control is per‑connection and per‑stream, based on WINDOW_UPDATE frames, allowing each endpoint to advertise how many bytes it is willing to receive.
Multiplexing
Multiple independent streams share a single TCP connection, eliminating head‑of‑line blocking present in HTTP/1.1.
Request Priority
Each stream can carry a 31‑bit priority value, enabling clients to hint the order in which resources should be delivered.
Server Push
Server push lets the server proactively send additional resources (e.g., CSS, JS) associated with a client request using PUSH_PROMISE frames.
TLS 1.3
TLS 1.3, standardized in RFC 8446, introduces PSK key exchange, 0‑RTT data, removes legacy ciphers and hash algorithms, encrypts most handshake messages, and reduces the handshake to one round‑trip, improving latency.
Enabling TLS 1.3 in nginx requires OpenSSL 1.1.1+, nginx 1.13+, and compile‑time flags such as
--with-openssl-opt=enable-tls1_3and the
ssl_protocols TLSv1.3directive. The
ssl_early_data ondirective enables 0‑RTT.
ECC
Elliptic Curve Cryptography (ECC) provides comparable security to RSA with much shorter keys, making it suitable for mobile devices and reducing CPU, storage, and bandwidth usage.
Advantages include better performance, stronger security per bit, and lower hardware requirements, though ECC certificates may require commercial‑grade issuance and older clients may lack support.
Brotli
Brotli is a lossless compression algorithm introduced by Google in 2015. It outperforms gzip, achieving higher compression ratios even at low compression levels, and requires HTTPS support in nginx via the ngx_brotli module.
To enable Brotli, add the module source, compile nginx with
--add-module=/path/to/ngx_brotli, and configure the appropriate directives.
Optimizing HTTPS with these technologies can significantly improve web performance and security.
Efficient Ops
This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.