SOLUTIONS · CLOUD EXIT

Cloud exit & PostgreSQL migration

Assess managed databases, cloud virtual machines and your own infrastructure against cost, reliability and operational responsibilities.

The right deployment model depends on workload, purchasing terms and team capabilities. Self-managed PostgreSQL offers direct control over configuration and infrastructure, while requiring ownership of capacity, upgrades, backup validation and incident handling. PGSTY can help assess these requirements and plan a staged migration.

Historical data — illustrative estimates

Database and compute pricing was captured in 2025-04; disk price references were captured in 2026-08-06. Other dates are listed in the sources. The calculator uses fixed assumptions and is not live pricing, a PGSTY quotation or a savings guarantee. Staffing, migration, networking, additional backups, taxes and risk costs are not fully included, so the results are not a complete total cost of ownership.

Review assumptions and sources →

THE LEDGER

Database, compute and object storage references

Historical reference prices are normalised to common units. Instance specifications, hardware capability, redundancy and service scope are not equivalent; read the notes and sources alongside the charts.

01 · DATABASE · ¥/vCPU·MO

  • IDC self-host (Pigsty) ¥19
  • Aliyun ECS (1:8 RAM) ¥180
  • Aliyun RDS HA (1:2) ¥270
  • Aliyun PolarDB Enterprise (1:8) ¥400
  • Aliyun RDS HA (1:8) ¥432
  • AWS RDS single-AZ (1:4) ¥580
  • AWS RDS Multi-AZ (1:4) ¥1,160
  • AWS RDS Multi-AZ (1:8) ¥1,582
Aliyun = east-China HA list-price average; AWS = us-east on-demand at 7.24 CNY/USD · captured 2025-04[1][2]

02 · RAW COMPUTE · ¥/vCPU·MO

  • IDC container (5× oversold) ¥7
  • IDC dedicated server ¥19
  • UCloud VM (oversold) ¥25
  • AWS c5d.metal, 3-yr prepaid ¥80
  • Aliyun ECS (1:2, dedicated) ¥107
  • Aliyun ECS (1:8, dedicated) ¥180
  • AWS EC2 M5, on-demand ¥301
Historical compute examples; shared and dedicated instances do not provide equivalent performance guarantees[1][2]

03 · OBJECT STORAGE · ¥/TB·MO

  • AWS S3 Express One Zone ¥1,120
  • AWS S3 Standard ¥161
  • Self-host MinIO/Silo (3-replica) ¥44
  • Bare enterprise NVMe (baseline) ¥15
Historical object storage references; see notes and sources for dates and configurations. Service capability, redundancy and operational responsibilities require a separate comparison.[8]

AWS S3 Standard
Silo/MinIO self-host ×3
Bare NVMe baseline
View as table
Option1 TB10 TB100 TB1 PB
AWS S3 Standard ¥161/mo¥1,610/mo¥16,100/mo¥164,864/mo
Silo/MinIO self-host ×3 ¥44/mo¥435/mo¥4,350/mo¥44,544/mo
Bare NVMe baseline ¥15/mo¥145/mo¥1,450/mo¥14,848/mo

CALCULATOR

Explore the cost assumptions

Adjust compute, memory, nodes, storage, billing term and support tier to explore this model. Results are illustrative estimates based on historical data.

RAM ratio
Term
Currency
Show

Aliyun RDS
AWS RDS
Aliyun ECS + Pigsty
IDC self-host + Pigsty
View cost breakdown
OptionComputeStorageSubscriptionTotalMultiple

