HTTP and gRPC/H2 protocols on the SAME TCP port

I have an application that exposes two listening ports, one for REST over HTTP and another via gRPC over HTTP/2.

Currently we have a single transparent hardware Load balancer URL that forwards ALL external traffic to a single internal port (a linkerd configured as a API gateway) on a set of servers. Clients want use the hardware load Balancer URL for both HTTP and gRPC calls.

  1. Does linkerd support http and h2 protocols on the same port, ala protocol detection if they are defined in the configuration (I think not, but …)?
  2. If (1) is True, will linkerd respect the Connection Upgrade header from an http call and redirect to the h2 protocol router?
  3. If (1) is False, and we only declare h2 protocol router entries , will linkerd serve clients that do not ask for a Connection Upgrade.

I think the best would be to have different listening ports for the protocols, but I have to explore all possibilities.

1 Like

Hi @pjp,

  1. linkerd supports one protocol per port. if you want to support HTTP and HTTP/1, you’ll need to configure two routers, one for each protocol.
  2. linkerd will serve clients that do not ask for a connection upgrade, a bit more detail here:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.