Skip to content

Should Sōzu re-encrypt TLS frames in HTTP2? #888

Closed as not planned
Closed as not planned

Description

@Keksoj

Most HTTP2 traffic is encrypted with TLS (known as H2).

Until now and with HTTP/1.1, it is Sōzu's job to:

  • decrypt HTTP frames that come in Layer 4
  • find out to which domain name they are intended on Layer 7
  • forward the decrypted HTTP frames

With the introduction of HTTP2, the question arises: will most backends support unencrypted HTTP2 traffic over TCP, also known as H2C? defined here

In other words: do most web servers and web frameworks support H2C?

Or should Sōzu re-encrypt HTTP2 traffic?


Update — 2026-04-24

Resolved by the design shipped on feat/h2-mux (PR #1209):

  • Frontend: TLS is terminated at Sōzu via rustls. ALPN advertises ["h2", "http/1.1"] (H2 preferred), so H2-capable clients negotiate h2 and H/1.1 clients fall back transparently.
  • Backend: defaults to H2C (cleartext) over TCP. cluster.http2 = true enables H2 towards the upstream without TLS wrapping. This matches the common deployment pattern where TLS terminates at the proxy and plaintext is used inside a trusted backend network.
  • Re-encryption to backends: intentionally out of scope of PR feat(h2): HTTP/2 support via unified Mux session layer #1209 and tracked separately in h2: support TLS for backend (upstream) connections #1218 ("h2: support TLS for backend (upstream) connections").

Suggest closing this issue as answered, with #1218 carrying the backend-TLS follow-up.

Activity

  1. added this to the HTTP2 milestone on Feb 13, 2023
  2. FlorentinDUBOIS commented on May 2, 2026

    @FlorentinDUBOIS
    Collaborator

    Closing with the architectural answer. Sōzu uses the standard reverse-proxy model: terminate TLS at the frontend (rustls), reconnect to the backend (h1/h2/h2c, with TLS coming via #1218 in v2.1.0). There is no "re-encrypt the same TLS session" mode — that would require shared TLS keys with the backend, which is not how rustls/openssl is used. The opposite mode — pure SNI passthrough with no termination — is tracked separately in #151.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions