问题描述
我正在寻找一种部署机架应用程序的强大方法(在本例中为Sinatra应用程序).请求将花费一些时间(等待代理的HTTP请求需要0.25-0.5秒),并且可能会有相当数量的流量.
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 proxied HTTP requests) and there may be a decent amount of traffic.
我应该使用传统的杂种群集设置吗?使用HAProxy作为负载均衡器? Nginx?闹剧?
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 / Unicorn FTW!
位于前面的Nginx用于提供静态文件,而独角兽则用于处理Sinatra应用.
Nginx in front to serve static files and unicorn to handle Sinatra app.
优点:性能高,使用unix袜子具有良好的负载平衡,并且可以在不停机的情况下进行部署/升级(您可以在不停机的情况下升级Ruby/Nginx/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).
操作方法: http://sirupsen.com/setting-up-unicorn -with-nginx/.
这篇关于部署Rack应用程序的可靠方法(Sinatra)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!