---
title: "Introducing the (blazing fast!) native TCP client for .NET"
description: "ClickHouse has released an experimental native TCP client for .NET, available in the ClickHouse.Driver package. Unlike the HTTP client, which requires two format conversions between column blocks and rows, the TCP client uses the native protocol to transfer data as column blocks, enabling zero-allocation, zero-copy reads and writes. In benchmarks, this achieves 1.5-2x faster speeds, over 99% fewer GC allocations, streamed reads of 1.1 million rows per second (115 million values), and parallel inserts at 877,000 rows per second (832,000 from POCOs), all on modest hardware. The client supports three API tiers—column streaming for maximum performance, POCO mapping with compiled per-column loops, and object arrays—and includes a migration path from HTTP. However, it remains experimental, lacking ADO.NET, binary JSON, JWT authentication, and alternative formats, and it only runs on .NET 8 or later."
---

# Introducing the (blazing fast!) native TCP client for .NET

[Clickhouse](https://yomu.fyi/company/clickhouse) · Oct 16, 2026

**Type:** Announcement

## Summary

ClickHouse has released an experimental native TCP client for .NET, available in the ClickHouse.Driver package. Unlike the HTTP client, which requires two format conversions between column blocks and rows, the TCP client uses the native protocol to transfer data as column blocks, enabling zero-allocation, zero-copy reads and writes. In benchmarks, this achieves 1.5-2x faster speeds, over 99% fewer GC allocations, streamed reads of 1.1 million rows per second (115 million values), and parallel inserts at 877,000 rows per second (832,000 from POCOs), all on modest hardware. The client supports three API tiers—column streaming for maximum performance, POCO mapping with compiled per-column loops, and object arrays—and includes a migration path from HTTP. However, it remains experimental, lacking ADO.NET, binary JSON, JWT authentication, and alternative formats, and it only runs on .NET 8 or later.

## Context

The existing ClickHouse .NET client only supported HTTP with RowBinary format, requiring the server to convert column blocks to row streams and the client to decode values one at a time, incurring overhead for both reads and inserts. The new TCP client mirrors the clickhouse-client protocol to eliminate this conversion, aiming to improve performance for analytical queries and bulk inserts.

## Approach / What changed

Implemented a .NET client around the ClickHouse native TCP protocol. It sends and receives data in the Native columnar format, where a block contains name/type followed by all values of each column. For fixed-width types, it bulk-reads a column into a pooled buffer and returns ReadOnlySpan . Composite types like Array(Float64) store row offsets then contiguous elements. Inserts accept flat arrays/columns or jagged arrays. Client supports three API tiers: borrowed column blocks (StreamAsync/InsertAsync), POCO mapping with compiled per-column loops and no boxing (QueryAsync /InsertRowsAsync ), and object array rows (QueryAsync/InsertRowsAsync which transpose on insert).

## Takeaways

- The TCP client uses the native protocol and columnar format to avoid the two conversions (server column blocks to rows, client rows to values) required by the HTTP client, resulting in 1.5-2x speed improvements and over 99% fewer GC allocations.
- The client offers three distinct API tiers: StreamAsync for zero-allocation column blocks, QueryAsync for POCOs with compiled per-column loops (no boxing), and QueryAsync for object arrays (per-row allocation). Choose based on performance needs vs. convenience.
- The client is experimental, missing ADO.NET, binary JSON, JWT auth, and alternative formats. JSON columns arrive as text, and DateTime columns return raw numbers in column and object array tiers. Plan to add ADO.NET and binary JSON next.

## FAQ

### How much faster is the TCP client than the HTTP client?

The TCP client is 1.5-2x faster for typical use cases, with over 99% fewer GC allocations. Streamed reads reach 1.1 million rows per second, and parallel inserts reach 877,000 rows per second. These gains come from eliminating format conversions and using columnar bulk operations.

### Can I use the TCP client with ORMs?

No. The TCP client currently lacks ADO.NET support, so it cannot be used with Dapper or EF Core. You can use the POCO tier (QueryAsync<T>) directly, but the object array tier loses most performance benefits. Full ADO.NET support is planned next.

### What limitations does the experimental TCP client have?

It only supports .NET 8+, JSON columns are returned as text requiring manual parsing, no JWT authentication, no alternative file formats like CSV or Parquet, and only {name:Type} parameters. The API may change before stable release.

**Tags:** [ClickHouse](https://yomu.fyi/topic/clickhouse), [.NET](https://yomu.fyi/topic/dotnet), [Performance](https://yomu.fyi/topic/performance), [TCP](https://yomu.fyi/topic/tcp)

- Source: [Clickhouse](https://clickhouse.com/blog/introducing-the-blazing-fast-native-tcp-client-for-net)
- Source URL: https://clickhouse.com/blog/introducing-the-blazing-fast-native-tcp-client-for-net
- Ingested by Yomu: 2026-10-16T18:00:14.696Z

[Read original post](https://clickhouse.com/blog/introducing-the-blazing-fast-native-tcp-client-for-net)
