Free audit

View Audit Scope
ClickHouseClickHouse · MergeTree · Keeper
Real-Time Columnar OLAP

ClickHouse, billions of rows per second.

Executive Direct Answer · ClickHouse Engineering & SRE Scope

ClickHouse is an open-source, column-oriented OLAP database management system engineered for real-time analytical queries over billions of rows. JusDB provides full-lifecycle ClickHouse reliability engineering, MergeTree table engine optimization, materialized view design, Keeper cluster operations, and low-downtime migrations, with agreed incident response (24x7 on-call available).

Throughput: Billions of Rows/sec·Engine: MergeTree & Keeper·Response Targets: Per Agreement·Compression: 80%+ ZSTD/DoubleDelta·ISO 27001 & SOC 2 Type II: aligned, certification in progress

We design, tune, and operate ClickHouse clusters behind interactive dashboards and high-volume event pipelines. Our engineers handle schema modeling, cluster topology, ingestion, and query tuning.

24

Supported database technologies

24x7

On-call coverage, under your service agreement

30 min

P1 initial-response target on 24x7 on-call

2 to 4 h

Initial-response target in covered business hours

ClickHouse engineering

We specialize in high-performance ClickHouse deployments for real-time analytics and data warehousing. The work runs from ClickHouse consulting and engine-selection advisory to ClickHouse on Kubernetes.

MergeTree Profiling & Tuning

Optimize ClickHouse MergeTree table engines, index granularities, and PREWHERE clauses for sub-second aggregations.

Materialized Views Design

Design real-time aggregating materialized views and specialized projection strategies to pre-compute queries.

ClickHouse + Kafka Integration

High-throughput data ingestion using the Kafka Engine table integration. Delivery is at-least-once. We add deduplicated writes via ReplicatedMergeTree block dedup, aiming at effectively-once semantics within the configured dedup window.

Compression Codec Optimization

Optimize ZSTD, LZ4, and specialized DoubleDelta codecs to maximize storage savings and reduce IO bottlenecks.

Sharding & ZooKeeper/Keeper

Configure ReplicatedMergeTree distributed tables, sharding keys, and ClickHouse Keeper for reliable horizontal scaling.

Observability & Profiling

Query execution plan profiling with EXPLAIN PIPELINE and deep system.query_log auditing.

ClickHouse expertise
for real-time analytics

We tune MergeTree engines, design aggregating materialized views, and dial in compression codecs. The goal is billion-row aggregations that return in under a second without a separate warehouse. Dig into our ClickHouse performance tuning work for the full methodology.

ReplacingMergeTree & AggregatingMergeTree optimization
Distributed table sharding keys and global IN/JOIN efficiency
Kafka table engine integration (at-least-once ingestion with ReplicatedMergeTree block dedup for effectively-once)
Materialized Views state management and populating
PREWHERE filtering and skip indexes configuration
Integration with Grafana, Superset, and Custom BI
ClickHouse Keeper migration from ZooKeeper
System query log tracing and bottleneck profiling

Analytical Performance

After tuning
Skip-index pruning of parts95%
Projection-accelerated queries90%
Storage compression ratio93%
Materialized-view rollup coverage87%

Illustrative health scores · results depend on the workload

Queries we've transformed

Illustrative examples of the problem and the fix, not client measurements.

Full Scan, No ORDER BY

12,000ms

200ms

Read all 6.2B rows — no PRIMARY KEY ordering

The fix

Tuned ORDER BY key + added minmax skip index on event_date

Wrong Partition Key

8,400ms

140ms

Partitioned by user_id — every part touched

The fix

Re-partitioned by toYYYYMM(event_date), prunes to 1 part

JOIN on Huge Tables

21,000ms

95ms

Hash JOIN of two 4B-row tables blew up memory

The fix

Replaced with dictionary lookup + denormalized fact table

Cluster ACTIVE3 shards × 2 replicas · Keeper

3/3

Replicas online

<10s

Failover RTO

0ms

Replica Lag

shard-01 · replica-a
REPLICATEDONLINE
shard-02 · replica-a
REPLICATEDONLINE
shard-03 · replica-b
REPLICATEDONLINE

Always on. Replicated by design.

ReplicatedMergeTree tables coordinate through ClickHouse Keeper, so replicas of the same shard stay in sync. In the topologies we design, each shard keeps redundant replicas with automatic recovery. A lost node rejoins and re-syncs without manual intervention.

ReplicatedMergeTree with multi-replica redundancy
ClickHouse Keeper (Raft) replacing ZooKeeper coordination
Automatic replica recovery and re-sync on node loss
Distributed tables with shard-aware query routing
Verified backups via clickhouse-backup and S3 snapshots

A merge-storm P1, answered within your agreement's target.

