ClickHouse Self-Managed
Self-managed ClickHouse columnar OLAP and observability analytics cluster with ClickHouse Keeper coordination.
Medium — 2 million active metric series and 500 GB/day logs+traces in read/write split mode
Monthly cost
$2,515.46
Annual cost
$30,185/year
| Compute | $2,041.96 |
| Storage | $473.50 |
| Other | $0.00 |
Saves $223.56/mo (9%) across r8g.2xlarge, m8g.2xlarge, m8g.xlarge.
| Role | Instance | vCPU | GB RAM | Storage |
|---|---|---|---|---|
| Ingester | 3 × r7i.2xlarge | 8 | 64 | 500 GB nvme |
| Querier Distributor | 2 × m7i.2xlarge | 8 | 32 | 100 GB ssd |
| Compactor Gateway | 2 × m7i.xlarge | 4 | 16 | 250 GB ssd |
| Object Storage | 1 × object-bucket | — | — | 10 TB object |
This medium sizing configuration fits workloads handling two million active metric series and five hundred gigabytes per day of logs and traces. Compute drives the monthly cost at this tier, totaling two thousand forty-one dollars and ninety-six cents across seven instances. The primary cost driver is the r7i.2xlarge family provisioned for the ingester component. High availability is disabled, which reduces redundancy to lower operational costs.
Share the current URL or copy the AWS Terraform / OpenTofu baseline.
# Compatible with Terraform >= 1.6 and OpenTofu >= 1.6
terraform {
required_version = ">= 1.6.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
data "aws_availability_zones" "available" {
state = "available"
}
data "aws_ami" "debian_12_x86" {
most_recent = true
owners = ["136693071363"]
filter {
name = "name"
values = ["debian-12-amd64-*"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
}
locals {
azs = slice(data.aws_availability_zones.available.names, 0, 3)
}
resource "aws_vpc" "workload" {
cidr_block = "10.42.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true
tags = {
Name = "grafana-lgtm-vpc"
}
}
resource "aws_subnet" "workload" {
count = 3
vpc_id = aws_vpc.workload.id
cidr_block = cidrsubnet(aws_vpc.workload.cidr_block, 8, count.index)
availability_zone = local.azs[count.index]
tags = {
Name = "grafana-lgtm-subnet-${count.index + 1}"
}
}
# Generated for AWS (us-east-1) from the current estimate state.
resource "aws_instance" "ingester_1" {
count = 3
ami = data.aws_ami.debian_12_x86.id
instance_type = "r7i.2xlarge"
subnet_id = aws_subnet.workload[count.index % length(aws_subnet.workload)].id
associate_public_ip_address = false
root_block_device {
volume_type = "gp3"
volume_size = 50
encrypted = true
}
tags = {
Name = "grafana-lgtm-ingester-1-${count.index + 1}"
App = "grafana-lgtm"
Role = "ingester"
}
}
resource "aws_ebs_volume" "ingester_1_data" {
count = 3
availability_zone = local.azs[count.index % length(local.azs)]
size = 500
type = "gp3"
encrypted = true
tags = {
Name = "grafana-lgtm-ingester-1-data-${count.index + 1}"
App = "grafana-lgtm"
Role = "ingester"
}
}
resource "aws_volume_attachment" "ingester_1_attach" {
count = 3
device_name = "/dev/sdf"
volume_id = aws_ebs_volume.ingester_1_data[count.index].id
instance_id = aws_instance.ingester_1[count.index].id
}
resource "aws_instance" "querier_distributor_2" {
count = 2
ami = data.aws_ami.debian_12_x86.id
instance_type = "m7i.2xlarge"
subnet_id = aws_subnet.workload[count.index % length(aws_subnet.workload)].id
associate_public_ip_address = true
root_block_device {
volume_type = "gp3"
volume_size = 50
encrypted = true
}
tags = {
Name = "grafana-lgtm-querier-distributor-2-${count.index + 1}"
App = "grafana-lgtm"
Role = "querier-distributor"
}
}
resource "aws_ebs_volume" "querier_distributor_2_data" {
count = 2
availability_zone = local.azs[count.index % length(local.azs)]
size = 100
type = "gp3"
encrypted = true
tags = {
Name = "grafana-lgtm-querier-distributor-2-data-${count.index + 1}"
App = "grafana-lgtm"
Role = "querier-distributor"
}
}
resource "aws_volume_attachment" "querier_distributor_2_attach" {
count = 2
device_name = "/dev/sdf"
volume_id = aws_ebs_volume.querier_distributor_2_data[count.index].id
instance_id = aws_instance.querier_distributor_2[count.index].id
}
resource "aws_instance" "compactor_gateway_3" {
count = 2
ami = data.aws_ami.debian_12_x86.id
instance_type = "m7i.xlarge"
subnet_id = aws_subnet.workload[count.index % length(aws_subnet.workload)].id
associate_public_ip_address = false
root_block_device {
volume_type = "gp3"
volume_size = 50
encrypted = true
}
tags = {
Name = "grafana-lgtm-compactor-gateway-3-${count.index + 1}"
App = "grafana-lgtm"
Role = "compactor-gateway"
}
}
resource "aws_ebs_volume" "compactor_gateway_3_data" {
count = 2
availability_zone = local.azs[count.index % length(local.azs)]
size = 250
type = "gp3"
encrypted = true
tags = {
Name = "grafana-lgtm-compactor-gateway-3-data-${count.index + 1}"
App = "grafana-lgtm"
Role = "compactor-gateway"
}
}
resource "aws_volume_attachment" "compactor_gateway_3_attach" {
count = 2
device_name = "/dev/sdf"
volume_id = aws_ebs_volume.compactor_gateway_3_data[count.index].id
instance_id = aws_instance.compactor_gateway_3[count.index].id
}
resource "aws_s3_bucket" "object_storage_4" {
count = 1
bucket_prefix = "grafana-lgtm-object-storage-4-"
tags = {
App = "grafana-lgtm"
Role = "object-storage"
EstimatedGb = "10000"
}
}
resource "aws_s3_bucket_public_access_block" "object_storage_4_private" {
count = 1
bucket = aws_s3_bucket.object_storage_4[count.index].id
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
Reference architecture: Grafana LGTM Observability Stack for read-write-split-cluster, version Grafana Mimir 2.15+ & Loki 3.x capacity planning guidance, retrieved November 11, 2026.
https://grafana.com/docs/mimir/latest/manage/plan-and-size/
Pricing: AWS pricing snapshot, retrieved November 22, 2026.
Commercial pricing only. GovCloud, sovereign cloud, and discounts beyond those shown are not modelled.
Based on Grafana Labs published Mimir and Loki capacity planning ratios (roughly 1 ingester vCPU and 8 GB RAM per 300K active series) plus shared Grafana UI and Tempo components.
Estimate excludes Grafana Enterprise licensing, OpenTelemetry collector agent fleets, and object-storage PUT/GET request charges.
Self-managed ClickHouse columnar OLAP and observability analytics cluster with ClickHouse Keeper coordination.
Self-managed VictoriaMetrics for long-retention metrics storage, Prometheus remote write, and cost-conscious observability backends.
Self-managed Confluent Platform 8.x (Apache Kafka 4.x KRaft) for durable event streaming, schema governance, and Connect pipelines.