Powered by ClickHouse

Sub-second analytics on billions of events. Built for scale, speed, and real-time insights.

<50ms
Query p50
<200ms
Query p99
10:1
Compression
<20KB
Loader Size
Real-time
No Pre-Aggregation

Architecture Overview

</>SDK
<20KB loader
Session recording
APIGateway
Event ingestion
Validation
BatchInsert Layer
In-memory batching
Async writes
CHClickHouse Cloud
Columnar storage
Real-time queries

Why ClickHouse

Claymore is ClickHouse Native. Our architecture is designed specifically for ClickHouse's columnar storage model, not as an abstraction over multiple databases.

Columnar Storage

Session replay data is stored in columnar format, enabling efficient compression and lightning-fast analytical queries across billions of events.

Compression Codecs

ZSTD and LZ4 codecs achieve 10:1 compression ratios on replay data, reducing storage costs by 90% compared to row-based databases.

Materialized Views

Real-time aggregations are computed on insert using Materialized Views, enabling instant dashboards without batch processing jobs.

TTL Policies

Automatic data retention with TTL policies enables tiered storage, moving older data to S3 while keeping recent data instantly queryable.

AI + ClickHouse Integration

Our AI Analyst isn't just a ChatGPT wrapper. It's a sophisticated system that generates and executes SQL queries against ClickHouse in real-time.

1

Natural Language Input

"Show sessions where users from Berlin got error 500 during checkout with cart value over $100"
2

Text-to-SQL Generation

SELECT
    s.sessionId,
    s.userId,
    e.errorMessage,
    toDecimal64(s.cartValue, 2) AS cartValue,
    formatDateTime(s.createdAt, '%Y-%m-%d %H:%M:%S') AS timestamp
FROM sessions s
INNER JOIN (
    SELECT * FROM events FINAL
    WHERE errorCode = 500
) e ON s.sessionId = e.sessionId
PREWHERE s.projectId = {projectId:String}
    AND s.createdAt >= toStartOfDay(now() - INTERVAL 7 DAY)
WHERE s.country = 'DE'
    AND s.city ilike 'berlin'
    AND e.page ilike '%checkout%'
    AND s.cartValue > 100
ORDER BY s.createdAt DESC
LIMIT 50
3

ClickHouse Execution

Query executed in 47msResults returned with linked session replays
Why this requires ClickHouse: Sub-second queries on raw, non-aggregated data. No pre-computation needed. The AI can ask any ad-hoc question about any dimension, and ClickHouse returns answers instantly.

Performance Benchmarks

MetricLegacy ToolsClaymore (ClickHouse)
Time to InsightMinutes (pre-aggregated)Seconds (raw data)
Data Retention30-90 daysUnlimited (tiered S3)
Cardinality LimitHigh costs for custom tagsUnlimited (sparse indexing)
Query Latency (p50)N/A (pre-computed)<50ms
Query Latency (p99)N/A (pre-computed)<200ms
Compression Ratio2-3x typical10:1 (ZSTD)
SDK Size50-200KB<20KB gzipped

High Cardinality Handling

User-defined tags can explode index size in OLAP systems. Here's how we solve it:

LowCardinality

Known dimensions (country, browser, OS) use LowCardinality type for dictionary-encoded storage.

Mapping Tables

Custom user tags stored in separate mapping tables to prevent index bloat on main event tables.

CODEC(ZSTD)

Aggressive compression on all string columns reduces storage footprint without sacrificing query speed.

Primary Key Design

Carefully ordered primary keys (timestamp, projectId, sessionId) maximize data locality and query pruning.

OpenTelemetry Compatibility

Traces

Native OTel support for distributed traces (roadmap)

Logs

Export session logs in OTel format

Bridge

Connect product analytics with infrastructure observability

Roadmap alignment: ClickHouse and the broader observability ecosystem are converging on OpenTelemetry. Claymore is designed to be compatible with this standard.

ClickHouse Native Architecture

We don't abstract away the database. Claymore is built specifically for ClickHouse's strengths: columnar storage, real-time aggregations, and massive scale.

Read: Why We Chose ClickHouse →