On Jan 28, 2009, at 7:23 PM, Ripta Pasay wrote:
1. Apache as the front end server, running mod_proxy
2. A single mongrel cluster (4 mongrels)
3. A single instance of my Rails application
My question is, which one of the four mongrels is handling each of the
request? Can it be that your application isn't thread-safe, and the
same
mongrel instance is getting sent a new request before the previous
request completes?
No, sorry, I should have mentioned that I had already cut down the
number of mongrels in the cluster to 1. I would have, but in my mind
I had already ruled that out, so didn't think to mention it.
I had each Apache virtual host configuration insert a unique
client_id header in all requests, like so:
RequestHeader set X_CLIENT_ID '7563TY7732UUW9' # a unique id for
each domain
Also, just curious: was there a specific reason you added another
layer
to the request routing with the use of X_CLIENT_ID, rather than
just use
the value of "request.host" in Rails? It seems there's a one-to-one
mapping between virtual hostnames and X_CLIENT_ID.
Yes, I just didn't realize that at the outset. This is the first time
I'm doing something like this, so I'm sort of making it up as I go
along.
-- John
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users