Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#9090] Support gzipped responses in webserver
Summary: Metrics can be pretty large in certain scenarios and we sometimes scrape them every 10s. Returning gzipped responses when the http client specifies Accept-Encoding: gzip would help make the prometheus scrape consume less network bandwidth. Ported from apache/kudu@8f52582 From zlib manual: Lower compression levels result in faster execution, but less compression Here level 1 is used. We can start with this level. If prometheous metrics are very large, we can choose higher level. A flag, webserver_zlib_compression_level, has been introduced with default level of 1. Another flag, webserver_compression_threshold_kb (default 4KB), allows specifying the threshold above which compression is performed. Test Plan: WebserverTest.TestHttpCompression Reviewers: mbautin, amitanand, sanketh Reviewed By: sanketh Subscribers: sanketh, mbautin, ybase Differential Revision: https://phabricator.dev.yugabyte.com/D12072
- Loading branch information
Showing
8 changed files
with
335 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -259,6 +259,7 @@ set(UTIL_SRCS | |
uuid.cc | ||
varint.cc | ||
version_info.cc | ||
zlib.cc | ||
async_util.cc | ||
) | ||
|
||
|
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
Oops, something went wrong.