Sneaky Changes Afoot..

March 16, 2006 on 5:12 pm | In Hardware, Insider View, New Features by Josh Jones | 36 Comments

Sneaky Sneaky..

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.

MAXIMUM Efficiency!

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!
BFF!

36 Responses to “Sneaky Changes Afoot..”

  1. Mike Says:

    Awesome! This is the only really annoying thing about your hosting service, with this gone your service will be near perfect! :D

  2. Allen Says:

    Thank you Dreamhost! You’ve saved my life!

    Or, more accurately, are in the process of yet again making my life easier. Hear hear!

  3. Miles Says:

    Brilliant! When can we expect this?

  4. Pange Says:

    This sounds fabulous! This will be a wonderful addition for Dreamhost’s already plentiful array of features!

  5. Rich Says:

    “…assigning each new customer to a database server for life!”

    …what about exsisting customers?

  6. mandrl Says:

    Yeah, sounds great! Also, thanks for explaining your db server structure. :)

    Hopefully this will help me manage my databases.

  7. Scott Says:

    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…

  8. Cruppo Says:

    MySQL has always worked well for me in dreamhost, and now will be better :P

  9. Cruppo Says:

    It has always worked well for me and now will be perfect hehe

  10. Damien Says:

    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

  11. Joop Says:

    ooooh now I have 5 more credits to vote on stuff

  12. Matt Farley Says:

    You guys are the best! BEST FRIENDS 4 LIFE!

    -Customer For Life (because of things like this blog)

  13. riki Says:

    hey sweet news!

  14. Javier Says:

    Nice

  15. Josh Jones Says:

    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 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)!

    …what about exsisting customers?

    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!

  16. Bob Says:

    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.

  17. Ni Says:

    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!

  18. Josh Jones Says:

    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!

  19. David Smith Says:

    Excellent news DH, good work.

  20. kray Says:

    “…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 ;-)

  21. santos Says:

    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.

  22. weston deboer Says:

    well i can’t wait to dump my old databases and just use one central one.

  23. Guido Says:

    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

  24. Jon Hassall Says:

    What about SSL PhpMyAdmin? It seems a bit risky putting plain text passwords over the network

  25. Dave Reid Says:

    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!

  26. santos Says:

    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.

  27. vicm3 Says:

    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!

  28. Dreamhost Coupons at DaveBlog Says:

    [...] 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! [...]

  29. Joshua K Says:

    Awesome news, thanks for listening to the customers!

  30. Jeff Says:

    Great news! If you wanted to, You could run a beta test with PostgreSql…

  31. Dave Reid Says:

    It appears that this feature is now active (at least for me)! Thanks DreamHost!

  32. DreamHost & MySQL at DaveBlog Says:

    [...] 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! [...]

  33. Tristan’s Blog » Oops! Hosed the db Says:

    [...] 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. [...]

  34. Unofficial DreamHost Blog » Blog Archive » DreamHost Newsletter - April 2006 Says:

    [...] 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. [...]

  35. Unofficial DreamHost Blog » Blog Archive » DreamHost 2006 - Year in Review Says:

    [...] Multiple databases per hostname [...]

  36. DreamHost 2006 - Year in Review Says:

    [...] Multiple databases per hostname [...]

Powered by WordPress. Pool theme by Borja Fernandez, modified by DreamHost.
Like WordPress? Consider attending WordCamp LA.
Entries and comments feeds. ^Top^