4
votes

I am rather new to ROR development and currently i am using Herokuo (with Thin) to run my web application.

I have been reading up on Zero Downtime deployment and i came across nginx and unicorn.

Can anyone explain to me what exactly is Nginx and is it used in conjunction to Heroku? Same goes for unicorn?

What are the pros and cons of using it instead of thin?

Thanks so much in advance!

1

1 Answers

5
votes

nginx is a web server; in the context of Ruby on Rails applications, it receives the request from the user and hands it off to an application server. Application servers that are popular now:

  • thin
  • webrick
  • puma
  • unicorn

In context of heroku, you have a choice of application servers, but not a choice of web servers.

When hosted yourself, the use of unicorn versus thin can help give you zero downtime deploys. However, heroku can help give you zero-downtime deploys on their own, using any of thin/puma/unicorn.

For experimental support of zero downtime on heroku: https://devcenter.heroku.com/articles/labs-preboot/