---
title: "How Cloud CIRCUS used ClickHouse to speed up and simplify log analytics"
description: "Cloud CIRCUS replaced Amazon Athena with a self-managed ClickHouse instance on a single 4 vCPU / 32 GB EC2 machine to analyze CloudFront access logs from 2,000+ BlueMonkey customer sites."
url: "https://swe.quest/articles/how-cloud-circus-used-clickhouse-to-speed-up-and-simplify-log-analytics-2fa577e0b57d75c9"
canonical: "https://clickhouse.com/blog/cloud-circus-used-clickhouse-speed-up-simplify-log-analytics"
source: "ClickHouse"
published: "2025-06-17"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["analytics","data-pipelines","cloud","cost-optimization","observability"]
---

# How Cloud CIRCUS used ClickHouse to speed up and simplify log analytics

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-06-17, 6 min read, Case study. Original: [https://clickhouse.com/blog/cloud-circus-used-clickhouse-speed-up-simplify-log-analytics](https://clickhouse.com/blog/cloud-circus-used-clickhouse-speed-up-simplify-log-analytics)

## Summary

Cloud CIRCUS replaced Amazon Athena with a self-managed ClickHouse instance on a single 4 vCPU / 32 GB EC2 machine to analyze CloudFront access logs from 2,000+ BlueMonkey customer sites. All distributions now share a single MergeTree table partitioned by day and sorted by host\_header and date. Logs load from S3 via the s3 table function, run by EventBridge-scheduled ECS jobs that fan out across 20 Fargate tasks, which cut ingestion from hours to under 30 minutes while keeping memory below 80%. A per-site query dropped from about 16 s to 0.043 s, and a cross-site aggregation over 470M rows finishes in under 9 s, at a flat cost of about $300/month versus Athena's unpredictable per-scan billing.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)

## Prerequisites

- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- AWS S3 and CloudFront ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- columnar databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))

## Keywords

ClickHouse, Amazon Athena, CloudFront, MergeTree, AWS Fargate, Amazon EventBridge, Amazon ECS

## Related posts

- [Clever ingests 200x more logs at the same cost with ClickHouse Cloud](https://swe.quest/articles/clever-ingests-200x-more-logs-at-the-same-cost-with-clickhouse-cloud-cafdd48afca59e57.md): ClickHouse · 2026-06-30 · Medium · 8 min read · Observability, Analytics & OLAP, Cost optimization, System design
  Clever replaced a split Datadog/Athena logging setup with ClickHouse Cloud.
- [SIEM made simpler: How Huntress improved performance and slashed costs with ClickHouse](https://swe.quest/articles/siem-made-simpler-how-huntress-improved-performance-and-slashed-costs-with-0c0de3a6602cf479.md): ClickHouse · 2024-11-19 · Medium · 6 min read · Analytics & OLAP, Threat detection, Data pipelines, Cost optimization
  Huntress rebuilt its SIEM on ClickHouse Cloud after finding Elasticsearch too expensive (over $70,000/month) and Postgres too awkward to scale.
- [Migrating to ClickHouse Cloud in just three months with no downtime: A 120 terabyte data journey and its benefits](https://swe.quest/articles/migrating-to-clickhouse-cloud-in-just-three-months-with-no-downtime-a-120-38c02d31adc19578.md): ClickHouse · 2024-08-14 · Easy · 12 min read · Analytics & OLAP, Cloud platforms, Data pipelines, Cost optimization
  Azur Games moved a 120 TB self-managed ClickHouse 21.3 analytics deployment (45 servers, MinIO, old Airflow) to ClickHouse Cloud on AWS in three months with no analytics downtime.
- [How we Built a 19 PiB Logging Platform with ClickHouse and Saved Millions](https://swe.quest/articles/how-we-built-a-19-pib-logging-platform-with-clickhouse-and-saved-millions-5704529f91592f0b.md): ClickHouse · 2024-04-02 · Medium · 32 min read · Observability, Analytics & OLAP, Cost optimization, Scaling, System design
  ClickHouse replaced Datadog for internal logging with LogHouse, a per-region ClickHouse deployment holding over 19 PiB uncompressed (37 trillion rows) for its AWS regions.
- [How Buildkite transformed test analytics and cut costs with ClickHouse Cloud](https://swe.quest/articles/how-buildkite-transformed-test-analytics-and-cut-costs-with-clickhouse-cloud-3d237a53f50d4550.md): ClickHouse · 2026-01-27 · Easy · 8 min read · Analytics & OLAP, Cost optimization, Stream processing, CI/CD, Testing
  Buildkite Test Engine replaced a Kafka/Flink pipeline that pre-aggregated test metrics into Postgres, DynamoDB and Iceberg with on-demand queries against ClickHouse Cloud, letting customers group and filter billions of test executions by arbitrary JSON tags in real time.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
