[gRPC-C++] grpc-c++ client seems not to index custom headers to http2 dynamic-table?

71 views
Skip to first unread message

A-SaltedFish

unread,
Mar 22, 2024, 11:53:07 AM3/22/24
to grpc.io
I want to add a custom header in request with C++ client using “Custom-Metadata”,
and the header-value pair is fixed。
Acrrording to HTTP2, the header should be cached by client and server, and only transfer a  HPACKED header presented by a index-num . but when i check the Tcpdump data,  I found the header was not indexed at all.
the version i used : grpc-v1100. 
I checked the source code, and i found that grpc not support custom-header to be indexed.
I wander why doed grpc  c++ not  impelement this , and any project to add support for indexing custom-header?



yas...@google.com

unread,
Apr 9, 2024, 2:35:58 PM4/9/24
to grpc.io
gRPC does support HPACK. By grpc-v1100, do you mean gRPC 1.1? That seems like a really old version? Please use the latest release instead.

Craig Tiller

unread,
Apr 9, 2024, 3:12:23 PM4/9/24
to yas...@google.com, grpc.io
You're right that gRPC C++ doesn't compress arbitrary metadata: we get some performance advantages from being able to predictably compress important protocol metadata, and we've found that compressing arbitrary metadata interferes with this - it's usually not compressible enough, and when it is it's too computationally intensive to do a good job. We've considered ways to improve that, but right now the best paths forward likely need a breaking API change.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/954c31dd-eedd-4018-b0b1-c4d1d31a1202n%40googlegroups.com.

A-SaltedFish

unread,
Apr 11, 2024, 4:55:50 PM4/11/24
to grpc.io
Thank you very much for answer . I get it,i think.  And what do you mean by "not compressiable",is this scenrio you are talking about:  the header value is often changing thus grpc have to compress it in almost every request?
Reply all
Reply to author
Forward
0 new messages