[Feature] Support gzip compression for http response (#4533)

After tablet level metrics is supported, the http metrics API may response
a very large body when a BE holds a large number of tablets, and cause heavy
network traffic.
This patch introduce http content compression to reduce network traffic.
This commit is contained in:
Yingchun Lai
2020-09-06 20:30:12 +08:00
committed by GitHub
parent 69bd91b617
commit 64ebea2e43
8 changed files with 270 additions and 3 deletions

View File

@ -122,9 +122,7 @@ const std::string& HttpRequest::param(const std::string& key) const {
}
void HttpRequest::add_output_header(const char* key, const char* value) {
// #ifndef BE_TEST
evhttp_add_header(evhttp_request_get_output_headers(_ev_req), key, value);
// #endif
}
std::string HttpRequest::get_request_body() {