Best Production Server to Use

I’m sure this question is very subjective, but I’m looking for input
and advice. I just purchased a shiny new dedicated server from
gate.com and I’m trying to decide what I should use to serve up my
rails app: Mongrel, Apache, LiteHttp, other?

The key points I’m concerned about are:

  • Speed & Overall performance
  • Reliability
  • Ability to deal with high load
  • Difficulty to configure (virtual hosts, memory allocation, etc)
  • Maintenance

Please share your experience and opinions. Let me know of any
important differences you’ve seen between the servers.

Since I have a fresh server, I’m looking to start right – instead of
getting ingrained in something I can’t easily change later.

Thanks,
Jeremy

Nginx (Front-end) proxy-balancing for (3-4) Mongrel Clusters, deployed
to server using Capistrano through SVN Repository, Processes monitored
using Monit or God all this on a solid linux distro.

@Nathan

And I could (should?) do this on a single CPU? I’ve never done load
balancing or clusters before. On a single machine how does that give
better performance than one server process?

Thanks!

On Mar 17, 11:08 am, Nathan E. <rails-mailing-l…@andreas-

On Mon, 17 Mar 2008, Mozmonkey wrote:

And I could (should?) do this on a single CPU? I’ve never done load
balancing or clusters before. On a single machine how does that give
better performance than one server process?

Sure, but the other main benefit is that your application will be
scaleable. When you’re ready to buy more servers, the Mongrels could run
on a different cluster than nginx.

On 17 Mar 2008, at 18:27, Eno wrote:

on a different cluster than nginx.
A mongrel can only handle one rails request at a time. Mean while
nginx could very easily be serving static pages (stylesheets images
etc…). Even just focussing on the mongrels, they’re not going to
utilise your server fully, some time is spent doing disk io, some is
spent talking to the database etc…

Fred

I’m liking the idea of a mongrel cluster. So if a single mongrel
instance can only handle one request at a time, then when you cluster
3 - 4 under nginx does that mean it can only handle 3 - 4 requests at
a time, or does nginx take care of handling more?

Thanks.

Litespeed? Extremely easy setup, very fast, dynamic process
allocation. All the hassle just gone. No FCGI to mess up things, no
mongrels, and much much less deployment complexity.

/ Peter

17 mar 2008 kl. 20.13 skrev Mozmonkey:

I can recommend Litespeed. It’s trivial to setup - run a short install
script, configure through a web-based control panel. The standard
(free) version just screams compared to Apache (several times faster),
and Rails deployment is as painless as PHP. There’s no proxying to app
servers like Mongrel, no “stack”… just Litespeed. Took about 15
minutes from downloading litespeed to having a rails app running.

Mozmonkey wrote:

I’m sure this question is very subjective, but I’m looking for input
and advice. I just purchased a shiny new dedicated server from
gate.com and I’m trying to decide what I should use to serve up my
rails app: Mongrel, Apache, LiteHttp, other?

