Answer the question
In order to leave comments, you need to log in
How many instances of a single rails application are running at the same time?
What happens when more than one request arrives - does it wait for rails to finish processing the previous one, or does it fork a new process for each new request?
If there is more than one process, then "who" "spawns" them - maybe rack ? (thumbs up :-) )
If there are a lot of processes, then how does the class caching mechanism work, etc.? of things ?
Answer the question
In order to leave comments, you need to log in
Rails is a thread-safe application, but does not by itself decide how it will work. Maybe so and so.
Rails is a rack compatible web framework that will work with any rack compatible web server. And the server decides how it will scale. Unicorn only forks, but it forks immediately, not on demand. Puma also forks, but there are several more streams in each fork.
Therefore, nginx is put in front of Rails in the production, which is able to hold any number of requests and wait until ruby is free
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question