ruby on rails - How does Phusion Passenger reuse threads and processes? -
I am setting up an Apache 2 webserver which is running Ruby on Rail Web applications with Fujan Travelers I know That passenger requests produce Ruby procedures to settle. I have the following questions:
- If multiple requests are to be handled at the same time, will the passenger create multiple processes or multiple (ruby) threads? How can I configure it, so it always generates single-threaded processes?
- If I have two rail applications, a request for APA goes to process 1, and then requests for App B, is it possible that Process 1 requests this Will handle it too? When and how is it possible? In other words, is there a process to allow requests for multiple rail applications to handle?
- I have multiple URLs and multiple virtual hosts (such as http: // and https: //). Would it be able to serve different virtual hosts in the same process? (The answer to this is yes, I have set a global variable in response to the request of Virtual Host A, and I was able to get the value in Virtual Host B.)
The passenger, as far as I know, does not deal in thread. Instead, as the load increases on an app, it will be forked ApplicationSpawner of that application and will start another example. When the load decreases, examples of one or more application are killed.
If the passenger is configured in a certain way (I believe by choosing the "smart" spawn method), it will make a frameworkspaner, which is the rail code, but there is no application code, which Then load and application can be used to use that version of the railroad.
Then to answer your questions:
-
This will serve them sequentially, then will lay eggs to additional procedures if it decides that the load is sufficient.
-
No one process can only be related to a single rail application.
-
I am a type of sketch on this, but your experiment is understandable that the traveler should be smart enough to understand that this server is running from various places in the config, Yet you are talking about the same application. This is probably based on the application's filesystem path.
EDIT: I went and read a little bit on this. I was mostly right out, but technical details were a bit far away.
Comments
Post a Comment