Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP2 support in router #2953

Merged
merged 42 commits into from
Jul 11, 2022
Merged

HTTP2 support in router #2953

merged 42 commits into from
Jul 11, 2022

Conversation

Amila-Rukshan
Copy link
Contributor

@Amila-Rukshan Amila-Rukshan commented Jun 6, 2022

Purpose

This is to support http2 protocol support for upstream connections. Currently envoy only support http2 with prior knowledge (http2_protocol_options section in https://www.envoyproxy.io/docs/envoy/v1.20.3/api-v3/config/cluster/v3/cluster.proto#config-cluster-v3-cluster). Hence swagger vendor extension added to enable http2 connections in upstream clusters of that API.

Following extension property should be added to OAS definition.

x-wso2-http2-backend-enabled: true

NOTE: Once this ticket (envoyproxy/envoy#1502) is done in envoy side, we can remove this config by enabling both http1 and http2 (http2 upgrade and direct http2 calls) by default.

Envoy listener supports both http1, http2 with and without prior knowledge. Default to AUTO configuration where both http1 and http2 connections are allowed. By adding following configuration in config.toml, it can be set to a specific protocol version.

[router]
  listenerCodecType = "HTTP2" # AUTO, HTTP1, HTTP2 

Issues

Fixes #2904

Automation tests

  • Unit tests added: No
  • Integration tests added: Yes

Tested environments

Tested
OS: Darwin
Env: Docker

Observations

Envoy was tested with a sample http2 server with server push. Both upstream and downstream http2 connections are established using http2. When browser tries to send h2 upgrade call it fails to create the connection. Later find out that the server push feature is not implemented yet as mentioned in this file: https://github.com/envoyproxy/envoy/blob/main/api/envoy/api/v2/core/protocol.proto#L269

// 1. SETTINGS_ENABLE_PUSH (0x2) is not configurable as HTTP/2 server push is not supported by

Maintainers: Check before merge

  • Assigned 'Type' label
  • Assigned the project
  • Validated respective github issues
  • Assigned milestone to the github issue(s)

@Amila-Rukshan Amila-Rukshan changed the title Http2 support in router HTTP2 support in router Jun 6, 2022
@VirajSalaka
Copy link
Contributor

LGTM

@pubudu538 pubudu538 merged commit 5600655 into wso2:main Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP2 Support
7 participants