Saving Millions of Dollars by Bin-Packing ClickHouse Pods in AWS EKS
ClickHouse Cloud raised EKS cluster CPU utilization from about 50% to 70% by switching the Kubernetes scheduler's NodeResourcesFit scoring from LeastAllocated to MostAllocated, cutting node count by roughly 10% and EC2 cost by over 20%. Because EKS doesn't allow kube-scheduler customization, the team deployed a separate kube-scheduler with leader election and pointed pods at it via schedulerName. They rejected lowering autoscaler thresholds, overprovisioning and safe-to-evict on ClickHouse pods as too disruptive for stateful workloads. Supporting fixes covered annotating system pods as safe-to-evict and moving overprovisioning pods onto the same custom scheduler so preemption works. Stress tests and P90/P99 cold-start measurements showed negligible impact, and the change was rolled out region by region.
Related posts
- Fixed cadence to seconds: making ClickHouse Cloud autoscaling more reactive
ClickHouse mediumAdept
ClickHouse Cloud's vertical autoscaling recommender moved from a fixed timer loop to a controller-runtime based design, so services that hit memory pressure get a recommendation in seconds instead of waiting for the next scheduled pass. Two sources, a slotted periodic sweep and a reactive poller, feed one rate-limited work queue. The queue provides deduplication, exponential backoff, bounded concurrency and leader election without custom code. The reactive signals live in ClickHouse: a materialized view filters breach rows such as soft memory rejections out of the Prometheus metrics firehose into a small TTL'd table ordered by timestamp, which is polled every few seconds with a cheap five-minute window query.
- Building ClickHouse Cloud From Scratch in a Year
ClickHouse mediumAdept
ClickHouse Cloud was built in about a year on a "shared everything" architecture: compute and storage are separated, object storage (S3/GCS) is the primary store, and local SSDs handle caching and metadata. Control Plane and Data Plane are decoupled by a REST API façade plus SQS/PubSub for async events. Key infrastructure choices were managed Kubernetes (EKS) over kOps, Cilium over Calico for eBPF-based network isolation, Istio/Envoy SNI routing to get around per-account NLB limits, and shared S3 buckets with per-service subpaths to avoid bucket limits. Auto-scaling uses a Knative-style idler that suspends idle pods and a custom scaler with disruption budgets suited to stateful services. Object storage forced extra work on caching, prefetching and write-cost optimization.
- Detect, act, keep the evidence: node reliability across three clouds
ClickHouse mediumAdept
ClickHouse Cloud owns node-failure detection and reaction itself across AWS, GCP and Azure, because many real failures leave Kubernetes nodes Ready while workloads degrade. Examples include failed NVMe RAID members, EXT4 errors, hung kernel tasks and stuck pod creation, and provider auto-repair was inconsistent or counterproductive. The stack uses upstream Node Problem Detector with custom permanent conditions and plugin checks tuned against false positives. A custom open-source Node Problem Mitigator escalates per condition from evaluate to drain to terminate, gated by a kill switch, dry-run, exclusions, a global cooldown and alerting. A Node Debug Collector built on sosreport captures forensics before the node disappears.
- Bonree replaces ZooKeeper with ClickHouse Keeper for drastically improved performance and reduced costs
ClickHouse hardMaster
Bonree migrated the coordination layer of its ClickHouse-based observability platform from five 3-node ZooKeeper clusters to a single ClickHouse Keeper cluster. The move cut CPU and memory use by more than 75% and improved performance nearly 8x, and it eliminated Java full-GC stalls and replica sync backlogs. The migration was automated with Ansible: ingestion and merges are stopped (e.g. SYSTEM STOP MERGES), fresh snapshots are taken and converted, then data is sampled and verified, bringing a 2-3 hour manual process down to minutes. Bonree also modified clickhouse-keeper-converter to merge snapshots from multiple ZooKeeper clusters into one, handled mixed ACL encryption states, and replaced slow ZooKeeper path reads with a path log, cutting verification of 9 million paths from about 9 hours to seconds.
- The Best Managed Kubernetes Hosting in 2026
Railway easyNoviceKubernetes is only worth its operational cost for four kinds of teams: large service fleets, dedicated platform teams, BYOC or compliance-driven multi-tenancy, and exotic workloads such as GPU pools or custom CNI. Managed offerings run the control plane (API server, etcd, upgrades), but you still own nodes, autoscaling, ingress, cert-manager, secrets, observability, network policy and RBAC. With that caveat stated, the ranking compares EKS, GKE, AKS, Northflank, DOKS, LKE, Civo, Vultr and OVHcloud by control-plane pricing, features and trade-offs. GKE Autopilot is called the cleanest option, EKS wins on AWS gravity, AKS has the cheapest no-SLA tier, and smaller clouds trade ecosystem depth for price.