Topic: does each mongrel has one instance of a singleton class?

Hi,

I guess it's really stupid to ask this but i just want to confirm that i understand the singleton class correctly. In my rails app I have a few singleton classes, and then i deploy my app with a cluster of 10 mongrel servers and pen as load balancing (no round robin). I notice a performance issue related to my singleton classes, so i want to ask if it's really 10 instances of each singleton class are created on my 10 mongrel or they all share ONE instance of that class. I know rails is single thread so each mongrel is running on one thread but again i just want to make sure there is nothing fishy about singleton module.

Thanks in advance

Re: does each mongrel has one instance of a singleton class?

I can only assume that your singleton classes are in fact distinct, there are 10 of them if you have 10 instances of your Rails app running. 

WRT threads,  this is my understanding,  although I'm still a little fuzzy:

When Rails is running,  the Ruby interpreter is running,  the Ruby interpreter at that point is a single process running on the OS.  Ruby doesn't use threads internally , unlike the Java Virtual Machine.  So instead of saying Ruby is a single thread, it's more accurate to say Ruby runs as a single process that does not use threads.

But, like I said, I'm not positive,  can anybody confirm or refute this?

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: does each mongrel has one instance of a singleton class?

I have 1 instances, if suppose i need to reduce traffic means can i need 2 or more instances?