iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up

SQL Hosting

You can run a database on your laptop, on a VM you manage, or on a fully managed cloud service. Most production apps in 2026 sit on managed.

The three tiers

TierExampleTrade-off
Self-hostedMySQL on a Linode VMCheapest, most work — you patch, monitor, back up.
ManagedAWS RDS, Azure SQL, Google Cloud SQLDatabase-as-a-service: provisioning, backups, failover. You pay extra.
ServerlessPlanetScale, Neon, Supabase, Aurora ServerlessAuto-scaling, branching, per-query pricing. Great for startups; surprising bills if you're not careful.

What managed gives you

  • Automatic point-in-time backups.
  • One-click read replicas and failover.
  • Encryption at rest and in transit by default.
  • Patching during a configurable maintenance window.
  • Monitoring dashboards and alerts.

What you still own

  • Schema design and migrations.
  • Query performance and indexes.
  • Application connection pooling.
  • Choosing the right size and tier — and downsizing when traffic drops.

Cost cheat-sheet

LeverEffect
Instance sizeCPU, RAM, max connections.
Storage GBLinear cost. IOPS often tied to it.
Read replicasOne per region — multiplies cost.
Backup retentionEach extra day = more S3-equivalent storage.
Tip: Start managed. Only move to self-hosted when you have a senior DBA and a clear business reason — bandwidth costs, sovereignty rules, or an unusual workload.

Example

Example
-- Common managed hosts:
-- AWS RDS, Azure SQL, Google Cloud SQL, PlanetScale, Neon, Supabase.
Try it Yourself »

Exercise

AWS managed relational database service is called…

AWS

Test yourself

Q1. Managed DB services give you…
Q2. A serverless DB is best suited to…
Q3. You still own…

Discussion

Loading…