Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion concepts/features/interfaces/tcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ title: 'Native interface (TCP)'
doc_type: 'reference'
---

The native protocol is used in the [command-line client](/concepts/features/interfaces/cli), for inter-server communication during distributed query processing, and also in other C++ programs. Unfortunately, native ClickHouse protocol doesn't have formal specification yet, but it can be reverse-engineered from ClickHouse source code (starting [around here](https://github.com/ClickHouse/ClickHouse/tree/master/src/Client)) and/or by intercepting and analyzing TCP traffic.
The native protocol is used in the [command-line client](/concepts/features/interfaces/cli), for inter-server communication during distributed query processing, and also in some language clients (e.g. [clickhouse-go](/integrations/go#connection-details)).

ClickHouse provides official specifications for the native protocol and the columnar format it carries:

- [Native Protocol](/interfaces/specs/NativeProtocol) — packet framing, the connection state machine, version negotiation, and the body of every non-`Block` message.
- [Native Format](/interfaces/specs/NativeFormat) — the `Block` and column structure, the per-type encodings, and the compression frame. This format also appears outside the TCP protocol, for example with `FORMAT Native` over HTTP.