[Nitro] nitro scgi support improvement

guillaume pierronnet guillaume.pierronnet at gmail.com
Mon Jan 16 03:52:05 EST 2006

By drb in SCGI, i was thinking of the process management, i.e.
throttling max_connections per seconds, seing process status, nice
restart and others things that exists in the Zed Shaw's Rails SCGI
I was just wondering about the usefulness of that, and if these
features can be implemented for other adapters as well, not just SCGI.

To come back to the session's conversation, remember that SCGI is
multithreaded and doesn't need session sharing.
For multi-process Nitro apps, Drb, og or file sessions are
indispensable. File is the most easy to setup. However, remember that
files used in File sessions are not locked between processes and can
to race conditions. We need a cross-platform file locking system.

2006/1/15, Bryan Soto <bryan.a.soto at gmail.com>:
> On 1/15/06, George Moschovitis <george.moschovitis at gmail.com> wrote:
> > On 1/14/06, Rob Pitt <rob at motionpath.com> wrote:
> > > I am unsure how SCGI works but if it is anything like FastCGI you need
> > > Drb so that the multiple spawned FastCGI processes can share sessions.
> >
> > Correct, you need DRB sessions for SCGI, just like in FCGI
> >
> > -g.
> >
> >
> For anyone searching the archive later, I'll mention File based sessions
> work for FCGI as well. Probably slower, but at least you can build up to a
> DRB session as needed.
> And how does one know they need to do this? If you have multiple processes
> running, and you perform some action, i.e. log on, that should store info in
> that user's session, and on a later request that info mysteriously
> disappears and the user has to log on _again_, you're multiple processes are
> storing info per process. You need to switch to File or DRB storage so that
> all the processes store and retrieve the session info from one place, thus
> sharing the data.
> No doubt everyone on the list knows this, but for some newcomer to how
> servers and browsers interact in a session based web app (me for example a
> few months ago), it was an odd thing. Maybe this will spare some other
> newcomer. Or perhaps the FCGI, SCGI and potentially ACGI adapters should
> default to File based session info? I'll see about a patch if anyone thinks
> it's an okay idea.
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general

More information about the Nitro-general mailing list