CockroachDB Self-Hosted
Self-hosted CockroachDB v26.x for resilient distributed SQL workloads needing serializable transactions and multi-zone survivability.
Medium — 250 GB to 1 TB database size for mixed read and write OLTP
Monthly cost
$507.27
Annual cost
$6,087/year
| Compute | $397.27 |
| Storage | $110.00 |
| Other | $0.00 |
Saves $3.94/mo (1%) across c4a-standard-8, c4a-standard-2.
| Role | Instance | vCPU | GB RAM | Storage |
|---|---|---|---|---|
| Primary | 1 × n4-standard-8 | 8 | 32 | 1 TB ssd |
| Connection Pooler | 2 × n4-standard-2 | 2 | 8 | 50 GB ssd |
This medium tier architecture on Google Cloud supports database sizes from 250 GB to 1 TB for mixed read and write OLTP workloads. Compute drives the monthly cost at this tier, totaling $397.27 out of the $507.27 total expense. High availability is disabled in this configuration, which reduces infrastructure overhead but introduces a single point of failure for the database primary node.
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" "primary_1_data" {
count = 1
name = "edb-postgres-advanced-server-primary-1-data-${count.index + 1}"
type = "hyperdisk-balanced"
zone = local.zones[count.index % length(local.zones)]
size = 1000
}
resource "google_compute_instance" "primary_1" {
count = 1
name = "edb-postgres-advanced-server-primary-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.primary_1_data[count.index].id
mode = "READ_WRITE"
}
labels = {
app = "edb-postgres-advanced-server"
role = "primary"
}
}
resource "google_compute_disk" "connection_pooler_2_data" {
count = 2
name = "edb-postgres-advanced-server-connection-pooler-data-${count.index + 1}"
type = "hyperdisk-balanced"
zone = local.zones[count.index % length(local.zones)]
size = 50
}
resource "google_compute_instance" "connection_pooler_2" {
count = 2
name = "edb-postgres-advanced-server-connection-pooler-${count.index + 1}"
machine_type = "n4-standard-2"
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.connection_pooler_2_data[count.index].id
mode = "READ_WRITE"
}
labels = {
app = "edb-postgres-advanced-server"
role = "connection-pooler"
}
}
Reference architecture: EDB Postgres Advanced Server for primary-standby-medium, version EPAS 18 requirements with current HA deployment guidance, retrieved April 13, 2026.
https://www.enterprisedb.com/docs/epas/latest/planning/planning_prerequisites/epas_requirements/
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 EDB Postgres Advanced Server requirements and public high-availability guidance, translated into VM-based planning tiers.
Estimate excludes backup storage, WAL archiving, tuning-specific IOPS requirements, logical replication, and any separate management tooling.
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 InfluxDB Enterprise for high-ingest time-series telemetry, operational monitoring, and sensor analytics.