MySQL on Instance, or MySQL VPS

So I’m giving DreamCompute a try, and my current setup is a VPS with MySQL VPS.

What I’m wondering is what other people are doing with MySQL? Are you adding it to your instance, or keeping it separate?

I’m leaning towards the latter for just now, as it means one less thing to transfer if I switch, but would I be better off moving MySQL to my instance as well?

As long as your shared and/or VPS hosting services are located in the US-East (Ashburn, VA, USA) datacenter where DreamCompute is currently located, in most real world usage situations you should see no real noticeable speed difference between a MySQL VPS and local MySQL on DreamCompute. If you are doing a lot of data shuffling between web and MySQL, then it would benefit to be local.

For convenience, the MySQL VPS also makes daily automated backups for you, which is something you would have to setup yourself on DreamCompute if you wanted that.

If you want to take a look at what it would take to setup MySQL on a Debian or Ubuntu DreamCompute instance, here are some instructions:

Does the MySQL VPS do this using typical MySQL dumps, or is there a more efficient way to do it? If I can decide on the right command to use it should be something I can implement myself easily enough.

Correct, basically a mysqldump is ran on it generally around midnight to 1am pacific time, and are kept for 5 or so days. If you know specifics about your database structure, there are other methods to do backups specific for them but unless you have very large tables that might get locked for longer periods of time by a mysqldump, a mysqldump is generally the easiest option.

So I’m currently still trying to decide whether I should move e-mail to my DreamCompute instance or not, but I was wondering; if I were to cancel my VPS web-host but retain my MySQL VPS, would this be enough to retain my managed e-mail accounts as well? It seems like DreamCompute + MySQL VPS + managed e-mail could give me the best of all worlds, as I get the flexibility I need for the web-host via DreamCompute, a separate MySQL (virtual) server with its own resources and separate e-mail (with redundancy I believe, as I see two MX records for Dreamhost managed e-mail domains).

My web-hosting needs aren’t super demanding, but while nginx + HHVM + MariaDB on the same single-core instance is generally very fast, the database does seem to be the weakest link at the moment (it doesn’t seem to like sharing that single core much) resulting in slow queries; not loads really, something like 0.3%, but that’s still more than my MySQL VPS used to get (which was to say almost none), and I doubt adding e-mail will make it any happier. Of course if I put everything on one DreamCompute instance I could upgrade to a four-core instance after my free trial ends, but there’s something to be said for spreading them out I think.

So yeah; is a MySQL VPS enough for me to retain managed e-mail, or is it only a regular VPS or shared host that qualifies? Also; where do I currently find out what I’m paying for my MySQL VPS? I know it’s not a lot, but with the updated control panel I can’t seem to find the old VPS billing breakdown which showed prices alongside discounts etc., I can only find invoice entries for what I paid in total.

I’m not sure I understand what you mean by “move e-mail to my DreamCompute”: at first I thought you wanted to run SMTP/IMAP services on your own on DreamCompute, which would be unmanaged… but later you say you want to keep your managed email…

If you’re referring to managed email, you will keep it if you retain any of the hosting products like VPS, MySQL VPS and even a shared hosting will do.

Can one run SMTP/IMAP on DreamCompute? How long could one retain a specific floating IP address?

This is what I ended up doing, and have been using it this way since December.

It’s a lot of work to setup though, as you need to install and configure postfix (for SMTP) and dovecot (POP/IMAP) at the bare minimum. I also added a bunch of other features for anti-spam such as spam-assassin, postgrey (grey-listing rejects e-mail from unknown sources, forcing them to resend after a delay if they’re legitimate), and sieve (which performs the actual filtering of spam into a junk folder).

If you want web-mail then you also need to setup a web server and usually PHP (I did nginx, MariaDB and PHP7), plus the web-mail service itself (I opted for Roundcube with the manage sieve plugin).

You also need some form of backup strategy; I ended up writing a script to perform local incremental rsync back-ups, plus another script to send those back-ups to Dream Objects via Duplicity.

Oh, and you also want to setup security certificates so you can use SSL connections; I opted to use Let’s Encrypt as a provider for this as you can write another script to automatically install and refresh your certificates, in this case you definitely need the web-server components as you need to be able to verify the domain(s) are yours.

It took me the better part of two weeks to get everything set up and configured, plus I’ve had to make a few tweaks or here or there, and have to periodically install updates.

I actually kind of enjoyed setting everything up and tweaking it all to the best of my ability. The main challenge is finding good guides to follow as so much stuff is out of date if you look for tutorials, but the official guides for each product aren’t always the best. Having total control does have its advantages though, as you can enable a bunch of features that Dreamhost don’t (for simplicity), plus the end result can be incredibly lean (I got everything running on a basic Dream Compute instance with almost half its memory to spare, though I’m going to either upgrade to the more powerful instance or get a second one at some point).

The guide I mostly followed was from Arstechnica and can be found here (it’s in four parts). It’s not completely up-to-date, so anywhere it mentions downloading a package with git you’ll want to have a look in aptitude first as it’s probably already there; except for Roundcube I don’t recall having to download any packages outside of aptitude. They also use Startssl for encryption but I’d recommend Let’s Encrypt; if you only have the one domain to encrypt then it’s pretty easy to configure, in fact if you setup nginx then the command to update it is dead easy, you just need to make sure you also reload dovecot and postfix afterwards (so they use the updated certificate too).

Hope this helps; if it puts you off then it probably should, as it’s not an easy thing to do. If you’re pretty confident with command line Linux though it might be worth a try; the free trial period is long enough that you could try setting it up then actually move stuff across later, for transitioning I held onto my Dreamhost e-mail account by using to connect to it, this way even once you redirect the domain to your new e-mail server you can still grab your current mail and transfer it across. I found this preferable to restoring from a local copy as apparently what OS X Mail calls “mbox” format isn’t what everybody else considers it to be. Dragging and dropping in a mail client is slow, but it actually works.

Thanks for the detailed info. Let’s Encrypt sure is coming handy these days.

How about the IP address? Has it changed on you yet?

Sorry, forgot to answer that part, no it hasn’t changed at all; I believe it lasts for the lifetime of the instance. It’s the main way to access the machine via SSH anyway, at least until you configure a domain.

It hasn’t changed even with server restarts, so it seems tied to the virtual machine instance the server runs inside rather than the server itself, so as long as you don’t discard that it should never change. I don’t know yet if upgrading requires a new instance (since I’ve yet to try), so that might change the IP if you decide to opt for more RAM after the trial ends, but that’s just a short downtime for DNS propagation, there are some ways around that too (which is part of why I’m considering two instances).

Good to know. Thanks!