Sneaky Changes Afoot..
March 16, 2006 on 5:12 pm | In Hardware, Insider View, New Features by Josh Jones |
We’re making some changes to the way we do MySQL…
One of the most popular suggestions we have is to be able to have multiple databases per hostname. Along with that, people want to be able to use the same mysql username to access multiple databases. To top it off, they are even so bold as to want one PhpMyAdmin management area for all the databases on their account!
This hasn’t been possible with our system since very near the beginning, because our customer database servers are separate from our web servers. That’s why you can’t use “localhost” to connect to your database. It is not why your database may sometimes seem slow. The reason for that (if it happens) is because the database server itself is overloaded (or maybe dns was messed up). And actually, if it had been the same physical machine as your web server, that would have also meant all the websites on that server would be slow too (not just the ones accessing that database server). SO THERE!
But that’s not really why we kept our database servers separate from our web servers. The main reason is we mount the file system on our web servers over NFS, and that is just noooo good for MySQL performance. The other reason is we do performance tweaks on our MySQL servers that we wouldn’t want to do on Apache servers.
Now, when you’ve got your database servers separated from your web servers, you’ve got to have some way to determine which database server new databases go on.
The simplest thing, I guess, would be to just assign database servers to particular web servers.
If we’d just done that, everything people are asking for now would have always been possible!
But, there is one teeensy drawback with doing it that way. It’s not the most efficient use of hardware.
And when you’re a self-funded, completely independent, low-price, big-feature web host, efficient use of hardware is pretty much the difference between driving a ferrari and driving a limo. Let me explain (not the “driving a limo” part)…
Here are the three essential facts for your consideration:
1. Each database server has a maximum number of databases it can support.
2. Customers continue adding databases gradually for the life of their account with us.
3. Moving databases between servers causes some downtime and is a big pain in the admin’s behind.
So our solution to these three facts was to just make a current “active database server.” Any new MySQL created by a customer, regardless of their home web server, went on it, and when it filled up, we just added a new one.

That works great, and is pretty much the maximum efficiency you can get in terms of hardware use.. at any given time you only have one non-full database server, and it’s in the process of filling up pretty darn fast!
The only thing that doesn’t work great is one person’s databases are most likely spread across multiple servers… which means you need a separate hostname for each one, and most importantly, you can’t do all those things you Happy Customers clamor so loudly for! It also means if one database server poops its chute, a huge swath of customers are affected instead of just the ones on web servers tied to that database machine.
But still, it was the cheapest and easiest way to do things!
However.. we’re rich now and we like a challenge!
So, we’re in the process of changing our system to start assigning each new customer to a database server for life! What this means though, if we don’t want to move databases later (see fact 3 above), is we have to essentially “cut off” a database server before it’s “full’ (see facts 1 + 2). And that means add another database server sooner than we would otherwise have to.
But it also means all your databases will be on the same server, which means soon you WILL be able to manage them all from one hostname (and one username). It will also mean there’ll be less chance of your databases being affected should a random mysql server have problems. In fact, it also also means if you’re a heavy MySQL user and causing problems for your server, you’ll mostly be affecting your own performance and not too many unsuspecting neighbors!
It’s more expensive, but you guys are worth it!

