Ask HN: What Linux distro for a Rails app that needs to scale?
21–27 of 27 posts
Re: Ask HN: What Linux distro for a Rails app that needs to scale?
#22Debian. 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.
I was right there with you until this bit of crazy.
Do not build everything from source. You're just asking for trouble when you do. You lose so many really important features of modern Linux distros when you do this, that I can't believe people are still suggesting it as a sane practice for production servers.
If you install from source you won't be able to update quickly and easily via apt-get or yum when a security update comes out...you'll have to rebuild. But, you probably won't even know a security update exists until it's too late. If you don't keep copious and specific notes about what your custom build does, and why you did it that way, you will forget a flag or overwrite or lose a config file, and it will break something next time you roll out a new version.
The performance benefits are probably negligible, and in my many years experience cleaning up amateur maintained systems, it is just as likely to be negative as it is positive. You probably know dramatically less about the package you're building than the maintainer of the OS package, and you're more likely to make mistakes than they are. Those mistakes could have security implications, performance implications, or stability implications.
Certainly, if you are the maintainer of some piece of software, you might want to replace it. I've never run a system without at least a few custom builds...but the custom pieces are usually software that I am one of the core maintainers of, and I know it better than just about anybody. And, when I do run custom software, I tend to build an RPM or deb of it, and setup a local yum or apt-get repo, so that when I need to replicate my production machine, I can do it quickly and consistently.
Re: Ask HN: What Linux distro for a Rails app that needs to scale?
#23The 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.
If you're scaling horizontally, is 64 bit a win? It eats up memory in Ruby processes. We switched our app (which does not need to scale; it's shrinkwrap) to 32 bit Ubuntu and that was a win for us. (Gentoo? Blech. -funroll-loops.)
Re: Ask HN: What Linux distro for a Rails app that needs to scale?
#24I can't find the papers off hand but there has been some research into how kernel level cache tweaks will dramatically effect how web servers and DB servers will perform.
Re: Ask HN: What Linux distro for a Rails app that needs to scale?
#25i'm curious because i use openbsd+lighttpd (soon will be nginx) in my colo (because no slice/vps offers openbsd afaik)
Re: Ask HN: What Linux distro for a Rails app that needs to scale?
#26Re: Ask HN: What Linux distro for a Rails app that needs to scale?
#27I'd say 64-bit Debian. I have already mentioned my qualms with Ubuntu elsewhere on HN (I don't like upgrading every 6 months, and I don't want to be stuck with old software in case I decide to skip an upgrade).