ClickHouse Analytics

Cloudflare-Grade
Observability.

Every request logged with 30+ fields: latency breakdown, geolocation, device detection, threat scores, and cache analytics. All stored in ClickHouse for instant SQL queries.

Logging Architecture

Fire & Forget

Response sent before logging. Zero latency impact.

Binary WAL

ClickHouse RowBinary format. Zero JSON serialization on hot path.

ClickHouse

Columnar OLAP engine. Billions of rows, sub-second queries.

Load Shedding: Under extreme load (>5000 buffered), 2xx success logs are dropped to protect system stability. Error logs are never dropped.

30+ Fields Per Request

Inspired by the best: AWS API Gateway latency breakdown, Cloudflare geo/device/security signals, and Kong service metadata.

Latency Breakdown

AWS API Gateway-style

latency_msTotal end-to-end latency
integration_latency_msTime spent at your backend
gateway_latency_msNolxy processing overhead
Geolocation

Cloudflare-style

country_codeISO 3166-1 alpha-2 country code
cityCity name from GeoIP lookup
asnAutonomous System Number
Device Detection

Cloudflare-style

device_typedesktop, mobile, tablet, bot
browserBrowser name and version
osOperating system
is_botBot detection flag
Security Signals

Cloudflare WAF-style

threat_scoreComputed threat level (0-100)
waf_actionallow, block, challenge
bot_scoreBot probability score
rate_limitedWhether request was rate limited
quota_exceededWhether quota was exceeded
Cache Analytics

Cloudflare-style

cache_hitWhether response was served from cache
cache_ttlCache TTL in seconds
cache_tierL1 memory, L2 Redis, or none
cache_key_hashFNV-1a hash of the cache key
Service Metadata

Kong-style

service_nameUpstream service identifier
route_nameMatched route name
consumer_idAPI consumer identifier
consumer_nameHuman-readable consumer name

Built-In Query Engine

No Grafana, no Datadog, no external tools needed. Query your logs directly from the dashboard.

Log Search

Full-text search on paths with cursor and offset pagination. Filter by status code, HTTP method, date range.

Hourly & Daily Aggregation

Pre-aggregated stats: request count, latency, bandwidth, errors, cache hits — grouped by hour or day.

Latency Percentiles

P50, P95, P99 latency percentiles computed natively by ClickHouse. Histogram bucketing for distribution analysis.

Top Routes & IPs

Identify hottest routes and most active IPs. Error rates and average latency per route.

Geo Distribution

Request volume, errors, and latency broken down by country. Powered by GeoIP enrichment worker.

Cache Performance

Hit rate, average cache vs backend latency, total time saved. Quantify the ROI of response caching.

Background Enrichment

Logs are enriched asynchronously by dedicated workers — never on the hot path.

GeoIP Worker

Resolves IP addresses to country, city, and ASN using MaxMind GeoLite2. Runs in a separate process.

WAL Shipper Worker

Reads binary WAL files from disk and batch-inserts into ClickHouse. Runs on the primary process only.

Notification Worker

BullMQ-backed worker for email and webhook notifications. Durable delivery with exponential backoff retry.

See Everything. Miss Nothing.

Analytics are included in every plan. Free plans get 12-hour retention. Business plans get 90 days. Enterprise gets 365 days.