Skip to content

Track WebSockets over HTTP/2 support #14054

Description

@mkurz

Play currently supports WebSockets through the existing HTTP/1.1 upgrade path. Even when HTTP/2 is enabled for a server backend, WebSocket handling still depends on backend support for bootstrapping WebSockets over HTTP/2.

RFC 8441 defines this mechanism using HTTP/2 Extended CONNECT:

https://www.rfc-editor.org/rfc/rfc8441.html

Upstream Tracking

Pekko HTTP:

Netty:

Current State

Pekko HTTP backend

Play’s Pekko HTTP backend can enable HTTP/2, but Pekko HTTP does not currently expose WebSockets over HTTP/2 via RFC 8441.

Until Pekko HTTP supports RFC 8441, Play cannot support WebSockets over HTTP/2 on this backend without implementing or bypassing Pekko HTTP internals.

Netty backend

Netty has some low-level RFC 8441 / Extended CONNECT building blocks, but high-level WebSocket-over-HTTP/2 support is still tracked upstream.

Expected Outcome

Once backend support exists, Play should investigate exposing WebSockets over HTTP/2 without requiring application code changes where possible.

Likely work items:

  • verify RFC 8441 support in the backend
  • add integration tests for WebSockets over HTTP/2
  • document backend-specific support and limitations
  • ensure abnormal stream termination maps cleanly to Play’s WebSocket close behavior
  • check compatibility with existing raw and typed WebSocket APIs

Notes

This is currently a tracking issue. There is no immediate Play-side implementation path until the relevant backend support exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions