How rails server on production works?
Asked Answered
P

2

3

I wonder, in general is it more like PHP (it loads into memory, executes, and dies for each connect). Or it like Node.js (single instance stays in memory and accepts all requests)

Pharyngitis answered 17/7, 2013 at 17:53 Comment(0)
I
3

Technically it's the latter, but depending on the application server, it can be made to look like the former because the former is easier to manage. One example is Phusion Passenger. Take a look at https://www.phusionpassenger.com/ and http://www.modrails.com/documentation/Architectural%20overview.html

Imam answered 17/7, 2013 at 18:3 Comment(0)
B
0

Second option.

In fact it Ruby that boot the application (can have multiple instances depending of the case .i.e: using puma you can request multiple workers to handle requests) then as soon as ready (depending of the side of your application .i.e: if your routes.rb file where you build each URLs is huge, it will take more time of course) the application start to handle the requests.

Botryoidal answered 17/7, 2013 at 18:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.