Currently I've already read a lot tutorials teaching about Rails App deployment, almost every one of them use Nginx or other alternatives like Apache to serve static pages. Also in this QA Why do we need nginx with thin on production setup? they said Nginx is used for load balancing.
I can understand the reasons mentioned above, but I write a Rails App as a pure API backend service, the only purpose is to serve JSON formatted data for other client-side apps, no pages rendering at all. So my questions are:
- In my situation, do I really need Nginx just to deploy a pure API Rails App?
- If not, how should I deploy my app? just running it (with unicorn in production env) at background is good enough? like
rails server -e production -d
?
I'm so curious about these two question, hope someone can explain the details or show me some good references for me, thanks in advance.