I’ve read some good things
(http://codemonkey.ravelry.com/2008/03/10/load-balancing/) about
combining Nginx (static content server) with Thin (rails app server with
Mongrel ancestry).

Nginx: http://wiki.codemongers.com/Main and http://www.nginx.net/

Thin: http://code.macournoyer.com/thin/

I must admit I haven’t had the chance to try out this software
combination myself, but the throughput on the Ravelry site is pretty
impressive. As a side note, my wife is on Ravelry enough that I can
confirm the performance really is solid - it’s not just statistical
hocus pocus.

Off topic diversion…
Speaking of statistical hocus pocus in a good way, in honor of the
upcoming NCAA basketball tournament, this article by Bill James on Slate
is an entertaining (and short) read.
http://www.slate.com/id/2185975/

  • Aaron

Yes, I’ve had great success on LiteSpeed, with about a half dozen apps
deployed with it. Nice small footprint and great throughput.

Adam C. schrieb:

Interesting comments about Litespeed. I currently run 3 mongrel
processes on each of my servers, and use monit to restart them after
they start to consume upwards of 120 megs of RAM. Under heavy load,
they can restart as often as every 4 hours. Although sometimes they’ll
run for a day without a restart. In any case, I’ve been curious about
other solutions, since it’d be nice to not have to rely on my processes
being restarted multiple times per day.

I’m just starting with RoR. But your mail let me doubt, if RoR would
suit me fine. My apaches with php just run for months without any
restart (manually or via a script).

Martin

Interesting comments about Litespeed. I currently run 3 mongrel
processes
on each of my servers, and use monit to restart them after they start to
consume upwards of 120 megs of RAM. Under heavy load, they can restart
as
often as every 4 hours. Although sometimes they’ll run for a day
without a
restart. In any case, I’ve been curious about other solutions, since
it’d be
nice to not have to rely on my processes being restarted multiple times
per
day.
Anyone else had good experience with the free version of Litespeed?

Adam

On 18 Mar 2008, at 13:10, Martin wrote:

being restarted multiple times per day.

I’m just starting with RoR. But your mail let me doubt, if RoR would
suit me fine. My apaches with php just run for months without any
restart (manually or via a script).

Seems to vary. I never restart mine except for our fortnightly
releases. I have herad that things like rmagick are a bit leaky.

Fred

Andy,
For what its worth I too use Litespeed and it works well. I hired
someone to install it for me. If you guys ever find a source that
explains to the ‘newbie’ how to install it, I’d be grateful. What’s
funny is that people always write explanations to themselves. They
never imagine the person viewing their explanation has little in
common with their knowledge.
Thank you,
Kathleen

On 18 Mar 2008, at 14:12, Frederick C. wrote:

Seems to vary. I never restart mine except for our fortnightly
releases. I have herad that things like rmagick are a bit leaky.

I haven’t needed to restart a single mongrel for months now (and the
last restart was due to a power failure in the datacenter), before
that mongrels were running for months already.

Best regards

Peter De Berdt

On Tue, Mar 18, 2008 at 9:10 AM, Martin [email protected] wrote:

I’m just starting with RoR. But your mail let me doubt, if RoR would
suit me fine. My apaches with php just run for months without any
restart (manually or via a script).

Don’t let my experiences dissuade you from RoR. There’s many people who
run
the full Rails server stack without issue. I just happen to be
experiencing
major memory leaks that I haven’t been able to resolve. I could end up
having the exact same issue with Litespeed, but I think I’ll give it a
try
to see how it works out.

Adam

On Mar 18, 2008, at 10:44 AM, Peter De Berdt wrote:

about
other solutions, since it’d be nice to not have to rely on my
processes
being restarted multiple times per day.

Seems to vary. I never restart mine except for our fortnightly
releases. I have herad that things like rmagick are a bit leaky.

I haven’t needed to restart a single mongrel for months now (and the
last restart was due to a power failure in the datacenter), before
that mongrels were running for months already.

My experience is similar to Peter’s. I have sites that run for months,
only pausing for new features to be added or a periodic server reboot,
which can be as infrequently as 11 months :slight_smile:

I’m using rmagick on one of the sites, but haven’t seen memory leaks,
although the graphics are a light part of the load.

There is another issue with Mongrel setups which rarely is mentioned,
and that is the fact that the number of Mongrels is static with
respect to each application. No matter the load, the Mongrels
dedicated to an application will take up memory space.

With Litespeed, the allocation of server processes is dynamic.
Meaning, it can fluctuate depending on load, available memory and
other factors. Litespeed can kill off or spawn new processes as
needed. And the spawning is very fast, too.

This means that it is possible to serve more applications from the
same box than with any solution where each app has a fixed number of
Mongrels allocated to it.

/ Peter

18 mar 2008 kl. 21.10 skrev Nathan E.:

Having mongrels in single machine or multiple machines? Which one is
best?

I can concur with Peter as well. We used Image Science for our image
uploading and we didn’t have a need for the more complex processing that
RMagick provides so we avoided it (based on memory leak heresay). We
have the setup I described in the previous post (running monit also to
be safe) and the fact is that the mongrels pretty much just don’t really
“go down”. I mean we might take them offline but we have been running
the site for years and never ran into problems (under an admittedly
moderate load). For the sake of argument, even if the mongrels do go
down, with the 10 minutes it takes to setup monit, they would be
automatically resarted (and notify me via email) within seconds.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs