Native interface (TCP)
The native protocol is used in the command-line client, for inter-server communication during distributed query processing, and also in some language clients (e.g. clickhouse-go).
ClickHouse provides official specifications for the native protocol and the columnar format it carries:
- Native Protocol — packet framing, the connection state machine, version negotiation, and the body of every non-
Blockmessage. - Native Format — the
Blockand column structure, the per-type encodings, and the compression frame. This format also appears outside the TCP protocol, for example withFORMAT Nativeover HTTP.