grpc / grpc/grpc-java

Headers are a major source of slowness

Open
#1,103 0 comments 0 reactions 0 assignees View on GitHub
performance
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

Currently the metadata handling has a number of inefficiencies that materially affect performance.

Netty
- We convert MethodDescriptor into Http2Headers for every call. Could be cached
- We have no way of storing a validation result or derived value with a header cached by HPACK. E.g validating that the content-type is correct is done on the string value even though the value is effectively constant when emitted by HPACK.

Performance benchmark UnaryCallQpsBenchmark shows that header handling is ~10% of total CPU cost.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.