Mananging multiple backends servers

Hi all,

does anybody know of a tutorial that gives advice about the best way
to run multiple rails applications on a cluster of physical servers
with a load-balancer sitting on top. At the moment I am running pound
on a server that acts as a load-balancer and routes traffic to one of
three backend servers all runnning mongrel clusters. Unfortunately
although I have sessions stored in a database I am having problems
with maintaining sessions between the backend servers. Therefore any
advice, links to tutorials etc would be appreciated.



Check out my forum post at

Best regards

Peter De Berdt

Hi Peter

Thanks for the reply. I have pound running already. Do you think that
having the "X-Forwarded-For" may cause problems with sessions? Because
apart from the sessions thing, it's working.

best wishes,

Hi Peter,

I finally tracked down the problem. It was simply that the backend
server times weren't in sync despite being configured to use ntp
(network time protocol). They were over an hour apart. So I'm guessing
that the default session expiry time is less than an hour. Until now I
was having to use a 'sticky' cookie within my pound configuration such
that my application cookie name matched that in the pound
configuration and meant that all requests from the same client got re-
directed to the same backend server.

However now that the times are OK, this is not necessary and I can now
see that requests from the same client go to different backend servers
depending on the load and sessions are maintained. So if anybody would
like to know how to set up multiple backend servers behind pound for
load balancing with mongrel clusters on each of the backend servers,
please contact me.