CockroachDB Self-Hosted
Self-hosted CockroachDB v26.x for resilient distributed SQL workloads needing serializable transactions and multi-zone survivability.
Medium — 48 TB high-throughput S3 object and AI dataset storage with dedicated filers
Monthly cost
$6,502.44
Annual cost
$78,029/year
| Compute | $2,575.44 |
| Storage | $3,927.00 |
| Other | $0.00 |
Saves $282.07/mo (4%) across m8g.large, m8g.2xlarge.
| Role | Instance | vCPU | GB RAM | Storage |
|---|---|---|---|---|
| Master | 3 × m7i.large | 2 | 8 | 50 GB ssd |
| Filer S3 | 2 × m7i.2xlarge | 8 | 32 | 300 GB nvme |
| Volume Server | 6 × m7i.2xlarge | 8 | 32 | 8 TB ssd |
This medium AWS sizing fits a 48 TB high-throughput S3 object and AI dataset storage workload using dedicated filers. Storage drives the monthly cost at thirty-nine hundred twenty-seven dollars out of the total six thousand five hundred two dollars and forty-four cents. High availability is disabled across the master, filer, and volume servers. Migrating this deployment to Google Cloud requires re-evaluating equivalent machine types and persistent disk performance limits.
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 = "seaweedfs-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 = "seaweedfs-subnet-${count.index + 1}"
}
}
# Generated for AWS (us-east-1) from the current estimate state.
resource "aws_instance" "master_1" {
count = 3
ami = data.aws_ami.debian_12_x86.id
instance_type = "m7i.large"
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 = "seaweedfs-master-1-${count.index + 1}"
App = "seaweedfs"
Role = "master"
}
}
resource "aws_ebs_volume" "master_1_data" {
count = 3
availability_zone = local.azs[count.index % length(local.azs)]
size = 50
type = "gp3"
encrypted = true
tags = {
Name = "seaweedfs-master-1-data-${count.index + 1}"
App = "seaweedfs"
Role = "master"
}
}
resource "aws_volume_attachment" "master_1_attach" {
count = 3
device_name = "/dev/sdf"
volume_id = aws_ebs_volume.master_1_data[count.index].id
instance_id = aws_instance.master_1[count.index].id
}
resource "aws_instance" "filer_s3_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 = "seaweedfs-filer-s3-2-${count.index + 1}"
App = "seaweedfs"
Role = "filer-s3"
}
}
resource "aws_ebs_volume" "filer_s3_2_data" {
count = 2
availability_zone = local.azs[count.index % length(local.azs)]
size = 300
type = "gp3"
encrypted = true
tags = {
Name = "seaweedfs-filer-s3-2-data-${count.index + 1}"
App = "seaweedfs"
Role = "filer-s3"
}
}
resource "aws_volume_attachment" "filer_s3_2_attach" {
count = 2
device_name = "/dev/sdf"
volume_id = aws_ebs_volume.filer_s3_2_data[count.index].id
instance_id = aws_instance.filer_s3_2[count.index].id
}
resource "aws_instance" "volume_server_3" {
count = 6
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 = false
root_block_device {
volume_type = "gp3"
volume_size = 50
encrypted = true
}
tags = {
Name = "seaweedfs-volume-server-3-${count.index + 1}"
App = "seaweedfs"
Role = "volume-server"
}
}
resource "aws_ebs_volume" "volume_server_3_data" {
count = 6
availability_zone = local.azs[count.index % length(local.azs)]
size = 8000
type = "gp3"
encrypted = true
tags = {
Name = "seaweedfs-volume-server-3-data-${count.index + 1}"
App = "seaweedfs"
Role = "volume-server"
}
}
resource "aws_volume_attachment" "volume_server_3_attach" {
count = 6
device_name = "/dev/sdf"
volume_id = aws_ebs_volume.volume_server_3_data[count.index].id
instance_id = aws_instance.volume_server_3[count.index].id
}
Reference architecture: SeaweedFS Object Store for dedicated-filer-cluster, version SeaweedFS 3.80+ production Raft master, volume & S3 filer setup, retrieved November 11, 2026.
https://github.com/seaweedfs/seaweedfs/wiki/Production-Setup
Pricing: AWS pricing snapshot, retrieved November 22, 2026.
Commercial pricing only. GovCloud, sovereign cloud, and discounts beyond those shown are not modelled.
Based on SeaweedFS production deployment guidance separating 3-node Raft masters, stateless S3/Filer gateways, filer metadata backing stores, and storage-dense volume servers.
Estimate models raw block storage before replication or Reed-Solomon 10+4 erasure coding overhead and excludes cross-region S3 egress.
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.