Skip to main content
Skip to main content
Edit this page

Composable Protocols

Composable protocols allows more flexible configuration of TCP access to the ClickHouse server. This configuration can co-exist with or replace conventional configuration.

Composable protocols section is denoted as protocols in configuration xml

Example:

Basic modules define protocol layers

Example:

where:

  • plain_http - name which can be referred by another layer
  • type - denotes protocol handler which will be instantiated to process data, set of protocol handlers is predefined:
    • tcp - native clickhouse protocol handler
    • http - http clickhouse protocol handler
    • tls - TLS encryption layer
    • proxy1 - PROXYv1 layer
    • mysql - MySQL compatibility protocol handler
    • postgres - PostgreSQL compatibility protocol handler
    • prometheus - Prometheus protocol handler
    • interserver - clickhouse interserver handler
Note

gRPC protocol handler is not implemented for Composable protocols

Endpoint (i.e. listening port) is denoted by <port> and (optional) <host> tags

Example:

If <host> is omitted, then <listen_host> from root config is used.

Layers sequence is defined by <impl> tag, referencing another module

Example: definition for HTTPS protocol

Endpoint can be attached to any layer

Example: definition for HTTP (port 8123) and HTTPS (port 8443) endpoints

Additional endpoints can be defined by referencing any module and omitting <type> tag

Example: another_http endpoint is defined for plain_http module

Some modules can contain specific for its layer parameters

Example: for TLS layer private key (privateKeyFile) and certificate files (certificateFile) can be specified