Search code examples
ruby-on-railsnginxwebserverunicorn

Why does Unicorn need to be deployed together with Nginx?


I would like to know the difference between Nginx and Unicorn. As far as I understand, Nginx is a web server while Unicorn is a Ruby HTTP server.

Since both Nginx and Unicorn can handle HTTP requests, what is the need to use the combination of Nginx and Unicorn for RoR applications?


Solution

  • Nginx
    enter image description here
    Unicorn
    enter image description here
    Refer to unicorn on github for more information.