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 working set on a production replica set
Monthly cost
$1,123.01
Annual cost
$13,476/year
| Compute | $883.01 |
| Storage | $240.00 |
| Other | $0.00 |
Saves $96.71/mo (9%) across m8g.2xlarge.
| Role | Instance | vCPU | GB RAM | Storage |
|---|---|---|---|---|
| Replica Set Member | 3 × m7i.2xlarge | 8 | 32 | 1 TB ssd |
This medium tier sizing fits production MongoDB replica sets with a working set between 250 GB and 1 TB. The primary cost driver is compute, totaling $883.01 per month across three m7i.2xlarge instances in us-east-1. Storage accounts for an additional $240.00 monthly for the attached solid-state drives. Running this architecture on Google Cloud requires migrating the deployment and adjusting instance families to match workload demands.
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 = "mongodb-enterprise-advanced-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 = "mongodb-enterprise-advanced-subnet-${count.index + 1}"
}
}
# Generated for AWS (us-east-1) from the current estimate state.
resource "aws_instance" "replica_set_member_1" {
count = 3
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 = "mongodb-enterprise-advanced-replica-set-me-${count.index + 1}"
App = "mongodb-enterprise-advanced"
Role = "replica-set-member"
}
}
resource "aws_ebs_volume" "replica_set_member_1_data" {
count = 3
availability_zone = local.azs[count.index % length(local.azs)]
size = 1000
type = "gp3"
encrypted = true
tags = {
Name = "mongodb-enterprise-advanced-replica-set-me-data-${count.index + 1}"
App = "mongodb-enterprise-advanced"
Role = "replica-set-member"
}
}
resource "aws_volume_attachment" "replica_set_member_1_attach" {
count = 3
device_name = "/dev/sdf"
volume_id = aws_ebs_volume.replica_set_member_1_data[count.index].id
instance_id = aws_instance.replica_set_member_1[count.index].id
}
Reference architecture: MongoDB Enterprise Advanced for replica-set-medium, version MongoDB Manual current self-managed production guidance, retrieved April 13, 2026.
https://www.mongodb.com/docs/manual/administration/production-notes/
Pricing: AWS pricing snapshot, retrieved November 29, 2026.
Commercial pricing only. GovCloud, sovereign cloud, and discounts beyond those shown are not modelled.
Based on MongoDB self-managed production notes and common MongoDB production topologies, translated into VM-style planning baselines.
Estimate excludes Enterprise Advanced licensing, Ops Manager infrastructure, backups, analytics nodes, and cross-region disaster recovery.
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.