Blog | News

Announcing Altinity.Cloud for ClickHouse® at Unbeatable Hetzner Prices

There are two times in a man’s life when he should not speculate:
when he can’t afford it, and when he can.

– Mark Twain

Every year Altinity comes up with something completely new. We came to the market with the first-ever AWS managed service for ClickHouse in 2020. A year later we extended it to GCP. In 2022 we introduced Altinity.Cloud Anywhere – the same managed service but deployed in the user’s cloud. Finally, last year we launched Altinity.Cloud in Microsoft Azure – first ever, as usual. That seemed to cover all major platforms where ClickHouse can run. But it is only so on a first glance. There are many other options, and one of the most interesting is Hetzner.

Hetzner was founded in 1997, a decade before AWS even came into existence. It is famous for very low-priced server hosting. Hetzner runs primarily in Europe, but has two datacenters in the US as well.

In fact, I successfully used Hetzner for high-performance ClickHouse clusters even before founding Altinity. It was 7 years ago at LifeStreet, shortly after ClickHouse was released to open source. We’ve long wondered how Altinity could offer managed ClickHouse clusters that take advantage of superior Hetzner economics, allowing cloud operation for a low price. After several months of artful engineering, we are happy to announce Altinity.Cloud for ClickHouse at Hetzner – at a fraction of the cost compared to major cloud vendors!

Architecture

Altinity.Cloud at Hetzner is built using the Altinity Anywhere architecture. The key feature of Anywhere is the complete separation of the Altinity.Cloud management plane and the user-owned data plane, as shown in the diagram below:

In order to build a reliable service, we heavily rely on Kubernetes as well as components typically provided by public cloud providers like AWS or GCP: VMs, block and object storage, network load balancers, and others. Hetzner does not have a managed Kubernetes option, but the capabilities of Hetzner Cloud were sufficient to build it on our own using open source components.

At the end of the day, we created an Altinity.Cloud service very similar to the one in other clouds. ClickHouse clusters can be launched and managed in the Altinity account as a classic SaaS, or in the user’s own account with a full Bring Your Own Cloud (BYOC) experience. For the end user, there is almost no difference, except much lower cost. We will talk about the cost later.

Kubernetes

Briefly speaking, we implemented a managed Kubernetes service similar to EKS or GKE at Hetzner Cloud using Kubeadm. That included:

  • Custom images with pre-installed Kubernetes and Altinity software for master and worker nodes
  • Cluster autoscaler capable of provisioning new nodes based on standard node selectors
  • Backup and restore of Kubernetes state to an external location
  • Services and endpoints via cloud controller manager
  • Networking using flannel cni

Hetzner’s team did a nice job providing initial building blocks in their GitHub repository, but more remained to be done by Altinity engineers. Of course, a big part of that is managing Kubernetes provisioning and applying changes from Altinity.Cloud. 

Compute

Hetzner Cloud provides several compute options. There are shared VMs with baseline performance, as well as dedicated VMs:

  • CX (Intel) – shared, 20% baseline
  • CPX (AMD) – shared, 33% baseline
  • CAX (Ampere ARM) – shared, 30% baseline
  • CCX (Intel or AMD) – dedicated.

Shared compute costs one third of the dedicated option, but Hetzner applies throttling for workloads that constantly utilize CPU. We opted for CPX AMD instance types for infrastructure like Kubernetes master node or connectivity, where performance is not an issue. For critical production workloads, like ClickHouse, dedicated vCPUs are required, so CCX is the only way to go. 

Storage

Hetzner Cloud comes equipped with a Cloud Storage option. It is network block storage similar to AWS EBS. There is a CSI driver available for the Kubernetes storage provisioner that makes it easy to use. It supports all standard features including volume expansion.

Network

Thanks to the Altinity.Cloud connectivity model, there is no need for externally exposed ports to operate. There is no SSH, which is often a concern for Hetzner servers. The management channel connection is established from inside Hetzner to the Altinity.Cloud control plane using an outbound HTTPS connection.

In order to make the network private, we provision a separate host to handle NAT. It also gives a static IP for outbound connections from ClickHouse servers that may be convenient for integrations.

We chose Flannel for the Kubernetes network. It is simple and does the job well.

Backups

We typically utilize object storage for ClickHouse data backups. Hetzner did not have an object storage service until recently. The public beta was launched a few weeks ago in September 2024. So we had to choose another path. After research and testing, we have integrated two object storage providers that can be used for backing up database clusters running on Hetzner Cloud: Blackbase B2 and Cloudflare R2. Both provide full S3 compatibility and are significantly cheaper than cloud options. We plan to add Hetzner’s object storage after it is certified for production use.

Performance

We have tested ClickHouse on Hetzner Cloud with the CCX-series of VMs. They come in the same sizes as AWS m-series, or GCP n2d. But more importantly, CCX-series VMs deliver the same performance! In our tests, ccx23 (4vCPUs, 16GB of RAM) showed benchmark results matching AWS m6i.xlarge with the same number of vCPUs and amount of RAM.

