Deployment of an app that uses a big Shared library

Hi guys,

I am new to Rails, so if my assumptions below are completely wrong, please do let me know.

My app needs to load a shared library. I use Ruby/DL to do this. My understanding of Rails is since it's single-threaded, the way to deploy an app is to use HTTP proxying to send requests that should be handled by Rails to one of any number of back-end application processes. Does it mean the shared library will be loaded by every single application process? This library is very big (and in fact takes a lot of time to load), hence my concern. If my assumption is correct, it means the app will grow far too big. Is there any way to handle this?

Thanks! Peter

If I understand correctly, Mongrel and Passenger start multiple instances of the Rails app, but these are long-lived. The app instance is not created for each request and then destroyed.