Skip to content

HTTP2 or HTTP3 support #5213

@dscso

Description

@dscso

Steps to reproduce

I just setup a continuwuity matrix server with a Caddy reverse proxy. I have noticed that for some reason all incoming requests are http1.1. Additionally, they don't seem reuse previously established TLS connections.

When using the Element webclient, all connections are HTTP3.

Could be however, that I just have to wait for the next release matrix-org/matrix-rust-sdk#6053. If this is the case, just close the issue.

My caddy server log looks like this

{
    "level": "info",
    "ts": 1773651009.7776496,
    "logger": "http.log.access.log4",
    "msg": "handled request",
    "request": {
        "remote_ip": "xxxx",
        "remote_port": "51370",
        "client_ip": "xxxx",
        "proto": "HTTP/1.1",
        "method": "POST",
        "host": "matrix.xxxx.net",
        "uri": "/_matrix/client/unstable/org.matrix.simplified_msc3575/sync?pos=1133&timeout=30000",
        "headers": {
            "User-Agent": ["Element X/26.03.2 (iPhone 12; iOS 18.6; Scale/3.00)"],
            "Accept-Encoding": ["gzip"],
            "Content-Length": ["1186"],
            "Content-Type": ["application/json"],
            "Authorization": ["REDACTED"],
            "Accept": ["*/*"]
        },
        "tls": {
            "resumed": false,
            "version": 771,
            "cipher_suite": 49195,
            "proto": "",
            "server_name": "matrix.xxxx.net"
        }
    },
    "bytes_read": 1186,
    "user_id": "",
    "duration": 0.003186439,
    "size": 2815,
    "status": 200,
    "resp_headers": {
        "Content-Security-Policy": ["default-src 'none';frame-ancestors 'none';form-action 'none';base-uri 'none';sandbox"],
        "X-Frame-Options": ["DENY"],
        "Content-Type": ["application/json"],
        "Permissions-Policy": ["interest-cohort=(),browsing-topics=()"],
        "X-Content-Type-Options": ["nosniff"],
        "Origin-Agent-Cluster": ["?1"],
        "Via": ["1.1 Caddy"],
        "X-Xss-Protection": ["0"],
        "Date": ["Mon, 16 Mar 2026 08:50:09 GMT"],
        "Vary": ["origin, access-control-request-method, access-control-request-headers", "accept-encoding"],
        "Access-Control-Allow-Origin": ["*"],
        "Alt-Svc": ["h3=\":443\"; ma=2592000"]
    }
}

Outcome

I think it would be quite good for performance to reuse already established TLS connections, or even use HTTP3 for better mobile performance. Every TLS handshake is overhead, especially in scale, that can be easily avoided.

Your phone model

iPhone 12

Operating system version

18.6

Application version

26.03.2

Homeserver

continuwuity v0.5.6

Will you send logs?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions