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

docs(readme): fix gRPC example #664

Merged
merged 1 commit into from
Aug 29, 2022
Merged

Conversation

bastianccm
Copy link
Contributor

@bastianccm bastianccm commented Aug 29, 2022

tldr: envoy uses nghttp2, which reports invalid frame: Violation in HTTP messaging rule on stream 1

Long Story: If you use this example in a server node.js process in Kubernetes with an Istio Service Mesh, envoy will report something like

│ 2022-08-29T12:53:55.616404Z    debug    envoy http2    [C398] updating connection-level initial window size to 268435456                                                                                                                                                                                                   │
│ 2022-08-29T12:53:55.616663Z    debug    envoy http2    [C398] invalid frame: Violation in HTTP messaging rule on stream 1

if you try to call an gRPC request. Sadly, there is basically no documentation at all available for this behaviour.
The Promise will reject with Connection dropped and no other details.
Prepending the / to the path ensures that the behaviour is not violating the HTTP/2 standard, because appearently node http2 package does allow the path to not start with /.
See https://www.rfc-editor.org/rfc/rfc7540#section-8.1.2 8.1.2.3 and https://www.rfc-editor.org/rfc/rfc3986#section-3.3

The ":path" pseudo-header field includes the path and query parts of the target URI (the "path-absolute" [...]

If you develop locally against a different gRPC server, such as the go grpc implementation, this error does not occur, go will accept the missing / and simply work.

Thank you for this great project, really appreciate your work!

tldr: envoy uses nghttp2, which reports `invalid frame: Violation in HTTP messaging rule on stream 1`
@stephenh
Copy link
Owner

Ah wow, yeah that looks cryptic @bastianccm ; thanks for the update!

@stephenh stephenh merged commit eef42fe into stephenh:main Aug 29, 2022
@bastianccm bastianccm deleted the patch-1 branch August 29, 2022 16:52
stephenh added a commit that referenced this pull request Sep 3, 2022
* origin/main:
  docs(readme): fix gRPC example (#664)
  chore(release): 1.123.1 [skip ci]
  fix: Bump ts-poet to use @dprint/typescript. (#662)
  chore(release): 1.123.0 [skip ci]
  feat: Bump ts-poet for dprint, also use tsx (#660)
  docs: Add buf opt example to readme
@stephenh
Copy link
Owner

stephenh commented Sep 3, 2022

🎉 This PR is included in version 1.124.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants