CloudEstimate

Size CockroachDB Self-Hosted on Google Cloud

Medium — 1 to 5 TB replicated OLTP data on a five-node cluster

Monthly cost

$1,824.22

Annual cost

$21,891/year

Line-item breakdown

Compute $1,324.22
Storage $500.00
Other $0.00
Arm64 option (Google Axion (C4A)) $1,811.08/mo

Saves $13.14/mo (1%) across c4a-standard-8.

Components provisioned

Role Instance vCPU GB RAM Storage
Node 5 × n4-standard-8 8 32 1 TB ssd

Why this sizing

This five-node medium configuration on Google Cloud fits one to five terabytes of replicated OLTP data for CockroachDB deployments in us-central1. Compute drives the monthly cost at this tier, totaling $1324.22 out of the $1824.22 monthly spend across five n4-standard-8 instances. High availability is disabled in this architecture, meaning node failures require manual recovery interventions to restore cluster quorum and data access.

Export

Share the current URL or copy the Google Cloud Terraform / OpenTofu baseline.

Google Cloud Terraform / OpenTofu baseline
# Compatible with Terraform >= 1.6 and OpenTofu >= 1.6
terraform {
  required_version = ">= 1.6.0"

  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "~> 6.0"
    }
  }
}

variable "project_id" {
  description = "Google Cloud project ID for this deployment."
  type        = string
  default     = "replace-with-project-id"
}

provider "google" {
  project = var.project_id
  region  = "us-central1"
}

locals {
  zones = ["us-central1-a", "us-central1-b", "us-central1-c"]
}

# Generated for Google Cloud (us-central1) from the current estimate state.
resource "google_compute_disk" "node_1_data" {
  count = 5
  name  = "cockroachdb-self-hosted-node-1-data-${count.index + 1}"
  type  = "hyperdisk-balanced"
  zone  = local.zones[count.index % length(local.zones)]
  size  = 1000
}

resource "google_compute_instance" "node_1" {
  count        = 5
  name         = "cockroachdb-self-hosted-node-1-${count.index + 1}"
  machine_type = "n4-standard-8"
  zone         = local.zones[count.index % length(local.zones)]

  boot_disk {
    initialize_params {
      image = "projects/debian-cloud/global/images/family/debian-12"
      size  = 50
      type  = "hyperdisk-balanced"
    }
  }

  network_interface {
    network = "default"
    access_config {}
  }

  attached_disk {
    source = google_compute_disk.node_1_data[count.index].id
    mode   = "READ_WRITE"
  }

  labels = {
    app  = "cockroachdb-self-hosted"
    role = "node"
  }
}

Related views

Sources

Reference architecture: CockroachDB Self-Hosted for five-node-medium, version CockroachDB v26.x recommended production settings, retrieved November 11, 2026.

https://www.cockroachlabs.com/docs/stable/recommended-production-settings

Pricing: Google Cloud pricing snapshot, retrieved November 29, 2026.

Commercial pricing only. GovCloud, sovereign cloud, and discounts beyond those shown are not modelled.

Not included in this estimate

  • Vendor licensing and support
  • Professional services
  • Network egress
  • Compliance controls
  • Backup storage
  • Monitoring

Based on CockroachDB v26.x self-hosted production hardware recommendations (4 GB RAM per vCPU, up to ~2.5 TB logical capacity per node).

Estimate excludes CockroachDB Enterprise licensing, backup object storage, Kafka changefeed sinks, and cross-AZ/cross-region replication egress.

Related workloads on Google Cloud