-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix H2 Flush Strategy Aggregated API Optimization (#2033)
Motivation: 72a0e64 made it such that flushOnEnd optimizations weren't always applied when using HTTP/2 and gRPC. This may have around a 20% performance impact. Modifications: - NettyHttpServer should use SplittingFLushStrategy in all cases. This is necessary because the flush strategy needs to be applied in a lazy fashion after the write starts, which is a capability provided by SplittingFLushStrategy. The terminal conditions are also commonly enforced by SplittingFLushStrategy and should be reused. - SplittingFLushStrategy should handle exceptions from the flush boundaries. This may happen if header parsing throws (duplicate content-length header). - While aggregating an in memory request track the content-length to avoid multiple iterations. Result: 20% rps performance improvement for aggregated h2/gRPC use cases.
- Loading branch information
1 parent
d925eae
commit 30550d5
Showing
3 changed files
with
86 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters