-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Implement HPack dynamic compression #4715
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
Comments
Impact of header compression on gRPC responses: gRPC result from Kestrel, length 466
gRPC result from C implementation, length 244
Headers are 8 bytes for C implementation and 123 bytes from Kestrel. |
Also static compression #4716 I expect we could get rid of these strings statically:
I'm a bit surprised they dynamically intern the date value. |
C implementation doesn't include the date header. I'm guessing it is a micro-optimization. |
I'm just going to leave a note here for the future implementation. I ran into this issue with nginx reverse proxing gRPC (HTTP/2) to a dotnet service through a Kubernetes Ingress. I originally thought it was a dotnet issue, but figured out that it was actually the linkerd service mesh.
This seems to have been an issue with other HTTP/2 implementations, notably golang's gRPC library and I just wanted to also note it here so it doesn't get overlooked. |
Looking at another GRPC trace, interning the date header starts to make sense. You can get a lot of requests through in 1 second.
Also the content-type value |
This feels bigger than the largest allowed cost ("Medium"). Does that sound accurate? If so, we should look at breaking this up, or defer it to a future release. |
There are several degrees to this one. James is going to start with a few simple approaches and see what happens. Those are still within the Medium level. |
Today Kestrel does not use any of the HPack compression features when serializing response headers. Dynamic compression is an advanced option we could look into.
Likely candidates:
Note the client gets more benefits from dynamic compression, especially browsers, they send a lot of repetitive headers. HttpClient would get some benefit for things like :authority, :method, :scheme, accept-encoding,
Related work:
The text was updated successfully, but these errors were encountered: