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 Comments
Sorry, the comment form is closed at this time.
Powered by WordPress. Pool theme by Borja Fernandez, modified by DreamHost.
Entries and comments feeds.
^Top^

Awesome! This is the only really annoying thing about your hosting service, with this gone your service will be near perfect! :D
Comment by Mike — March 16, 2006 #
Thank you Dreamhost! You’ve saved my life!
Or, more accurately, are in the process of yet again making my life easier. Hear hear!
Comment by Allen — March 16, 2006 #
Brilliant! When can we expect this?
Comment by Miles — March 16, 2006 #
This sounds fabulous! This will be a wonderful addition for Dreamhost’s already plentiful array of features!
Comment by Pange — March 16, 2006 #
“…assigning each new customer to a database server for life!”
…what about exsisting customers?
Comment by Rich — March 17, 2006 #
Yeah, sounds great! Also, thanks for explaining your db server structure. :)
Hopefully this will help me manage my databases.
Comment by mandrl — March 17, 2006 #
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…
Comment by Scott — March 17, 2006 #
MySQL has always worked well for me in dreamhost, and now will be better :P
Comment by Cruppo — March 17, 2006 #
It has always worked well for me and now will be perfect hehe
Comment by Cruppo — March 17, 2006 #
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
Comment by Damien — March 17, 2006 #
ooooh now I have 5 more credits to vote on stuff
Comment by Joop — March 17, 2006 #
You guys are the best! BEST FRIENDS 4 LIFE!
-Customer For Life (because of things like this blog)
Comment by Matt Farley — March 17, 2006 #
hey sweet news!
Comment by riki — March 17, 2006 #
Nice
Comment by Javier — March 17, 2006 #
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!
Comment by Josh Jones — March 17, 2006 #
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.
Comment by Bob — March 17, 2006 #
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!
Comment by Ni — March 17, 2006 #
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!
Comment by Josh Jones — March 17, 2006 #
Excellent news DH, good work.
Comment by David Smith — March 19, 2006 #
“…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 ;-)
Comment by kray — March 19, 2006 #
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.
Comment by santos — March 19, 2006 #
well i can’t wait to dump my old databases and just use one central one.
Comment by weston deboer — March 19, 2006 #
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
Comment by Guido — March 20, 2006 #
What about SSL PhpMyAdmin? It seems a bit risky putting plain text passwords over the network
Comment by Jon Hassall — March 21, 2006 #
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!
Comment by Dave Reid — March 21, 2006 #
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.
Comment by santos — March 21, 2006 #
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!
Comment by vicm3 — March 24, 2006 #
[...] 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! [...]
Pingback by Dreamhost Coupons at DaveBlog — March 25, 2006 #
Awesome news, thanks for listening to the customers!
Comment by Joshua K — March 25, 2006 #
Great news! If you wanted to, You could run a beta test with PostgreSql…
Comment by Jeff — March 26, 2006 #
It appears that this feature is now active (at least for me)! Thanks DreamHost!
Comment by Dave Reid — March 26, 2006 #
[...] 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! [...]
Pingback by DreamHost & MySQL at DaveBlog — March 26, 2006 #
[...] 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. [...]
Pingback by Tristan’s Blog » Oops! Hosed the db — April 8, 2006 #
[...] 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. [...]
Pingback by Unofficial DreamHost Blog » Blog Archive » DreamHost Newsletter - April 2006 — May 2, 2006 #
[...] Multiple databases per hostname [...]
Pingback by Unofficial DreamHost Blog » Blog Archive » DreamHost 2006 - Year in Review — January 5, 2007 #
[...] Multiple databases per hostname [...]
Pingback by DreamHost 2006 - Year in Review — January 10, 2007 #