简体   繁体   中英

Load-Balancing Database in Heroku

I have an application in Rails that displays a lot of information to the user.

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)

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? Maybe more importantly - Should I rely on Heroku for an app which needs to scale? (is the architecture one web server connects to one database server or can it do more?)

Look in to heroku follower database.

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)

thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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