4

I currently have a VPS at HostingRails.com, and am rather disappointed with the service so I have been considering switching to linode instead. I have three rails applications (my live application, the QA version of the live application, and one redmine) running on Passenger on Apache, a phpbb installation, and one mysql database currently running on my VPS which altogether takes up about 400MB of RAM at the moment.

I am trying to figure out if it'd be better to get a 720MB node and just stick everything on there, or get two 360MB nodes and have the live site on one and the QA site and redmine on the other (in that case, would you suggest two separate databases, one for each node)? It was suggested to me that splitting up my applications would be a good idea, but I don't know if that's true; I figure that if I have one node, if the live application needs more memory, it can take out of the 360MB that probably wouldn't be fully used by my QA install and redmine.

Also, I currently have my SVN (1 active project, a couple inactive ones, two users) hosted on Dreamhost because I had paid for a plan in advance and left my SVN there instead of moving it to my VPS. Would moving SVN to linode affect your answer?

2 Answers 2

3

With two nodes, while you get the same amount of memory, you also get twice as much CPU time and IO tokens.
SVN could run in the same apache instance as Passenger, without hurting performance too much.

Also, you might want to consider a different setup: one database node, and one webserver node. Neither would be underutilised (apache is quite heavy, after all), and, if they were in the same datacenter, you could point both public IPs at the webserver node (Linode allow this), and let it communicate with the database node through Linode's LAN (avoiding transfer quotas).

4
  • Thanks for your response. If I was going to go with one db node and one server node, would 360MB be enough for three Rails applications (I assume that the phpbb install is pretty negligible, memorywise)? What would the benefit of having two public IPs be? Jan 24, 2010 at 17:15
  • You might want two programs listening on a certain port. For example, nginx uses less RAM than apache, so you might want to have that serving your Rails apps. However, nginx doesn't support Subversion, so you might want to have apache doing that, knowing that it will be less loaded than the public stuff (and therefore using less resources). Jan 24, 2010 at 17:23
  • It's not true that with two smaller nodes, you get twice as much CPU and IO. The reason for this is contention. On Linode you only share your node with other nodes of the same size. With a single Linode 1024 you are sharing CPU and IO with 19 other nodes; with two Linode 512s each one is sharing CPU and IO with 39 other nodes. Then again, two separate nodes may still be a good idea for redundancy or even isolation. Oct 1, 2010 at 5:09
  • Actually, linode endeavour to, when possible, provision nodes for the same owner on separate host machines. Oct 2, 2010 at 15:43
3

From experience with providing managed hosting for a couple of Rails-based businesses, it has always proven successful to separate db and app (as fahadsadah points out).

However, I would not run Apache and nginx on the same machine, especially in a limited resources vps environment. As has been said before, Apache itself is pretty heavy, but it can handle all your passenger, svn, php needs. So I would not add nginx to the mix. After all, it's one more piece of software that needs to be maintained (configured, updated/patched, etc.).

Also, I personally tend to not host my source code within the same setup that my app runs on. I'm pretty confident in the robustness and security of our code, but if someone ever manages to find a way through the app and on the server, he'd have full access to our source as well. And your data and your code revisions is possibly the last thing you want a cracker to get his hands on...

I know it's a shameless plug, but my company offers bundled Redmine & SVN hosting under the brand Planio. There should be other services like Planio as well, so you can make a choice. My main advice is: try to delegate hosting of supportive systems to trusted external parties and focus your hosting efforts on your core thing (i.e. your app).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .