Product knowledge · Beginner → Advanced · HTTP versions

Choosing an HTTP version chooses how the listener accepts connections.

Routes and handlers do not need to be rewritten when the HTTP version changes. The listener, TLS, network port and verification path change. CoAkka HTTP Runtime 2.3.2 serves exactly the declared choice; it does not silently downgrade an invalid configuration.

01 · Beginner · Choose for the workload

HTTP/1.1 is the starting point; a newer version is not automatically a better fit.

HTTP/1.1 · Baseline

Simple and widely compatible

Use it for the first lesson, ordinary APIs and WebSocket on a standalone listener. Run plaintext during local development or TLS in deployment.

HTTP/2 · Advanced

Many requests on one connection

Useful when concurrent requests share one service. CoAkka HTTP Runtime serves h2 over TLS; the public profile does not teach cleartext h2c.

HTTP/3 · Advanced

QUIC over UDP

Useful when evaluating HTTP across latent or changing networks. It needs an HTTP/3 client, TLS 1.3 and an end-to-end UDP path.

Practical rule: if there is no concrete problem for HTTP/2 or HTTP/3 to solve, keep HTTP/1.1 and measure the real workload first. Do not migrate because the number is larger.

02 · What stays and what changes

Business code stays; the deployment boundary changes.

AreaStays the sameChanges by version
ApplicationRoutes, path/query/header/body, handlers, responses and authorization.It should not guess the transport version.
ListenerAddress, port and limits are still declared before start.protocol, security and credential material.
NetworkThe service still has an explicit endpoint.HTTP/1.1 and HTTP/2 use TCP; HTTP/3 uses UDP.
VerificationAlways send a real request and check the response.The client must force the intended version and prove its negotiation or handshake.

03 · Before start

Four conditions must all hold.

1

The package has the capability

Read capabilities from the exact loaded 2.3.2 package. An API enum is configuration vocabulary, not target-support evidence.

2

Security is valid

HTTP/1.1 permits plaintext or TLS/mTLS. HTTP/2 and HTTP/3 require TLS or mTLS with a complete credential set.

3

The network path matches

Open TCP for HTTP/1.1 and HTTP/2, and UDP for HTTP/3. Containers, firewalls, load balancers and cloud rules must preserve that port type.

4

The client speaks that version

A browser can hide fallback. The lab uses a client that forces one HTTP version and exposes the negotiation result.

04 · Construction-time configuration

Choose one protocol or use MultiProtocol for all 3.

HTTP/1.1  → TCP listener → plaintext or TLS/mTLS
HTTP/2    → TCP listener → TLS/mTLS → ALPN h2
HTTP/3    → UDP listener → TLS 1.3/mTLS → h3
protocol
Select HTTP_1_1, HTTP_2 or HTTP_3. An initialized configuration defaults to HTTP/1.1.
security
Select plaintext, TLS or mTLS. Plaintext is invalid for HTTP/2 and HTTP/3 in the public 2.3.2 profile.
bind address + port
Define the endpoint. Port 0 is convenient in a local test; deployment owns production endpoints.
Credential
HTTP/2 and HTTP/3 require a nonzero generation, credential ID, certificate chain and private key. mTLS also needs trust roots.

No hidden fallback. A standalone HTTP/2 listener is h2-only. An HTTP/3 listener does not create a TCP fallback or publish Alt-Svc. When several paths are required, deployment creates and verifies each explicit endpoint.

Advanced · MultiProtocol

One HTTPS URL for all 3 versions

Use this when older and newer clients need the same route. CoAkka HTTP Runtime opens TCP and UDP on the same port. TLS negotiates HTTP/1.1 or HTTP/2 over TCP; QUIC uses UDP for HTTP/3. A TCP-only firewall path can still serve HTTP/1.1 and HTTP/2, but cannot prove HTTP/3 works.

Enable MultiProtocolConnector 2.3.2 or SDK 2.3.0

Select MultiProtocol when creating the listener. Go, Node.js, Bun, Python, Java, Kotlin, C# and Swift expose it. C and C++ use the SDK's Listener V1 API. All 3 protocols use the same address and port number.

Use MultiProtocol for buffered requests and responses. Choose a standalone listener for streaming, WebSocket, mTLS or certificate reload. If clients discover HTTP/3 via Alt-Svc, configure the announcement in the application or deployment.

05 · Combinations to remember

Some 2.3.2 features do not span every version.

WebSocket uses a standalone listenerHTTP/1.1 uses Upgrade. HTTP/2 and HTTP/3 use Extended CONNECT.

Core 2.3 supports WebSocket on standalone listeners for all 3 protocols. An HTTP/2 or HTTP/3 client must support Extended CONNECT. The first WebSocket exercise uses HTTP/1.1.

A version change needs replacementThe protocol is fixed when the service is created.

Create a new service at a distinct endpoint, start it, read effective facts, send a real request, and only then add it to ingress. Withdraw and close the old service within a finite budget.

HTTP/3 needs discovery and fallback policyThe runtime does not decide how traffic discovers the QUIC endpoint.

Ingress or application deployment owns DNS, Alt-Svc, TCP fallback and rollout. Verify the real UDP path; successful start does not prove an external client can reach it.

06 · Failures by stage

“HTTP/2 or HTTP/3 does not work” must become a specific failure.

SymptomCheckAction
Start is refusedMissing capability, plaintext HTTP/2/3, malformed PEM, key mismatch or missing credential.Fix the declaration or choose a capable package/target; never silently fall back.
TLS handshake failsCA, hostname, validity dates, key match or client certificate.Fix trust or identity; do not treat -k as evidence.
The client reports HTTP/1.1Wrong endpoint/proxy or a client that did not force the version.Call the listener directly, force the version and inspect ALPN/response output.
HTTP/3 times outBlocked UDP, wrong port mapping, a client without HTTP/3 or absent discovery.Check each network layer and test client support first.
WebSocket is rejectedThe URL uses MultiProtocol, or the client lacks Extended CONNECT.Use a standalone listener with a client for the chosen protocol.

07 · Next

Practise each version, then compare.