ClickHouse and ClickHouse Cloud Diverge on Who Pays for Merges
ClickHouse and ClickHouse Cloud run the same storage engine, but they hand the merge bill to different parties. Self-hosters pay in CPU, disk, and engineering hours. Cloud customers pay in metered compute. The license did not change between the two. The payer did, and that shift explains most of what separates the projects in practice.
One Binary, Two Cost Models
The open-source ClickHouse is a column-oriented database for online analytical processing, distributed under Apache 2.0. Anyone can download it, run it on their own hardware, fork it, or wrap it in a product. That permission is broad and it is real. ClickHouse Inc., headquartered in the San Francisco Bay Area with a subsidiary in Amsterdam, sells the managed version separately.
ClickHouse Cloud is a usage-priced service. The company operates the clusters, and customers are billed for compute and storage rather than for a license. The engine underneath is the same codebase. What changes is who owns the machines and who is on the hook when background work runs long.
Merges are the line item that makes this interesting. They are not a feature you buy. They are housekeeping the engine performs continuously, and their cost scales with how much data arrives and how it is partitioned. On a self-hosted box, that cost lands on your hardware. On Cloud, it lands on a meter that the vendor controls.
What the Open Engine Actually Ships
ClickHouse stores data in parts, and MergeTree-family tables merge those parts in the background to keep read performance stable. Every insert creates parts. Merges rewrite them into larger ones. The engine is doing compaction work that any log-structured store has to do, and ClickHouse is unusually aggressive about it.
The amplification is real. A row can be written, merged, and rewritten several times before it settles. Each rewrite consumes CPU, disk bandwidth, and IOPS. Self-hosters see this directly in their monitoring, which is an advantage: the cost is visible and attributable to a specific table and insert pattern.
The mechanism is worth spelling out because it drives everything downstream. A part is an immutable, sorted run on disk. When enough parts accumulate, the scheduler picks a subset and rewrites them into one larger part, preserving sort order. The choice of which parts to pick is not free: the scheduler weighs part sizes, insertion recency, and the merge tree's depth, and a poor choice can leave the table with too many parts for the query layer to scan efficiently. Too few merges and reads slow down. Too many and you burn disk bandwidth on rewrites nobody asked for. The knob that governs this, the number of concurrent merges and the size thresholds behind them, is exactly the kind of setting that rewards someone who has watched a real workload.
Predictability is the open engine's strongest argument. You can measure merge throughput on your own workload, size disks accordingly, and tune settings without asking permission. The trade-off is that the tuning labor is yours. A team that inserts in large batches and partitions sensibly will spend little. A team that streams tiny inserts will spend a great deal.
Where the Cloud Contract Shifts Risk
ClickHouse Cloud takes the scheduler out of your hands. The vendor runs the merge machinery, scales compute, and separates storage from compute in the billing model. That removes a class of operational work, and it also removes your ability to see exactly which query or insert pattern is generating the background load.
Idle merges still consume compute. A cluster that receives no queries can still be doing compaction, and in a usage-priced model that work has to be paid for somewhere. Whether it appears as explicit compute charges or is folded into the rate depends on the tier and the contract, which is exactly why the effective unit cost is hard to read from a pricing page.
The honest objection here comes from cost engineers: managed pricing bundles so many behaviors that comparing it to a self-hosted bill is guesswork. A self-hoster can point at a graph and say the merges cost this much. A cloud customer often cannot. This site has looked at how infrastructure work pays before the knowledge does, and the pattern repeats here.
There is a second-order effect that shows up in team structure. When the vendor owns the scheduler, the person who used to learn merge behavior on the job no longer has a reason to. That knowledge does not get reassigned to someone else on your side; it simply stops accumulating. Two years into a managed deployment, an engineering team can find itself unable to answer basic questions about why a particular table rewrites so much, because nobody ever had to watch it happen.
Licensing Holds, Governance Does Not
Apache 2.0 permits forks and resale, and that permission has not been withdrawn. The license is not the lever. The levers are the trademark and the operational knowledge required to run a large deployment well. Neither of those is granted by the license text.
Contribution gravity follows the payroll. Engineers paid by the vendor write most of the merge scheduler improvements, and those patches flow into the open repository, which genuinely benefits self-hosters. The direction of flow matters though. Paid deployments generate the telemetry and the pressure that shape what gets fixed first.
This is the standard open-core arrangement, and it is worth naming plainly rather than treating as a scandal. The code is open. The tuning playbook for very large clusters is not a document you can download. A related piece on fork maintenance costs covers what happens when that balance shifts.
The Economics Favor the Vendor
Managed merges are genuinely hard to replicate. Running a merge scheduler at scale requires capacity planning, failure handling, and a feedback loop between storage layout and query patterns. A competitor can copy the engine. Copying the accumulated operational judgment takes years and a lot of incident reports.
Cloud margin hides in background work because background work is hard to itemize. Customers compare headline compute rates and rarely model compaction separately. The vendor, meanwhile, sees every cluster's merge behavior and can price against the aggregate. That asymmetry is the structural advantage.
Self-hosters absorb the tuning labor instead. That labor is real and often undercounted in build-versus-buy spreadsheets. One engineer spending part of each week on part counts and insert batching is a recurring cost that never appears on a cloud invoice, which makes the cloud option look cheaper than it is in some comparisons and more expensive in others.
Consider the direction of the incentive, too. A vendor that bills for compute has no strong reason to make merges cheaper, because cheaper merges mean less billable work. A vendor that wants to win price-sensitive accounts has every reason to. Both pressures can exist inside the same company at once, and which one wins depends on which segment the pricing team is chasing that quarter. Self-hosters face a cleaner incentive: every wasted rewrite is their own electricity.
Reading the Meter Honestly
If you are comparing the two paths, the useful exercise is to build a small cost model with three inputs: bytes inserted per day, average part size at insert time, and how many times a row is likely to be rewritten before it reaches its final part. The first two you can measure on your own data in an afternoon. The third is the one that separates a tidy deployment from an expensive one, and it is the one nobody puts on a slide.
Watch what happens when you change the batching. Doubling the rows per insert tends to cut the number of parts created and therefore the merge volume, though the relationship is not linear and it depends heavily on partition keys. A table partitioned by day with a steady stream of small inserts behaves nothing like the same table partitioned by month with hourly batches. Same data, same engine, wildly different rewrite totals.
Retention policy matters as much as inserts. Dropping old partitions is cheap; deleting rows inside a partition forces a rewrite of the whole part. If your workload involves frequent corrections or deletes, budget for the rewrite cost explicitly rather than assuming it rides along with inserts. This is the kind of detail that a managed service absorbs silently and a self-hoster discovers on the disk graph at an inconvenient hour.
Practical Moves for Either Path
Benchmark merge amplification before committing to a deployment shape. Insert a realistic sample of your data, watch the part count and the bytes rewritten per hour, and extrapolate from that rather than from a synthetic single-row test.
Model storage growth against part counts, not just against raw data volume. A table with many small partitions will rewrite far more data than its size suggests, and disk headroom sized on raw volume alone will run out first.
- Budget engineer time explicitly for self-hosted tuning, including the weeks spent learning insert batching and partition keys.
- Read cloud pricing per query and per background operation where the vendor exposes it, rather than per gigabyte stored.
- Keep an exit plan to vanilla ClickHouse, with a tested export path and a documented schema, so the license's fork permission has practical value.
Run a license audit before any migration, since license audits catch drift that contract reviews miss. The engine will keep merging either way. Decide early which budget line absorbs it.