When too-many-parts stalls inserts and a merge storm pins CPU, a named ClickHouse engineer responds. You do not wait in a ticket queue. We throttle merges, fix partitioning, and clear the backlog online. A blameless postmortem follows.

P1 alert → named ClickHouse engineer paged within your agreement's initial-response target
Root cause via system.query_log, system.merges & Grafana
Repartition + merge throttling — no insert downtime
Blameless postmortem with a prevention plan
Illustrative sequence
1
Alert fired

Dashboard p99 above 12s; analysts blocked

2
Engineer responds

A named ClickHouse engineer responds within your agreement's initial-response target

3
Root cause

Full scan: the filter misses the sorting key and there is no skip index

4
Mitigation

Added a minmax skip index and materialized it; query rewritten to filter on the sorting key

5
Follow-up

Granules pruned and p99 back to baseline; sorting-key redesign planned; post-incident review

ClickHouse Internals: Critical Failure Modes

High-throughput columnar engines face unique architectural bottlenecks under petabyte scale. Here are the 3 engine failure modes our ClickHouse SRE team permanently remediates:

Critical · Write Rejection

Too Many Parts & Merge Storm Ingestion Throttling

Frequent small-batch inserts generate millions of tiny data parts faster than ClickHouse background merges can consolidate them, reaching parts_to_throw_insert limits (default 300) and halting all real-time data ingestion.

JusDB Engineering Mitigation:

Architecting micro-batch buffers (in-memory async insert buffers or Kafka engine batching with async_insert = 1 and wait_for_async_insert = 1), tuning max_parts_in_total, and optimizing partition key granularity.

High · Query Termination

Out-Of-Memory (OOM) Exhaustion During Unbounded GROUP BY / JOINs

Distributed queries with high-cardinality GROUP BY or hash GLOBAL JOIN operations across multi-billion row tables exceed max_memory_usage_for_user, triggering abrupt query terminations with Memory limit exceeded exceptions.

JusDB Engineering Mitigation:

Configuring external aggregation with max_bytes_before_external_group_by, replacing distributed subquery joins with dictionary lookups, and implementing pre-aggregated AggregatingMergeTree materialized views.

High · Read/Write Split Stalling

ReplicatedMergeTree Desynchronization & ZooKeeper/Keeper Jitter

Heavy metadata churn and synchronous mutation commands overload ZooKeeper/Keeper znodes, causing Raft consensus timeout spikes, lost Keeper sessions, read-only replica status, and stalled distributed DDL executions.

JusDB Engineering Mitigation:

Migrating legacy ZooKeeper to native ClickHouse Keeper with dedicated SSD write logs, tuning operation_timeout_ms, and batching partition DROP/DETACH mutations.

Telemetry Runbooks · Non-Blocking ClickHouse Forensics

Our ClickHouse SREs run read-only diagnostic queries to inspect unmerged parts and identify memory-intensive queries without interrupting ingestion:

Parts Health: Active Part Count per Partitionsystem.parts
SELECT table,
       partition,
       count() AS num_parts,
       sum(rows) AS total_rows,
       formatReadableSize(sum(bytes_on_disk)) AS disk_size
FROM system.parts
WHERE active = 1 AND database = currentDatabase()
GROUP BY table, partition
HAVING num_parts > 50
ORDER BY num_parts DESC
LIMIT 10;
Memory Consumers: Top Query Allocationssystem.query_log
SELECT query_id,
       user,
       query_duration_ms,
       memory_usage,
       read_rows,
       formatReadableSize(read_bytes) AS read_volume
FROM system.query_log
WHERE type = 'QueryFinish' AND event_time > now() - INTERVAL 1 HOUR
ORDER BY memory_usage DESC
LIMIT 5;

How JusDB ClickHouse Services compare to alternative options.

Scaling ClickHouse to billions of rows requires deep mastery of MergeTree part merges, memory spillover thresholds, and Keeper Raft coordination. Here is how JusDB compares to managed cloud providers, generic MSPs, and internal dev teams.

