简体   繁体   English

Heroku中的负载平衡数据库

[英]Load-Balancing Database in Heroku

I have an application in Rails that displays a lot of information to the user. 我在Rails中有一个应用程序,它向用户显示了很多信息。

Using new relic, I notice that the database is working intensively and that this will probably limit my ability to scale (assume for now that the SQL is fine) 使用新的遗物,我注意到数据库正在密集地工作,这可能会限制我的扩展能力(现在假设SQL很好)

Is there a way I can have several databases which will be in sync, and the requests will be load-balanced between them? 有没有办法可以让几个数据库同步,请求将在它们之间进行负载平衡?

Does Heroku provide such a system? Heroku是否提供这样的系统? Maybe more importantly - Should I rely on Heroku for an app which needs to scale? 也许更重要的是 - 我应该依靠Heroku来购买需要扩展的应用吗? (is the architecture one web server connects to one database server or can it do more?) (一个Web服务器连接到一个数据库服务器的架构还是可以执行更多操作?)

Look in to heroku follower database. 查看heroku follower数据库。

https://devcenter.heroku.com/articles/heroku-postgres-follower-databases https://devcenter.heroku.com/articles/heroku-postgres-follower-databases

It will keep your database sync and for load balancing you will need to configure octopus. 它将保持您的数据库同步和负载平衡,您将需要配置章鱼。

Moreover regarding scalability its quite easy (application level scalability just increase the dynos) and on database they are having multiple models (with different cache sizes) and its quite ease with to switch between these models (with ignoreable down time) 此外,关于可扩展性,它非常容易(应用程序级可扩展性只增加dynos),并且在数据库上它们具有多个模型(具有不同的高速缓存大小),并且在这些模型之间切换非常容易(具有可忽略的停机时间)

thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM