forked from cortexproject/cortex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reuse the byte buffer from GRPC response in the frontend. (cortexproj…
…ect#4377) * Reuse the byte buffer from GRPC response in the frontend. This PR allow to reuse the GRPC byte buffer casted as a `io.Reader` in the http rountripper of the frontend. This way we don't have to copy the content from the reader into another buffer when reading the http response. I've been testing this with in Loki and this shows good memory saving (around 1GB). Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com> * Use safe cast Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com> * Review feedback. Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com> Signed-off-by: Alvin Lin <alvinlin@amazon.com>
- Loading branch information
1 parent
31bce1c
commit e765e51
Showing
2 changed files
with
39 additions
and
12 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