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

NGINX as a reverse proxy fails keep alive #303

Closed
rokadias opened this issue Mar 27, 2020 · 4 comments
Closed

NGINX as a reverse proxy fails keep alive #303

rokadias opened this issue Mar 27, 2020 · 4 comments

Comments

@rokadias
Copy link

Bug Report

Version

tonic: v0.1.1

Platform

debian

Description

I came across this when working with nginx as a reverse proxy in front of a tonic server. Though, I don't think this is specific to nginx. We have a reverse proxy to do tls termination and routing within a kubernetes cluster to a tonic server. However it intermittently fails with 502 errors. The errors in nginx points to lack of support for SETTINGS_HEADER_TABLE_SIZE from the http2 specification.

A snippet of the comment from the nginx bug:

nginx explicitly announces that it does not support dynamic header compression by sending the SETTINGS_HEADER_TABLE_SIZE value set to 0, see ​here.

https://trac.nginx.org/nginx/ticket/1538#ticket

Here's the http2 specification for SETTINGS_HEADER_TABLE_SIZE: https://tools.ietf.org/html/rfc7540#section-6.5.1

So I think any client that doesn't support dynamic header compression will run into this same issue.

The error we're seeing in nginx is " upstream sent invalid http2 table index: 63 while reading response header from upstream" which pointed me to this issue: kubernetes/ingress-nginx#2405

Which references the fix that the go grpc server implemented: https://github.com/grpc/grpc-go/pull/2045/files

@LucioFranco
Copy link
Member

cc @seanmonstar ^ seems hyper/h2 related.

@seanmonstar
Copy link
Member

Filed upstream hyperium/h2#458

@rokadias
Copy link
Author

We've updated our h2 crate to 0.2.4 and verified that issue is no longer occurring with nginx! 🎊

Thanks so much! I really appreciate it.

@LucioFranco
Copy link
Member

@rokadias great thank you for the quick feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants