Question

Droplet MySQL vs Managed MySQL [Speed and Migration]

  • Posted December 9, 2021
  • MySQL

New to Digital Ocean and cloud in general (only used shared and VPS hosting)

Currently use cPanel on a VPS (with LiteSpeed) and was thinking about a managed MySQL service as think that may run data-intensive queries faster than MySQL within a droplet. Does having more vCPUs in a managed database help with speed?

The current MySQL database is around 6GB and from my understanding, having RAM greater than this will also help with performance as everything essentially will become in-memory.

Would there be any performance gain/loss from a managed database when having a droplet running cPanel? Can cPanel default to use the managed database for things like PHPmyAdmin and for creating databases and database users?

Is it easy to push a cPanel migration database from a droplet to the managed database?

Subscribe
Share

Just to also note, really looking for MySQL to run as quick as possible - have a lot of data intensive queries


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

There are a few main benefits to consider about the Managed MySQL Clusters:

  • Automatic updates. You can select a date and time during which weekly automatic updates for the database engine and operating system will occur to keep the service stable and secure.

  • Daily point-in-time backups. Full cluster backups are taken daily and write-ahead-logs are maintained to allow you to restore to any point-in-time within the previous seven days.

  • High availability with automated failover. In the event of a failure, managed databases with a standby node will automatically switch data handling to the standby node to prevent unplanned downtime. Learn more about high availability for managed databases.

  • End-to-end security. Data is encrypted at rest with LUKS and in transit with SSL.

  • Cluster metrics and alerting.

  • The ability to add Read replicas with just a click of a button.

If you decide to go for an unmanaged MySQL instance, I could suggest following the steps here on how to tweak MySQL for optimal performance:

https://www.digitalocean.com/community/questions/how-to-tweak-mysql-mariadb-configuration-for-increased-performance-and-stability

This guide will show you how to use a tool like the MySQLTuner script to optimize your MySQL configuration for better stability and performance.

I did a few quick tests with one of my databases and here are the results:

  • Managed Database:
+----------+
| count(*) |
+----------+
|  4638507 |
+----------+
1 row in set (2.55 sec)
  • Unmanaged Database without any tweaking:
+----------+
| count(*) |
+----------+
|  4638507 |
+----------+
1 row in set (4.03 sec)

Keep in mind that the results may vary based on your data, structure, and indexes.

However as mentioned, performance is not the only convenience to consider when choosing a managed vs unmanaged service.

What I could suggest in your case is spinning up a Managed cluster, and running a few tests with your own queries and data to see how it performs.

Also if you have long-running queries that are quite intensive, you could try running them on different read replicas, that way one query would not affect the others.

Alternatively, if you need really low latency responses, what I could suggest is using a tool Materialize which is a database for Real-time Analytics. You will still have your MySQL database in place, but by using a tool like Debezium you can stream the data out of MySQL into Materialize and then use Materialize for your data analytics.

For a quick overview you can take a look at this tutorial here:

https://devdojo.com/bobbyiliev/how-to-join-mysql-and-postgres-in-a-live-materialized-view

Here is also a quick introduction video to Materialize:

Hope that this helps. Regards, Bobby