Deployment config and technology choice

Greeetings all,

I’m revisiting our deployment technologies after having read Ezra’s
book; hoping you don’t mind answer a few questions.

Plus would love any thoughts from the other pros.

We’ve presently deployed :

nginx -> haproxy -> mongrels

The deployment discussed in EZs book is:

nginx -> mongrels

A few questions arise:

  1. I think previously you were in favour(canadian, yes) of haproxy.
    has that changed?
  2. perhaps I should switch up the haproxy nginx - it now seems that
    haproxy is likely best used up front?
  3. In the nginx config you’re using worker_connections 8192 - I have
    it presently set to 1024. I can’t find any guidance for that param.
    What do you suggest?
  4. use epol - How does the event drive poller (epoll) assist ? Is it
    recommended on debian etch?

thanx for your thoughts all.

Nice read Ezra.

Jodi

From my limited experience, I followed much of Ezra’s book as well but
we
only run nginx → mongrels and it works pretty great. I have multiple
servers however with a hardware load balancer in front of those.

Raul

----- Original Message -----
From: “Jodi” [email protected]
To: “Deploying Rails” [email protected]
Sent: Wednesday, February 27, 2008 1:15 PM
Subject: [Rails-deploy] deployment config and technology choice

Hey There-

On Feb 27, 2008, at 1:15 PM, Jodi wrote:

nginx → haproxy → mongrels

The deployment discussed in EZs book is:

nginx → mongrels

A few questions arise:

  1. I think previously you were in favour(canadian, yes) of haproxy.
    has that changed?

Haproxy is a nice proxy but nginx does a very good job as well and it
one less pice of machinery to manage.

  1. perhaps I should switch up the haproxy nginx - it now seems that
    haproxy is likely best used up front?

Haproxy can be used upfront if you wanted or nginx or even better
something like LVS if you have a large cluster.

But for a general setup I recommend just nginx → mongrel cluster
Also you might want to use the fair proxy balancer for nginx

http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel

  1. In the nginx config you’re using worker_connections 8192 - I have
    it presently set to 1024. I can’t find any guidance for that param.
    What do you suggest?

8192 works well for us. 1024 was a bit too little for high traffic
sites.

  1. use epol - How does the event drive poller (epoll) assist ? Is it
    recommended on debian etch?

Yes epoll is recommended on all linux distros for use with nginx. It
increases the scalability, nginx will fall back to select calls if
epoll isn’t used, epoll can manage many more file descriptors then
select can.

thanx for your thoughts all.

Nice read Ezra.

Thanks!

Thank you both -

On 28-Feb-08, at 12:45 AM, Ezra Z. wrote:

book; hoping you don’t mind answer a few questions.

haproxy is likely best used up front?
3. In the nginx config you’re using worker_connections 8192 - I have
increases the scalability, nginx will fall back to select calls if
epoll isn’t used, epoll can manage many more file descriptors then
select can.

re: the fair proxy balancer - I read that article many moons ago and
avoided given that the write-up features bug reports, and some
concerns without resolution. Is it in active development? I gather you
wouldn’t recommend it if wasn’t suitable - my concern is with it being
supported.

re: other. I’ll get epol up. The worker_connections still is too vague
for me to determine a good number. What would be the obvious symptoms
if worker_connections is set too low? If anybody has some thoughts on
how to set this value I’d appreciate it.

thank you all.
Jodi