Live data from Hacker News

Ask HN: What Linux distro for a Rails app that needs to scale?

news.ycombinator.com

1–10 of 27 posts

Ask HN: What Linux distro for a Rails app that needs to scale?

#1
Title says it all. My startup has collected so many users that it's getting to be just ridiculous. So, we bought a brand new server with really nice specs, and I'm debating what OS to use.

While I love OpenBSD, I'm more concerned with scalability than security, at this point.

As of right now, I'm going to use nginx over Apache, and probably use a 64-bit Ubuntu server.

What would you use?

Re: Ask HN: What Linux distro for a Rails app that needs to scale?

#3
Debian. It's what Ubuntu is based on, but it's less crufty. I use Debian for everything I do, and I've never had a problem. Take my advice with a grain of salt however, as I've never really had to scale anything.

One other thing, make sure you build everything from the source. Get exactly what you want/need, and nothing more as well as the latest packages.

Re: Ask HN: What Linux distro for a Rails app that needs to scale?

#4
Gentoo if you have a lot of time to customize everything and don't mind rehacking on the kernel configuration with every release. Ubuntu if you want something that just works and has available commercial support if you need it down the road. Debian if you like Ubuntu but somehow feel that Debian is more "pure". I wouldn't use anything else.

Re: Ask HN: What Linux distro for a Rails app that needs to scale?

#5

The Linux distribution isn't the big bottleneck, but yes, I'd probably go with the 64-bit Ubuntu Server. I think Engine Yard, which is where I'm hosting right now, uses Gentoo, it seems to work fine.

Note about the distribution not being the big bottleneck: This is exactly right.

On the other hand, if you use a distribution that somehow 'benchmarks' marginally better but you don't know how to configure it or deal with it properly, you'll end up losing any performance gains you otherwise would have had. Better to deal with a distribution that works the way you do (Which is why a lot of people like CentOS or Ubuntu Server) than end up making a major mistake somewhere because you are in unfamiliar territory.

Re: Ask HN: What Linux distro for a Rails app that needs to scale?

#6

Gentoo if you have a lot of time to customize everything and don't mind rehacking on the kernel configuration with every release. Ubuntu if you want something that just works and has available commercial support if you need it down the road. Debian if you like Ubuntu but somehow feel that Debian is more "pure". I wouldn't use anything else.

Gentoo is cargo-cult Linux. Tweaking compiler options and use flags rarely produces any measurable benefit, but it guarantees that you're using a unique, untested configuration that may expose bugs other people have never seen.

Re: Ask HN: What Linux distro for a Rails app that needs to scale?

#7
Gentoo is based more for the tinkerer and full-time sysadmin. If you're prepared to spend time nursing the system, compiling everything, tweaking packages/the OS itself for every bit of performance possible, the Gentoo is a good solution. Until you're talking about really big scaling though, it's probably more time effective to use another distro.

As far as the rest goes, it would be better to use Debian before Ubuntu, but there's a lot of other distros as well. RHEL powers many of the webs servers as does SuSE and Debian and Gentoo. Once you get past that, it's mostly personal preference.

Also, big plugs for nginx. It's definitely a very impressive software package.

Re: Ask HN: What Linux distro for a Rails app that needs to scale?

#9
I have no stats in front of me, but I have always been made to understand that BSD's (namely FreeBSD) handle high traffic better than linux.

I personally use Debian for everything. I can't imagine the distro making a huge difference really. I've used Debian as a desktop os for some time, so when I needed a server os, it was easy to get going quickly.

Switching from Apache to Nginx made more of a difference in my case than anything else I could have done I believe.

Re: Ask HN: What Linux distro for a Rails app that needs to scale?

#10
Linux distribution is probably the least important item in terms of scalability.

If you're talking about switching to nginx from Apache, that makes me think that you are still proxying to a collection of mongrels? I'd recommend switching to Phusion (aka mod_rails) as it seems to handle high loads much better.

Post reply on HN