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 layertype
- denotes protocol handler which will be instantiated to process data, set of protocol handlers is predefined:tcp
- native clickhouse protocol handlerhttp
- http clickhouse protocol handlertls
- TLS encryption layerproxy1
- PROXYv1 layermysql
- MySQL compatibility protocol handlerpostgres
- PostgreSQL compatibility protocol handlerprometheus
- Prometheus protocol handlerinterserver
- 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