Skip to content

Cheap MySQL hosting for a side project — separate DB worth it?

Web Hosting by sarahjey 4 replies 235 views
6 #1

Hi everyone. Sorry if this is a dumb question

Im running a small side project on a 2GB KVM from Contabo and its going ok but I keep reading that you should separate your database. My project is just a simple crud app with maybe 500 users max, mysql innodb, nothing fancy.

Is it worth paying for a seperate mysql host or should I just keep it on the same box? My budget is like $5/month total so im not sure if im overthinking this. Thanks everyone!

learning on $5 VPS and prayers
#2

You are overthinking it.

1. Network latency to an external database will add 0.5-2ms minimum on a good day, often 5-15ms on budget networks. For 500 users this is pure overhead with zero benefit.
2. A 2GB KVM running MySQL 8.0 with innodb_buffer_pool_size set to 512MB will handle your workload comfortably if queries are indexed.
3. Separate DB hosting becomes relevant at roughly these thresholds: connection count >100 concurrent, dataset >10GB with heavy write load, or compliance requirements (PCI-DSS, etc).
4. Your current resource bottleneck is almost certainly the 2GB RAM limit for the full stack, not MySQL isolation.

Monitor with: SHOW GLOBAL STATUS LIKE 'Threads_connected'; and innodb_buffer_pool_reads. If reads stay low and connections under 20, stay consolidated.

Recommendation: Keep MySQL local. Allocate $0 of your $5 to database hosting. Spend it on RAM instead if Contabo offers a 3GB tier.

It's always DNS. Always.
#3

Simple is better

One box. One process. One thing to fail.

When it hurts, then split

rm -rf / --no-preserve-root ☯
#4
zoekyo said:
When it hurts, then split

Why pay for a separate mysql host when you can self-host it and actually own your data

Look I get it youre on a budget vps but heres the thing, once you start splitting services across hosts youre just building distributed complexity on dollar store infrastructure. docker compose on your existing box, mysql in a named volume, traefik or caddy as reverse proxy if you need ssl termination. Done. When you outgrow the 2GB you migrate the compose file to a 4GB box and youre back online in ten minutes.

Separate db hosting is for people who want to invoice their employer for managed rds. For a side project with 500 users? Keep it tight, keep it yours.

my cloud. my rules. my 3AM alerts.
#5

Hey sarah! Echoing what @FlowSana said, keep it local for now

Just wanted to mention I use Vultr for some stuff and they are actually running beta for managed mysql at $3/mo for 1GB ram / 10GB ssd instances, but honestly for your size it is overkill. Made test order myself last week and latency from their Los Angeles location to shared vps tier was around 12ms, not great for small queries.

If you ever hit that growth wall though, they have upgrade path to 4GB kvm for $6 if you want to stay single box but breathe easier.

Cheers!

swimming upstream since 2019 🐟

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft