Personal thoughts and findings while playing around with Amazon remote database services.
- I compared LightSail managed database vs RDS vs Aurora.
TL;DR – they’re not worth it in terms of performance.
My idea was to play with remote databases and see how fast they were and how they might be used to deal with heavy websites with many queries. For the most part…they’re fast enough as a remote database service (assuming you’re in the same DC). But just not all that fast. Details below…
- I took a bloated client ecommerce site and cloned it to a Lightsail instance.
- Then fired up 3 different managed database services on AWS (Lightsail DB, RDS, and Aurora).
- Then benchmarked them all against each other, of course using the local DB as a baseline.
- I don’t remember but I believe the database instances were equal size or bigger than even the web server. (I think I put $5/month for web-server and then around $5-20/month for each database server.)
For the most part, remote databases just aren’t all that fast. Adding an extra proxy will definitely produce a noticeable increase in load time. So where are the gains and where are the tradeoffs/break-even point?
I feel like remote databases probably originated as a scaling solution to deal with the issue of database size rather than database performance. So managed database services work out well (producing performance gains) if you have a 500GB database that won’t fit on your server. But what if you’re just a 500MB database with inefficient queries? Remote databases won’t help you much there.
Or another way of putting it…driving 5 miles is way faster than walking 5 miles. But what if you only have to go 2 houses down the street? Walking is probably faster in that case. Even if you’re a super slow walker.
If you’ve got that many queries and really long complex ones, and millions of traffic…ok, you might start to see performance gains otherwise, it’s not worth the hassle for common folk.
Some things I noticed:
- Lightsail DB – kinda slow. It’s supposedly built on RDS but it feels slower than RDS, that’s for sure. It’s very easy to set up and cheap.
- RDS – faster and with tons of options. Can upsize or downsize. There’s performance monitoring, snapshots, metrics. Basically an airplane cockpit full of controls.
- Aurora – I didn’t notice any real difference over RDS. WordPress is probably way too simple to really maximize Aurora’s benefits.
Want to play with things yourself?
- Create Lightsail server – make sure you open all necessary ports in the server (ssh, etc).
- Create Lightsail managed DB – very easy and cheap but not such great performance…definitely slower than on local server. Enable for public accessibility if managing remotely (probably yes, because you’ll have to import DB with MySQL Workbench).
- Create RDS like mariaDB – open inbound port for all IP, enable for public accessibility.
- Create Aurora from RDS panel – same as above.
- Then compare all 3. Lightsail managed DB, RDS, and RDS Aurora.
- RDS is really technical.
- Oh yeah, don’t forget to make sure all your instances are in the same datacenter. Hahaha!