3

I try to solve this use case:

  1. browser client connects to the Kong API Gateway by HTTP/2.
  2. Kong proxy the HTTP/2 connection to the backend microservice and keep it open.
  3. The use case result should be, that client is connected via HTTP/2 with the microservice.

It seems, Kong accept HTTP/2 call from the client, but than call the microservice by common HTTP.

Is there any solution for this case? I know Kong should be able to keep connection with the upstream in gRPC case.

Setup in docker compose:

#In docker-compose.yml
....
# I call running container at localhost:9081 with http2
KONG_PROXY_LISTEN: 0.0.0.0:9081 http2, 0.0.0.0:9082 http2 ssl

Setup in kong configuration file (using DBless)

#In Kong.yml
services:
  - name: target-service
  host: target-api-test #docker container name
  port: 9000
  routes:
    - name: target-api-route
      paths:
        - /microservice-api
Lukas Bares
  • 349
  • 3
  • 12

1 Answers1

0

I think this is primarily because nginx doesn't have support for HTTP/2 for upstream servers as specified here.

Q: Will you support HTTP/2 on the upstream side as well, or only support HTTP/2 on the client side?

A: At the moment, we only support HTTP/2 on the client side. You can’t configure HTTP/2 with proxy_pass.

Usman Shahid
  • 101
  • 2
  • 5