Engineering Dimension
JusDB ClickHouse SRE
ClickHouse CloudGeneric MSPsIn-House Devs
MergeTree Partitioning & Too-Many-Parts PreventionGranular partition pruning, automated async_insert micro-batching, and background merge throttling preventing part explosionBasic part metrics in console; requires manual intervention when tables hit parts_to_throw_insert limitsLacks columnar storage mechanics expertise; attempts to fix insert errors by increasing instance disk capacityHigh-frequency micro-inserts trigger merge storms, locking CPU cores and throwing fatal insert rejections
Materialized Views & AggregatingMergeTree DesignReal-time stateful aggregations (SimpleAggregateFunction, AggregateFunction) and projections delivering sub-100ms dashboardsManaged service provides basic SQL interface; customer must architect complex stateful aggregation logicRuns raw ad-hoc aggregations over uncompressed tables, exhausting cluster RAM on multi-billion row scansMaterialized views created without state combinators, corrupting aggregated counts and duplicate metrics
Distributed Queries & Vectorized Memory SafetyMemory spillover tuning (max_bytes_before_external_group_by), dictionary joins, and colocated shard distributionQueries abort with Memory limit exceeded; recommends upgrading to larger compute tiersDoes not profile memory graphs in system.query_log; unable to diagnose OOM query terminationsUnbounded global JOINs crash ClickHouse server daemons during peak executive dashboard reporting hours
ClickHouse Keeper & Raft Quorum StabilityKeeper cluster deployment with dedicated SSD write logs, online ZooKeeper-to-Keeper migrations, and snapshot managementKeeper managed behind the scenes, but provides no visibility into DDL replication lags or synchronization stallsUnfamiliar with ClickHouse Keeper internal Raft state machines and quorum failover behaviorsZooKeeper Java GC pauses cause session expirations, throwing ReplicatedMergeTree tables into read-only mode
Incident Response & EscalationNamed ClickHouse engineers join your incident bridge. Initial-response targets: 2 to 4 hours in covered business hours; 30 minutes for P1 incidents with 24x7 on-call. Targets, not resolution guarantees.Multi-tiered cloud support ticketing system with generic L1 triage queues for incident notificationsOffshore ticket dispatchers lacking knowledge of columnar storage algorithms and vectorized enginesEngineers awake at 2 AM trying to understand why distributed tables stop responding to Kafka streams
Compression Codec Tuning & Storage FinOpsPer-column codec engineering (ZSTD, DoubleDelta, T64, Gorilla) for higher disk compression and fewer I/O bottlenecksDefault LZ4 compression applied universally, inflating storage bills and query memory footprintLeaves default table storage settings unoptimized across multi-terabyte analytical historical datasetsExponential cloud storage costs from uncompressed logs and redundant raw data tables

Pre-Migration Assessment

Postgres / Druid analytics → ClickHouse

READY
Schema & ORDER BY key design100%
Bulk load (clickhouse-client / S3)96%
MergeTree merge catch-up92%
Cutover readiness88%

Estimated cutover window: < 10 minutes

Move to ClickHouse without the downtime

Postgres, MySQL or a legacy warehouse → ClickHouse. We model the right MergeTree schema and backfill with parallel inserts. Live changes stream in via Kafka. We cut over once row counts reconcile. See our ClickHouse migration service for the full cutover playbook.

Schema modeling: MergeTree keys, codecs & materialized views
Parallel backfill plus Kafka engine incremental sync
Row-count and checksum reconciliation before cutover
ClickHouse Cloud, self-hosted & Kubernetes targets
Plan My Migration

ClickHouse Ecosystem & Integration Tools We Work With

Complete ClickHouse ecosystem and integration tools

ClickHouse
ClickHouse Cloud
Grafana
Tableau
Apache Superset
Kafka
Apache Spark
dbt

Common questions about ClickHouse, MergeTree & OLAP performance

Direct technical answers from our ClickHouse engineers.

What is ClickHouse best used for?

ClickHouse excels at real-time analytics, event streaming, log analysis, time-series data, and interactive dashboards over massive datasets. Its columnar MergeTree engine and vectorized execution process billions of rows per second at orders-of-magnitude lower cost than traditional data warehouses.

How do you prevent 'Too many parts in all data parts in table' errors?

We eliminate micro-batch inserts by implementing client-side batching, async_insert in ClickHouse 21.11+, and Kafka buffer engines, while tuning background merge pool threads and optimizing partition granularities.

What is the difference between ClickHouse Keeper and Apache ZooKeeper?

ClickHouse Keeper is a C++ implementation of the Raft consensus protocol built natively into ClickHouse. It provides identical coordination for ReplicatedMergeTree tables without the JVM memory footprint, garbage collection pauses, or operational complexity of Apache ZooKeeper.

Can ClickHouse replace PostgreSQL or MySQL for transactional workloads?

No. ClickHouse is an OLAP database optimized for append-only bulk inserts and fast aggregations, not row-by-row OLTP updates or ACID multi-table transactions. We typically architect CDC pipelines (using Debezium or Kafka) to stream OLTP data from PostgreSQL/MySQL into ClickHouse for real-time reporting.

How does JusDB handle ClickHouse performance tuning engagements?

We audit system.query_log to identify slow queries, optimize primary sorting keys in MergeTree tables, design AggregatingMergeTree materialized views to pre-compute metrics, apply specialized column compression codecs (DoubleDelta, Gorilla, ZSTD), and calibrate memory limits.

Ready to Accelerate Your Analytics?

Transform your data analytics with ClickHouse's lightning-fast performance. Our experts will help you build scalable OLAP solutions for real-time insights.

Explore Our ClickHouse Services

Explore more ways our ClickHouse experts can help with your database infrastructure.

Compare ClickHouse