I would like to ask how these people work and what parts they are responsible for
巴扎黑2017-05-16 17:32:23
Ngnix is a proxy server. It sets the listening port (80), encoding method (gzip), where the error page is (402, 403, 404), and is responsible for assigning requests to workers
Passenger/Unicorn is the application server, sitting on the proxy server. Each proxy generally has several application servers as workers, which are responsible for accepting and sending requests to web applications (such as rails) at high speed. Generally, the application server can handle thousands of requests per second
Rails application runs inside passenger/unicorn.
From nginx to passenger to rails, a request cycle is completed
bundle is Ruby’s package manager. Just like python's easy_install, pypi. Each application can have a Gemfile, which can specify the version of the library you want, and then others can install the libraries required by this application by just bundle install
大家讲道理2017-05-16 17:32:23
Quoted from Luexiao.com Zhang Zhi’s answer: http://luexiao.com/questions/33136760...
Bundler is mainly used to handle the relationship between rails applications, while making the environment between each rails application independent of each other,
Before Bundler appeared, gemsets were mostly used to manage gem packages. After Bundler appeared, it was used by many rails developers because of its ease of use and convenience. Nowadays, the more common method is to use Bundler to manage gem packages and rvm to manage ruby versions. .
Nginx ("engine
location /gridfs/ { gridfs my_app field=filename type=string; mongo 127.0.0.1:27017; }passenger is mainly used to manage Rails processes, but I don’t have much contact with passenger. I usually use Unicorn.
About process and collaboration:
Quoted from Github
For performance analysis of the two, please see Mongrel vs. Passenger vs. Unicorn