[Ruby] Per user IO connections in Rails?

Atom Powers atom.powers at gmail.com
Thu May 22 12:19:54 PDT 2008


On Thu, May 22, 2008 at 9:03 AM, Scott Windsor <swindsor at gmail.com> wrote:

>
> If you're using rails with a standard deployment (mongrel or fastcgi), you
> should be "ok".  Rails locks each request with a mutex so that you
> shouldn't
> have to worry about it.  Just be mindful that each rails instance has it's
> own connection pool - so if you have a large number of rails processing
> running on multiple hosts, there's no guarantee that this pool will be used
> for a given request (unless you've made your request dispatching smarter).
>

Maybe I am going about this all wrong.
I've been assuming that once the server is started, all modules are loaded
server-wide and variables are shared between sessions. But that may not be
the case?

So riddle me this:
If I 'include Ldap' in application.rb are the instance variables in that
module shared between all sessions, or are they unique for each session? or
for each server/service?
Could the answer depend on the service? script/server vs Apache fastcgi?

I really appreciate the advice, this is my first Rails app. but Ruby is by
far the most fun I've had programming in ... ever.


-- 
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--


More information about the Ruby mailing list