开发者

Robust way to deploy a Rack application (Sinatra)

开发者 https://www.devze.com 2023-01-31 14:47 出处:网络
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 the

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

精彩评论

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