Storage also performs well. We could see 200-220 MB/s read performance on a small instance, and it can go up to 300 MB/s for bigger VMs (see this or this for additional evidence). All Hetzner VMs are also equipped with local NVMe SSD, but we do not typically use it for ClickHouse so we did not try it out.

Hetzner Cloud storage is therefore comparable to AWS EBS gp2 (250MB/s) but is inferior to gp3, which allows users to provision extra throughput up to 1000MB/s, or big GCP volumes (in GCP, volume throughput is proportional to the volume size). That said, 300MB/s is sufficient for most ClickHouse workloads, and it is possible to stack multiple volumes using JBOD if one needs more speed.

Cost

This is probably the most interesting part. Dedicated Hetzner servers are known for their amazingly low cost, sometimes 10 times cheaper than comparable AWS or GCP VMs. Hetzner Cloud is more expensive, but still, the difference is tremendous. For example, let’s compare the hourly cost for CCX instances to similarly sized m6i VMs in AWS that we used for performance testing, both in the us-east region:

Hourly cost in $Hetzner Cloud CCXAWS m6i
2 vCPU, 8GB RAM0.0260.096
4 vCPU, 16GB RAM0.0510.192
8 vCPU, 32GB RAM0.100.384
16 vCPU, 64GB RAM0.200.768
32 vCPU, 128GB RAM0.401.536

* AWS costs are looked up at https://instances.vantage.sh/aws/ec2/m6i.large
Hetzner Cloud costs were looked up at https://www.hetzner.com/cloud/ and converted to USD

As you can see, the Hetzner Cloud cost is almost 4 times less than AWS! 

Storage is also less expensive. Hetzner Cloud goes at $0.0524 per GB-mo, while AWS gp3 is $0.08 – Hetzner costs 35% times less.

There are other expenses that need to be taken into account as well. In particular, how much does the infrastructure to operate Kubernetes cost?

Kubernetes deployed at Hetzner requires 5 CPX11 VMs that are also shared with the Altinity.Cloud infrastructure. Each costs $0.009/hour, so it is $32.40 in total per month.

EKS deployed in AWS costs $75 per month by itself; additionally, we typically span two t4g.large instances for infrastructure workloads that run $0.062/hour and result in $90 per month. AWS NLB adds to the cost as well.

Hetzner CloudAWS
KubernetesFree (managed by Altinity.Cloud)EKS $75/mo
Worker nodes3 x CPX11, $19.44/moIncluded in EKS 
Infra nodesShared with workers2 x t4g.large, $90/mo
Load balancerFreeAWS NLB $35/mo
NAT1 x cpx11, $6.48/moNot needed
Network traffic20T/mo per VM included
$1.30/TB extra
Free within a zone, 10$/TB for anything outside the zone

So the difference for infrastructure overhead is even bigger, $39 vs $200 per month!

Trade-offs

There is no free lunch, of course. The lower cost at Hetzner Cloud comes with some limitations. For example, ClickHouse is rarely used alone, but as a part of a bigger application stack. AWS provides a lot of useful services, such as managed Kafka, RDS, and many others. Those do not exist in Hetzner. So users have to deploy and manage additional infrastructure at Hetzner, which increases management overhead, or use services in different clouds, which may result in high network charges.

Another issue is infrastructure maturity. Since we had to build the Kubernetes infrastructure in Hetzner, we had to address issues that simply do not exist in AWS or GCP, such as backups of the Kubernetes control plane. While it does not add that much to the cost by itself, it increases the overall complexity of the infrastructure and requires more operational efforts on our end. Fortunately, it is all transparent to users.

In the end, analytic applications are typically very resource-consuming. For many users the significant cost reduction of moving analytic services to Hetzner outweighs other considerations.

Final Words

“The big three” cloud providers have overshadowed much of the competition. Yet for many companies and projects, AWS, GCP, and Azure are not the only options available. There are many cases where high cost may be prohibitive to businesses. This is where other alternatives should be considered, including Hetzner. However, the gap in management capabilities for cluster applications, like ClickHouse, used to be too high. It pushed users back. With Altinity.Cloud at Hetzner we filled this gap for managed ClickHouse clusters, providing full management capabilities for a low-cost cloud. That opens up a low-cost option for ClickHouse users that never existed before.

If you are interested in trying Altinity.Cloud at Hetzner – please sign up for a trial, and we will be happy to welcome you there!

P.S. We aren’t just vendors! We’re customers too. We have been using Hetzner for years for development, builds, and QA. We plan to move many of our own ClickHouse clusters there as well.

Share

ClickHouse® is a registered trademark of ClickHouse, Inc.; Altinity is not affiliated with or associated with ClickHouse, Inc.

Table of Contents:

Related: