Seperate database linode on same physical machine

Hi. I'm planning to deploy my ecomm+social network website based on Drupal here. The setup I'm planning for is a application server running apache, php, and drupal on one linode, and a separate mysql database server on a different linode. The application server will be a 1.5gb or 2gb linode, and the database server I'm planning for will be a 512mb linode.

Drupal performance relies pretty heavily on sql performance, so that's why I wanted it to be a on a separate linode. Now I know that I need the two linodes to be in the same datacenter location, but should I (can I?) request the sql linode to be on the same physical machine as the application server linode too? Are there any performance advantages to that?

I know the same kind of linodes tend to be hosted on the same machines, so naturally the lower end linodes will be hosted on machines with a lot more linodes. I'm afraid hdd and sql performance will suffer cause of that.

12 Replies

@ray.p22:

I know the same kind of linodes tend to be hosted on the same machines, so naturally the lower end linodes will be hosted on machines with a lot more linodes. I'm afraid hdd and sql performance will suffer cause of that.
I think you've just spelled out exactly why it would be a bad idea to split off the database to a separate linode, especially if it's only going to be a 512M linode. It probably won't be on the same physical machine (not that it would matter a lot), and besides, disk I/O contention will be quite a bit higher on the 512M linode. You absolutely positively don't want I/O contention on your DB server.

Try putting everything on one large box first. Nothing beats localhost as far as latency is concerned, and I think I read it somewhere that both PHP and MySQL include extensive optimizations for localhost performance, too. If it doesn't work out, it's trivial to fire up another linode and move the DB over.

I see. You have confirmed my suspicions.

But then what they said here doesn't apply then?

http://library.linode.com/databases/mys … sql-server">http://library.linode.com/databases/mysql/standalone-mysql-server

> In some kinds of deployments, particularly where rich dynamic applications rely on a large database, separating the database server from the application server can permit your application to scale and accommodate a much larger user base. Designating a separate server to be used solely by MySQL will allow the application's web server to serve content more efficiently, while the database server will be able to respond more quickly….This may help you achieve higher performance for a range of applications, from popular packages such as WordPress and Drupal….

We have a pretty interactive site with a lot of dynamic content, comments, user uploaded content, etc. So I'm guessing the DB would grow quite quickly. Thanks!

@ray.p22:

But then what they said here doesn't apply then?
That made sense before the availability of really big Linodes. Now you can get Linodes with up to 20GB RAM / 800 GB disk, you would have to have a really big/busy site to make a separate database server necessary.

That's what I'm getting the sense of as well. I think that's what I'll do, run everything on a 2gb+ linode and then see how it goes. Thanks guys!

But does anyone know if its possible for me to request a 512mb linode to be put on the same machine as my other 1.5gb linode?

Our LAN has sub-millisecond latency between hosts. I'm seeing about 0.120 millisecond (120 microseconds or 0.00012 seconds) latency. It's not going to cause any problems - don't worry about it.

You want your Linodes on different hosts for isolation from host/hardware problems.

-Chris

@ray.p22:

But does anyone know if its possible for me to request a 512mb linode to be put on the same machine as my other 1.5gb linode?
I'm under the impression that Linode will not allow this.

They've made it clear for many years that they only ever put one type of linode on the same physical machine – except perhaps at the very high end. I guess this makes it much easier to guarantee everyone a fair share of the resources. I'm not sure if this is still the same, because they no longer advertise the exact number of linodes per physical machine. Still, Linode is really tight-lipped about the characteristics of their physical infrastructure. They simply don't want us to worry about where our resources come from. For all we know, they could be swapping hardware components and live-migrating our linodes from machine to machine without us ever noticing. How else would they offer periodic free upgrades without a reboot?

tl;dr: What you're asking for desecrates the dark magic that makes Linode awesome.

edit: dang, caker beat me to it. All hail caker, for He is the DARK LORD.

@hybinet:

How else would they offer periodic free upgrades without a reboot?

I assume you mean a host reboot, as we've always had to reboot our linodes for upgrades.

It's unlikely they're live-migrating, because if they were, nobody would ever get those "your host is dying, you need to migrate, please schedule it or we'll force-migrate in a week" messages. For RAM/HDD, that kind of thing has been hot-swappable for quite some time, so that's certainly possible. However, my guess is that they're just managing the number of linodes on a box very well, so when it's getting close to upgrade time, they lower the number of linodes per server (through attrition) to allow for the upgrades.

@glg:

For RAM/HDD, that kind of thing has been hot-swappable for quite some time, so that's certainly possible.
Ah, I'd completely forgotten about hot-swappable RAM. Still pretty close to dark magic!

@caker:

Our LAN has sub-millisecond latency between hosts. I'm seeing about 0.120 millisecond (120 microseconds or 0.00012 seconds) latency. It's not going to cause any problems - don't worry about it.

You want your Linodes on different hosts for isolation from host/hardware problems.

-Chris

Hi Chris, thanks for the reply. So would you suggest a 1.5gb + 512mb linode set up over a 2gb one then?

I will always recommend scaling horizontally verses vertically. You will reach the physical limits of scaling vertically at some point regardless of what it is…

-Chris

There's a balance point, I think, where you have to balance ease of management versus the performance benefits of scaling horizontally.

@Guspaz:

There's a balance point, I think, where you have to balance ease of management versus the performance benefits of scaling horizontally.
Agreed. Two servers in this case just means two single points of failure = 2x likelihood of downtime. You could double everything again for redundancy, and that will make caker very happy 8) But it will also cost twice as much.

Besides, 1.5-2GB is nowhere near the physical limits of scaling vertically. The vast majority of websites and web services will never hit that point, although we all sometimes dream of starting the next Facebook. Whether OP should spin off the DB now depends entirely on the characteristics of the site and its potential for growth, especially since latency has been shown to be a non-issue.

But there are always special cases, and this person seems to have benefited from using a greater number of smaller Linodes. But that's only because of the weird (and clearly suboptimal) performance characteristics of his advertising script.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct