On-prem, a managed cloud service, EC2, or Kubernetes?
You will learn: the seven ways to run a database, who does which job in each, how to compare the full cost including people, and where I would run each of the fourteen applications in the design docs.
The engine decides how the data behaves. Where it runs decides who gets paged, what you are allowed to change, and what the bill looks like. None of these options changes the physics on the rest of this site: a commit still waits for the log, and a long transaction still bloats the table. They change who owns the work around it. For the engine-by-engine detail, see On-prem vs cloud.
Four questions. The answer is a starting point for the discussion, with the reason and what stays yours.
Your servers, in your data center or a colocation facility.
The same engine you would install on-prem, on a rented virtual machine.
The provider runs the engine for you. You get an endpoint, not a server.
Managed engines whose storage layer was rebuilt for the cloud. Compute and storage are separate.
Capacity that scales up and down with the load, sometimes to zero when idle.
The non-relational stores in the design docs, run by their vendor or the cloud provider.
The database runs in pods, declared in YAML, and an operator (CloudNativePG, Percona, Oracle MySQL, MongoDB) handles failover and backups.
Who owns each job
Read across a row to see where a job moves. Restore tests and the schema stay yours in every column.
| Job | On-prem | VMs (EC2) | Managed | Kubernetes |
|---|---|---|---|---|
| Hardware and data center | You | Provider | Provider | Provider, or your platform team on-prem |
| OS patching | You | You | Provider | Platform team (nodes) and the image (engine) |
| Engine minor upgrades | You | You | Provider, in a window you choose | You change the image, the operator rolls it |
| Major version upgrades | You | You | You plan and test, the provider runs it | You, with operator support that varies |
| Backups | You build them | You build them, plus disk snapshots | Provider, automated, with point-in-time recovery | The operator, to a bucket you configure |
| Restore tests | You | You | You | You |
| Failover | You: Patroni, Orchestrator or a runbook | You, the same way | Provider | The operator |
| Monitoring | You | You | Provider metrics, plus your alerts | You: Prometheus and dashboards |
| Tuning | Every setting | Every setting | Inside what the provider allows | In the cluster spec |
| Schema, indexes, queries | You | You | You | You |
| Capacity and the bill | You buy ahead | You resize | You pick sizes; storage can grow | You size nodes and volumes |
Restore tests and the schema are yours in every column. That is the part of the job no provider takes.
Comparing only the invoices favors self-managing every time, because the people cost is not on them. Put both in.
The numbers below are an example, not prices. Replace the monthly bills with quotes from your provider's calculator and your hardware vendor, and the hours with your team's estimate.
How much one commit costs on a cloud disk: Notebook 2.
For a team without a dedicated database team, which is most teams. With a strong DBA or platform team and a large, steady load, the self-managed options move up.
| Application | Where I would start | When it grows |
|---|---|---|
| Online store: orders and inventory | Managed relational with a standby in another zone | Cloud-native managed (Aurora, AlloyDB) for read replicas, or self-managed on VMs if the steady bill justifies a team |
| Payments and ledgers | Managed relational with synchronous standby (RDS Multi-AZ or equivalent) | The same, plus cross-region copies. Self-managed only with a team that rehearses failover |
| Bookings and reservations | Managed relational, plus a managed queue for on-sales | The same. The spike is handled by the queue, not by a bigger database |
| User accounts, logins and sessions | Managed relational, plus managed Redis or Valkey | The same |
| Multi-tenant SaaS | Managed relational, shared schema | Managed for the shared tier. Kubernetes with an operator, or many managed instances, for tenants that get their own database |
| Product catalog | Managed relational, plus a managed search service | The same, with a CDN in front |
| Social feed and timelines | Managed relational, plus managed Redis | Managed or self-managed wide-column store on VMs with local NVMe and replicas |
| Search and AI retrieval | Managed PostgreSQL with pgvector | A managed search or vector service once the index outgrows memory |
| Chat and messaging | Managed relational with time partitions | Managed Cassandra-compatible service, or self-managed Cassandra or ScyllaDB on VMs |
| IoT, metrics and telemetry | A managed time-series or ClickHouse service | Self-managed on VMs when volume is high and steady, and storage cost dominates |
| Audit logs and event history | In the same managed database as the action | Old partitions exported to object storage |
| Leaderboards, counters and rate limits | Managed Redis or Valkey | The same. MemoryDB-style durable options if the totals must survive a failover |
| Analytics and reporting | A managed warehouse or ClickHouse Cloud, fed by CDC | The same. Self-managed ClickHouse on VMs if scan costs are high and the team exists |
| Agent memory and state | Managed PostgreSQL with pgvector, plus managed Redis or Valkey | A pooler in front when it grows; a dedicated vector service only once the memory index outgrows one machine's memory |
The same mechanism, replication and failover, backups and restore, elsewhere on the site: in real incidents, in measurements, and in designs.
Pick an answer. You will see whether it is right, and why.
1. Which job stays yours in every option, including managed?
The provider can take backups. Only you can prove a restore works for your data. The schema stays yours too.
2. Can the standby of an RDS Multi-AZ DB instance serve reads?
It is a synchronous standby for failover. For reads, use a read replica or a Multi-AZ DB cluster.
3. An Aurora Serverless v2 database paused at zero capacity. What does the first connection see?
Longer after a day of sleep. Set client timeouts and retries for it. This needs a recent engine version with minimum capacity set to 0 ACUs; older versions never pause.
How do I run it in production? What to check when it is slow or broken, where it runs and what it costs, how big it must be, pooling, backups, security, upgrades and other changes made safely.