ClickhouseProblem & solution
Clever ingests 200x more logs at the same cost with ClickHouse Cloud
Summary
Clever, an identity platform for K-12 education, faced a fragmented logging setup as its 400 services and 200 AWS Lambdas generated about 150 TB of uncompressed logs monthly. Datadog indexed only about 10% and retained it for three days, while the remainder was in Athena and required SQL. Clever migrated to ClickHouse Cloud on AWS, indexing all logs with 60-day retention and reporting 200× more searchable log volume at no additional cost, with 10× compression. Its design extracts frequently queried JSON fields into columns, stores remaining attributes in a map alongside raw JSON, uses skipping indexes, date partitions, a 60-day TTL, and reverse Unix timestamp ordering; this ordering produced an 8–10× query speedup. A custom query layer translates LogQL to SQL, while separate development and production services and multi-region deployment address isolation and availability.
Context
Clever's previous logging system split data between Datadog and AWS Athena. Datadog indexed about 10% of logs and retained them for three days, while the remaining logs required SQL queries in Athena for up to 60 days. Engineers had to switch tools to investigate older logs or analyze longer-term trends. Clever wanted one place for 60 days of logs, with competitive pricing, high availability, managed operation, and an interface accessible to engineers who did not regularly use SQL.
Approach / What changed
Clever migrated from Datadog to ClickHouse Cloud on AWS and designed a schema for structured JSON logs. Frequently queried fields such as level and service are extracted into columns; other attributes are stored in a map alongside the raw JSON. The system uses data skipping indexes, date partitioning with a 60-day TTL, reverse Unix timestamp ordering, and proactive filesystem-cache population. Separate development and production services, multi-region production storage, and a custom LogQL-to-SQL query layer support isolation, resilience, and familiar log exploration.
Takeaways
Clever increased searchable log volume from 10% of its monthly logs in Datadog to 100% in ClickHouse Cloud, a reported 200× increase, while retaining logs for 60 days at a 0% cost increase.
Reverse chronological ordering by negative Unix timestamp lets ClickHouse find recent records at the front of the data; Clever reports an 8–10× query-time speedup from this design.
A custom query layer translates LogQL to SQL, allowing engineers to use a familiar log exploration syntax while retaining SQL for more complex queries.
Source and freshness
- Source
- clickhouse.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.