Model: total = compute + storage (+ subscription on self-host rows). RDS at 1 node = basic single instance; 2 = HA pair; more = HA pair + read replicas (estimated). AWS long terms use 3-yr reserved (no 5-yr tier). Storage priced at Aliyun ESSD PL1 ¥1/GB·mo, AWS gp3 $0.08/GB·mo, self-host NVMe ¥14.5/TB·mo; cloud storage is counted once, conservatively (verify actual replication and storage billing with the provider), self-host carries one full copy per node. Discount ladder: on-demand 1.5× · monthly 1× · 3-yr 0.45× · 5-yr 0.32× (Aliyun's ladder, applied to ECS as an estimate); no term discount applied to storage. People costs excluded on both sides.

METHODOLOGY & SOURCES

  • Database & compute reduce to ¥ per vCPU·month (monthly instance price ÷ vCPU); object storage to ¥ per TB·month. Aliyun = east-China list prices (captured 2025-04); AWS = us-east at 7.24 CNY/USD; disk prices and subscription terms captured 2026-08-06.
  • The ¥19/vCPU·mo self-host figure is a dedicated 64C/384G server over five years — same order as Tantan's (¥19.5) and DHH's (~¥25) published numbers; NVMe at ¥14.5/TB·mo is an enterprise drive over five years.
  • Aliyun RDS single-instance ≈ HA price ÷ 2.35 (the list-price ratio across the dedicated basic series); AWS Multi-AZ = 2 × single-AZ (list relationship).
  • Prices move — verify against the vendors' own pages: AWS RDS for PostgreSQL pricing · Alibaba Cloud price calculator.
  1. Managed database cost analysis — vonng.com/en/cloud/rds/
  2. Cloud compute cost analysis — vonng.com/en/cloud/ecs/
  3. Cloud block storage cost analysis — vonng.com/en/cloud/ebs/
  4. Cloud and local infrastructure — vonng.com/en/cloud/paradigm/
  5. 37signals: published cloud-exit account — vonng.com/en/cloud/odyssey-done/
  6. Ahrefs: published infrastructure cost comparison — vonng.com/en/cloud/ahrefs-saving/
  7. RedNote: infrastructure discussion — vonng.com/en/cloud/rednote-cloud-exit/
  8. Object storage cost analysis — vonng.com/en/cloud/s3/

PUBLIC REFERENCES

Published industry experiences

37signals · DHH

$10M / 5 yr

Moved seven apps including HEY off AWS onto owned hardware. Savings passed $1M in year one and ran ahead of projections.

Source [5] →

Ahrefs

$400M / 3 yr

The search-index giant priced its own datacenter against AWS list prices, line by line: staying off the cloud saved roughly $400M over three years.

Source [6] →

Tantan · 探探

25,000 vCPU

Runs PostgreSQL & Redis on ~25,000 self-hosted cores at millions of QPS, with a DBA team of two to three — the ¥19.5 core·month reference behind the chart above.

Source [1] →

RedNote · 小红书

Self-host first

A platform that grew up in the cloud-native era, now steering its infrastructure strategy toward self-hosting first.

Source [7] →

These are third-party reports or cost analyses, not PGSTY customer cases, endorsements or predictions for your project. Consult the linked sources for context.

THE ROAD

A staged assessment and implementation

Establish requirements, validate the design in a pilot and rehearse the migration. Scope can be agreed for each stage; related prices below are starting points.

1Assess
  • Inventory instances, specs, dependencies
  • Run the TCO math on your real bill
  • Flag the hard parts, order the moves

≈ Quick Consultation $30 / issue · Expert Session $400 / session

2Pilot
  • Prepare a separate test environment
  • Move a non-critical workload first
  • Test failover and backup recovery

≈ Open Source · Free

3Migrate
  • Select and configure suitable data replication
  • Rehearse cutover and rollback
  • Execute and validate in an agreed change window

≈ Incident Assistance $4,000 / day

4Operate
  • Establish HA and backup verification procedures
  • Assign monitoring, alerting and on-call ownership
  • Arrange ongoing technical support

≈ Subscription from $8K/year

REQUIREMENTS

Responsibilities to clarify before deciding

Staffing and operational processes

Automation reduces repetitive work, but does not replace clear ownership. Assess capacity, upgrades, monitoring, incident response and recovery testing, along with any additional support your team needs.

Availability and recovery objectives

Define failure domains, replication and backup retention against business objectives, then test failover and recovery. A demo or default configuration does not replace production acceptance.

Security and regulatory requirements

Data residency, access, keys, logs, patching and audit requirements depend on your business and jurisdiction. Your security and compliance teams should establish requirements and review the proposed architecture.

WORK WITH PGSTY

Let's talk about your next project.

Tell us about your environment, objectives, and timeline. We will help you define the next step.

FAQ

Cloud-exit questions, answered

Is self-managed PostgreSQL always less expensive?

No. Cost depends on workload, pricing agreements, utilisation, staffing, resilience requirements and migration effort. This historical model is an initial illustration; a decision needs current quotes and a complete assessment for your environment.

What operational skills do we need?

Automation can reduce repetitive work, but a team still needs to own access control, capacity, upgrades, recovery testing and incident decisions. An assessment helps identify these responsibilities and any support needed.

How are high availability and recovery addressed?

Pigsty integrates Patroni and etcd for failover and pgBackRest for backup and recovery. The topology, recovery objectives and operating procedures must be designed and tested for your workload; the software alone does not establish a service guarantee.

How much downtime does migration require?

The window depends on database size, schema, replication options and application behaviour. We assess compatibility, rehearse the migration and agree validation and rollback steps before setting a cutover window.

Can you assess a migration from another database?

Yes. Start with the source engine, schema, extensions, application dependencies and workload. Compatibility options do not make every application portable; the assessment establishes the required changes and a realistic scope.