CockroachDB Self-Hosted
Self-hosted CockroachDB v26.x for resilient distributed SQL workloads needing serializable transactions and multi-zone survivability.
Medium — six-node RF3 cluster for mainstream distributed OLTP
Monthly cost
$4,378.13
Annual cost
$52,538/year
| Compute | $3,178.13 |
| Storage | $1,200.00 |
| Other | $0.00 |
Saves $31.54/mo (1%) across c4a-standard-16.
| Role | Instance | vCPU | GB RAM | Storage |
|---|---|---|---|---|
| Master Tserver | 3 × n4-standard-16 | 16 | 64 | 2 TB ssd |
| Tserver | 3 × n4-standard-16 | 16 | 64 | 2 TB ssd |
The medium sizing tier on Google Cloud delivers a six-node replication factor three cluster built for mainstream distributed online transaction processing workloads. Compute resources drive the monthly cost at this tier, totaling three thousand one hundred seventy-eight dollars and thirteen cents out of the four thousand three hundred seventy-eight dollar and thirteen cent total. Maintaining separate master and tserver nodes provides isolation for cluster metadata against heavy data traffic workloads.
Share the current URL or copy the 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" "master_tserver_1_data" {
count = 3
name = "yugabytedb-self-hosted-master-tserver-1-data-${count.index + 1}"
type = "hyperdisk-balanced"
zone = local.zones[count.index % length(local.zones)]
size = 2000
}
resource "google_compute_instance" "master_tserver_1" {
count = 3
name = "yugabytedb-self-hosted-master-tserver-1-${count.index + 1}"
machine_type = "n4-standard-16"
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"
}
attached_disk {
source = google_compute_disk.master_tserver_1_data[count.index].id
mode = "READ_WRITE"
}
labels = {
app = "yugabytedb-self-hosted"
role = "master-tserver"
}
}
resource "google_compute_disk" "tserver_2_data" {
count = 3
name = "yugabytedb-self-hosted-tserver-2-data-${count.index + 1}"
type = "hyperdisk-balanced"
zone = local.zones[count.index % length(local.zones)]
size = 2000
}
resource "google_compute_instance" "tserver_2" {
count = 3
name = "yugabytedb-self-hosted-tserver-2-${count.index + 1}"
machine_type = "n4-standard-16"
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.tserver_2_data[count.index].id
mode = "READ_WRITE"
}
labels = {
app = "yugabytedb-self-hosted"
role = "tserver"
}
}
Reference architecture: YugabyteDB Self-Hosted for rf3-six-node, version YugabyteDB v2025.2 LTS deployment checklist, retrieved April 13, 2026.
https://docs.yugabyte.com/stable/deploy/checklist/
Pricing: Google Cloud pricing snapshot, retrieved November 29, 2026.
Commercial pricing only. GovCloud, sovereign cloud, and discounts beyond those shown are not modelled.
Based on YugabyteDB deployment checklist guidance and public RF3 deployment examples, translated into VM-based planning tiers.
Estimate excludes backup controllers, xCluster replication, connection-manager sidecars, and multi-region networking or quorum placement costs.
Self-hosted CockroachDB v26.x for resilient distributed SQL workloads needing serializable transactions and multi-zone survivability.
Self-managed Couchbase Server Enterprise for distributed JSON data, caching, and full-text search workloads.
Self-managed EDB Postgres Advanced Server for enterprise PostgreSQL workloads with optional primary-standby HA.