开发者

Robust way to deploy a Rack application (Sinatra)

I'm looking for a robust way to deploy a Rack application (in this case a Sinatra app). Requests will take a little time (0.25-0.5 sec waiting on pr开发者_StackOverflow社区oxied HTTP requests) and there may be a decent amount of traffic.

Should I go with a traditional mongrel cluster setup? Use HAProxy as a load balancer? nginx? rackup?

What solutions have you used and what are the advantages?


Nginx / Unicorn FTW!

Nginx in front to serve static files and unicorn to handle Sinatra app.

Benefits: Performance, good load balancing with unix socks and deploy/upgrade without any downtimes (you can upgrade Ruby/Nginx/Sinatra/app without downtime).

How-to : http://sirupsen.com/setting-up-unicorn-with-nginx/ .


Nginx / passenger.

Nginx is very light, performant and has readable configuration files. Passenger is solid, easy to set up and works very well with rack - just have your config.ru in your app's main dir. Passenger can also take care of spawning processes and load balancing for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