Skip to content

Support for Envoy gRPC HTTP/1.1 bridge #6664

@ikhoon

Description

@ikhoon

To send gRPC response over HTTP/1, Armeria uses chunked transfer-encoding to deliver gRPC response trailers.
https://datatracker.ietf.org/doc/html/rfc9112#section-7.1.2.
This is non-standard for gRPC and some legacy L7 proxy server may not handle trailers in chucked encoding correctly.

A more HTTP/1-friendly approach alternative is gRPC HTTP/1 bridge specification defined in Envoy. This specification buffers the HTTP/2 response, copies the gRPC trailers into response headers, and then converts it into an HTTP/1 response. This improves compatibility with legacy systems, but it disables real time streaming due to buffering.

Since both approaches have trade-offs, I propose introducing an option so users can choose the appropriate mode for their network environment.

GrpcService
  .builder()
  .enableEnvoyHttp1Bridge(boolean)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions