扩展 Rails 应用程序的廉价方法
我有一个应用程序,它正在变得越来越大,但到目前为止,它并没有给我带来很好的收入。这意味着,资金短缺,无法再投资。在这种情况下,我找到了一种进行“廉价分布式 Rails”部署的方法。
我有 4 个 VPS。它们都位于同一台物理服务器中。我在一个专用 VPS 中添加了一台运行 HAproxy 的负载平衡服务器。我在那里指出了与我的域名关联的虚拟 IP 地址。在这个 HAproxy 后面,我有两个 VPS 运行我的 Rails APP,乘客和内存缓存。两个应用程序服务器都在寻找同一个数据库服务器,即我的第四个 VPS。因此,我用每月 44 美元安装了一个分布式环境。这不会是我的最终选择,但现在预算有限,这是部署 Rails 应用程序的好方法吗?有什么优点或缺点吗?值得我每月 44 美元吗?
I have an application, that is becoming big, but until now, its not giving me a good revenue. That means, short money to re-invest on that. In this scenario, i found a way to make a "cheap distributed rails" deployment.
I've got 4 VPS. All of them are in the same physical server. I added a load balance server running HAproxy in one dedicated VPS. There i pointed my virtual ip address where my domain name is associated. Behind this HAproxy i have more two VPS running my rails APP, passenger and memcache. Both apps servers are looking to the same database server, my 4th VPS. So with $44/month, i mounted a distributed environment. It won't be my final choice, but now, that the budget is short, is that a good way to deploy a rails application? Any pros or cons? It worth my $44/month?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
增加单个 VPS 上的资源并调整乘客以处理更多内存和并发 Rails 实例可能会更有效。
It may be more efficient to increase the resources on a single VPS and tune passenger to handle more memory and concurrent Rails instances.