# Going to production soon, need server advice

**URL:** <https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557>\
**Category:** Rails\
**Created:** [July 7, 2006, 9:49pm UTC](https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557 "2006-07-07T21:49:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [July 7, 2006, 9:49pm UTC](https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557/1 "2006-07-07T21:49:11Z")

</div>

I’ve got a RoR app that will be going to production soon (in the next  
month or so) and would like to get some feedback on what kind of web  
server setup people have had good luck with. I’m looking for something  
that is:

1. Stable
2. Easy to setup
3. Secure (sorry but Windows is ruled out here)

My deployment will either be on Fedora Core 5 or possible Mac OS X  
Server. Currently I’ve been looking at Litespeed and their LSAPI  
integration and am tempted by that. I also have looked at Mongrel with  
Pound/Pens/Balance. I _could_ do Apache 2.2 and Mongrel but want to  
avoid Apache if possible as I’d like to keep my memory contraints as low  
as possible and I’ve found Apache can be a bit of a memory hog (perhaps  
its my configuration - but I just don’t care to use Apache if need be).

Thanks for all the feedback.

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [July 8, 2006, 9:58pm UTC](https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557/2 "2006-07-08T21:58:51Z")

</div>

On 7/7/06, Jacob B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> integration and am tempted by that. I also have looked at Mongrel with  
> Pound/Pens/Balance. I _could_ do Apache 2.2 and Mongrel but want to  
> avoid Apache if possible as I’d like to keep my memory contraints as low  
> as possible and I’ve found Apache can be a bit of a memory hog (perhaps  
> its my configuration - but I just don’t care to use Apache if need be).

I think most people will agree that avoiding Apache for Rails work is  
a good idea unless you can get fcgi running instead of FastCGI.  
Regardless, Lighttpd seems to be the way to go nowadays but there are  
a _lot_ of people, myself included, who’re still using Apache2 +  
FastCGI and doing just fine.

My two bits,  
Chuck V.

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [July 8, 2006, 10:17pm UTC](https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557/3 "2006-07-08T22:17:40Z")

</div>

> Regardless, Lighttpd seems to be the way to go nowadays

if you also need php from the same server process, yeah. if youre just  
load-balancing to mongrel there are lighter options.

i would explain why i gave up on fcgi but zed has a more concise answer:

08:04 zedas#rubyonrails c, fastcgi has other issues besides install.  
it frequently zombies processes, has problems on restarts, leaks memory  
unless you have a per request GC call, and starts to get weird with the  
spawner/reaper stuff.

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [July 9, 2006, 1:56am UTC](https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557/4 "2006-07-09T01:56:38Z")

</div>

Apache 2.2 + mod\_proxy balancer + Mongrel cluster - Works like a charm;  
easy to scale.

I know lot of people are afraid or sick of using apache; but it is a  
solid and a proven product. I dont want to try any of the new web  
servers just from a security point of view.

Never user Apache with mod\_fastcgi - Had too many issues; not worth  
risking yur career !!

-Thila

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [July 9, 2006, 8:38am UTC](https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557/5 "2006-07-09T08:38:58Z")

</div>

once you decide on a configuration, be sure to smoke test everything…  
A good basic test is to pound the shit out of with a a couple of shell  
scripts that spawn a coulple thousand curl or wget process-es.

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [July 9, 2006, 12:43am UTC](https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557/6 "2006-07-09T00:43:10Z")

</div>

On Jul 8, 2006, at 12:57 PM, Chuck V. wrote:

> > My deployment will either be on Fedora Core 5 or possible Mac OS X
> 
> I think most people will agree that avoiding Apache for Rails work is  
> a good idea unless you can get fcgi running instead of FastCGI.

I think you’re saying most people would agree avoiding Apache FCGI  
configuration that don’t work is a good idea. 🙂

Apache 2.2.2/mod\_rewrite/mod\_proxy\_balancer/mod\_proxy + mongrel  
rock.

What’s the advantage of FCGI, other than that Lighty works better with  
FCGI than HTTP?

–  
– Tom M.

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [July 16, 2006, 5:58pm UTC](https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557/7 "2006-07-16T17:58:49Z")

</div>

Im running FC5 / Lighttpd / Rails / PHP / fcgi, no problem, works like a  
charm and is quick as hell. Others make a very valid point about  
testing… Look up a handy app called ‘seige’, its for seige testing,  
will tell you how many concurrent hits it can take before it falls over

- amongst other handy info!

Cheers

Tim

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [July 16, 2006, 6:50pm UTC](https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557/8 "2006-07-16T18:50:40Z")

</div>

How about FreeBSD, Apache2 and mod\_fcgid?

Isak

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [July 15, 2006, 1:07am UTC](https://www.ruby-forum.com/t/going-to-production-soon-need-server-advice/97557/9 "2006-07-15T01:07:16Z")

</div>

On 7/8/06, Jon [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> once you decide on a configuration, be sure to smoke test everything…  
> A good basic test is to pound the shit out of with a a couple of shell  
> scripts that spawn a coulple thousand curl or wget process-es.

I can’t second this enough. Tests have saved my marriage (or they  
would have if I were married.) Seriously, the time spent fixing bugs  
was overwhelming my time spent coding until I started building tests  
religiously. They take time up front which is rarely a happy thing  
when it comes to the MBA types, but the difference between a bug fixed  
when you’re knee deep in the code and a bug found after release is  
unbelieveable.

I haven’t been called into work afterhours once since starting  
testing…

Cheers,  
Chuck V.
