clickhouse-js icon indicating copy to clipboard operation
clickhouse-js copied to clipboard

Add compression settings

Open mshustov opened this issue 2 years ago • 1 comments

Compression helps reduce the transferred data size at the cost of some CPU overhead. It might be beneficial to enable compression in environments with low network bandwidth. The client doesn't support extended configuration for the compression settings. The binary switch is sufficient. Settings:

interface Compression {
  // enable compression for the data transferred from ClickHouse to a client. Default value: true.
  read: boolean;
  // enable compression for the data transmitted from a client to the ClickHouse server. Default value: false.
  write: boolean
}

We need some performance benchmarks to justify enabling compression by default.

mshustov avatar Jul 26 '22 11:07 mshustov

implemneted in https://github.com/ClickHouse/clickhouse-js/pull/16 I'm leaving the issue open to re-evaluating defaults after performance benchmarking.

mshustov avatar Aug 08 '22 10:08 mshustov