[Mongrel] MongrelCluster - How can I make a request to a specific mongrel instance?

Philip Hallstrom mongrel at philip.pjkh.com
Thu Aug 24 12:45:53 EDT 2006

> In our app we've a number of singleton ruby classes that cache static data
> in hashes, things like
> string values, system config params, etc).  In a webbrick environment this
> works ok, but we find
> in production we have a problem because we have 4 caches, one for each
> mongrel instance.
> This also isn't a BIG problem, but our cache.reload() methods are kinda
> useless now, because
> we can't direct this call to a specific mongrel/rails instance.

Why can't you make request directly to http://localhost:3000 (and 3001, 
3002, 3003, etc.) for each mongrel?

> Any suggestions?  In the long term, we'll be redesigning the cache to be
> shared, but we'd like to
> fix this now.

Look at memcache... works great for us.

> Had considered writing a quicky "broadcaster" that would iterate over our
> known mongrel ports
> and hit them directly.  But we're not sure if (a) that would work and (b)
> the best way to read the
> current running ports.
> Thanks in advance.
> Brittain

More information about the Mongrel-users mailing list