Enable compression for ClickHouse
What does this MR do and why?
This MR enables HTTP compression for the ClickHouse client to save bandwidth. The client will send compressed data to the CH server and receives compressed data which will be automatically decompressed via Gitlab::HTTP
.
Capture from wireshark:
The MR also includes a small change where the FORMAT
option is moved to the HTTP header so we can refactor the execute
and select
methods a bit.
How to set up and validate locally
Running queries should work as before, there is no user-facing change. I verified that compression happens using wireshark.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Adam Hegyi