Hello fellow Railsers,
I am running a fairly standard Apache2.2 - Mongrel setup. I have a bunch of
Mongrels on my application server, and then a seperate Apache server which
uses mod_ssl and mod_proxy_balancer to transform incoming SSL requests, and
load balance them across the seperate Mongrel instances. Both my apache
server and my application server are on the same subnet.
When I browse to my site from anywhere within the same subnet, or through a
simple firewall on my top level domain, everything is fine. Apache does
it's SSL decryption, the Mongrel's pick up the requests, and my application
works like a smooth ice-cream.
When I move outside my own network and bring the Internet in the way, I get
an error. I lose session information mid-way through using my application,
and this causes it to 'fail'. It is as if the session information becomes
black, with calles to "session[:my_object]" returning null. I use regular
out-of-the-box RoR file-based sessions. This loss of session information
only seems to happen to some of the more complicated session objects (it
does not happen to the user login information for example). It also only
happens when I use the full Internet -> Apache -> Mongrel stack. If I
navigate straight to one of my Mongrel instances from the Internet, then the
session information remains.
Can anyone suggest what I am doing wrong here? I suspect it is something
to do with my Apache conf. on either SSL or the balancer, but I'm not sure.
I've checked the forums, and while lots of people have their own session
demons, none seem to match mine.
My two next avenues of investigation will be to remove SSL and just use
Apache for basic balancing, and also to try using memcached. Other
suggestions of inquiry are also welcome.