Skip to content

Enable compression for ClickHouse

Adam Hegyi requested to merge ah-enable-ch-http-compression into master

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:

image

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.

Edited by Adam Hegyi

Merge request reports