36 Responses to “Sneaky Changes Afoot..”
Powered by WordPress. Pool theme by Borja Fernandez, modified by DreamHost.
Like WordPress? Consider attending WordCamp LA.
Entries and comments feeds.
^Top^
March 16th, 2006 at 6:10 pm
Awesome! This is the only really annoying thing about your hosting service, with this gone your service will be near perfect! :D
March 16th, 2006 at 6:43 pm
Thank you Dreamhost! You’ve saved my life!
Or, more accurately, are in the process of yet again making my life easier. Hear hear!
March 16th, 2006 at 7:09 pm
Brilliant! When can we expect this?
March 16th, 2006 at 10:25 pm
This sounds fabulous! This will be a wonderful addition for Dreamhost’s already plentiful array of features!
March 17th, 2006 at 12:39 am
“…assigning each new customer to a database server for life!”
…what about exsisting customers?
March 17th, 2006 at 2:39 am
Yeah, sounds great! Also, thanks for explaining your db server structure. :)
Hopefully this will help me manage my databases.
March 17th, 2006 at 2:43 am
Damn! That means if one of my CMS-powered site goes down because of database, ALL my sites will die at the same time, and they are not necessarily caused by me (i.e. by other users sharing the same database).
I actually don’t mind having my databases all over the place. I have written little scripts that take care of multiple MySQL boxes, and I even have my own phpMyAdmin installation that can manage all my databases in one centralised place.
D’oh. Is there a way to op out? Err, I mean, I want you guys to propsper and make lots of money by efficiently utilising database boxes…
March 17th, 2006 at 4:06 am
MySQL has always worked well for me in dreamhost, and now will be better :P
March 17th, 2006 at 4:07 am
It has always worked well for me and now will be perfect hehe
March 17th, 2006 at 6:36 am
I hope you aren’t doing that NFSing using Linux? There’s nothing quite like holding your data by the bits.
Personally I the old system wasn’t that bad :-P
Damien
March 17th, 2006 at 7:59 am
ooooh now I have 5 more credits to vote on stuff
March 17th, 2006 at 8:09 am
You guys are the best! BEST FRIENDS 4 LIFE!
-Customer For Life (because of things like this blog)
March 17th, 2006 at 9:26 am
hey sweet news!
March 17th, 2006 at 10:56 am
Nice
March 17th, 2006 at 11:45 am
I guess you’re saying now all your database-driven sites are in the same basket, whereas before you’d have had your eggs spread out across more baskets. That is true, now if your ONE server does go down, you’ll have problems with all your MySQL-based sites. However, the chances of ANY site going down is now much smaller, and we believe enough so that the grand total of site downtime will decrease (not just number of downtimes)!
For existing customers, all NEW databases will be assigned to the same server, but old ones will stay where they are forever, and not be able to be shared among the new hostnames/mysql users. You can always create a new database and remove the old one, after dumping all your data over of course!
March 17th, 2006 at 7:42 pm
I might spend this weekend migrating all my databases over to the new system, sounds good and i’ll finally be able to manage all databases from one phpmyadmin login :D
great stuff.
March 17th, 2006 at 8:25 pm
Just another reason for me to give into the urge to buy hosting from you guys. It’s been a long time that DreamHost has been seducing me with its prices, features and now this comes along. I’m totally biting. :D!
March 17th, 2006 at 9:19 pm
Okay.. but just letting you know, it’s not done yet! By the end of next week it should all be live, and definitely by the end of the month!
March 19th, 2006 at 4:15 am
Excellent news DH, good work.
March 19th, 2006 at 5:28 am
“…it also also means if you’re a heavy MySQL user and causing problems for your server, you’ll mostly be affecting your own performance and not too many unsuspecting neighbors!”
This is great news! I’ve loved dreamhost so far, but sql has been a pain - this is going to improve so much! Great Stuff! Cheers guys!!!
(p.s only thing i’d like now is that thing that cpanel does and lets outlook be setup by just downloading a little file - because i still aint got my email working ;-)
March 19th, 2006 at 10:11 am
Damn, you guys are pimps! This is the only missing feature that has me looking for another hosting company, but no more. Finally! Damn, this is exciting, the only issue is that I’ve already spent hours upon hours migrating to Mysql 5 and now I have to do it for the new system… which would totally be worth it.
I just need to think about what I’m going to do with all of the extra points.
March 19th, 2006 at 6:46 pm
well i can’t wait to dump my old databases and just use one central one.
March 20th, 2006 at 6:59 pm
Might this have some effect on the most popular feature request, having e-mail logins as the actual e-mail username instead of m1234567?
Thanks
March 21st, 2006 at 8:37 am
What about SSL PhpMyAdmin? It seems a bit risky putting plain text passwords over the network
March 21st, 2006 at 9:32 am
I’m in agreement with Guido. I hate having to remember that m######## login! I’ll go see if I can vote for it now. Funny that Dreamhost starts doing this after I e-mailed them asking exactly how complicated it would be to have mulitple database on the same address! This will make my Dreamhost experience almost complete!
March 21st, 2006 at 2:25 pm
I had thought they had already done that, allow you to use your username instead of the m######. I could be wrong but I remember it was in the newsletter a while back.
March 24th, 2006 at 10:03 am
Features, and no down time, make homer happy!, Features, and no down time, make homer happy!,Features, and no down time, make homer happy!,Features, and no down time, make homer happy!,Features, and no down time, make homer happy!,Features, and no down time, make homer happy!,Features, and no down time, make homer happy!,Features, and no down time, make homer happy!
Well what more I have to say?, keep the good work!
March 25th, 2006 at 3:36 pm
[...] A feature I’ve been wanting for quite a while is having all my MySQL databases under the same name. Right now, you have to create a separate location for each database (db.example.com, db2.example.com, etc). I had e-mailed them about it and sure enough, a week or two later, they’re planning on adding that feature! AWESOME! [...]
March 25th, 2006 at 5:53 pm
Awesome news, thanks for listening to the customers!
March 26th, 2006 at 11:52 am
Great news! If you wanted to, You could run a beta test with PostgreSql…
March 26th, 2006 at 2:36 pm
It appears that this feature is now active (at least for me)! Thanks DreamHost!
March 26th, 2006 at 6:21 pm
[...] Today I noticed that DreamHost has finished implementing a much-requested feature, multiple MySQL databases on the same hostname! It’s working for me, so it should be enabled for all other customers. Maybe they’re phasing it in? I’m not sure, but here’s a screenshot of the new MySQL admin interface in the DreamHost panel: By the way, I totally recommend ScreenShot Captor for taking screenshots. It’s free and be sure to check it out! [...]
April 8th, 2006 at 2:15 pm
[...] Now that dreamhost is offering multiple databases per hostname, I decided to attempt to move all my existing databases to my new database hostname. Somehow in the process I managed to delete my wordpress and gallery databases. Oops!!! I started moving everything a few weeks ago and didn’t realize that I hosed my blog until today, so I can’t restore it. Who checks thier own blog anyway?! So… I’ve decided to work on updating my site with a new design. Additonally, I’ll actually try to update my blog a little more frequently now that I’m done with school. I’ll post about my job serach after I’ve decided on an offer. [...]
May 2nd, 2006 at 1:05 am
[...] Multiple Databases per Hostname! One of the most popular suggestions is coming through: You can now have multiple databases per hostname, use the same MySQL username to access multiple databases and have one phpMyAdmin management area for all the databases on your account. See Sneaky Changes Afoot.. for more info. [...]
January 5th, 2007 at 3:02 am
[...] Multiple databases per hostname [...]
January 10th, 2007 at 8:52 pm
[...] Multiple databases per hostname [...]