How to run meteor application on two or more Heroku dynos?

喜你入骨 提交于 2019-12-23 20:15:46

问题


I have Meteor application which is run on Heroku platform using 1 dyno. When I increase number of dynos it stops working, reporting some problems with XHR (ERROR 404) on client side.

Does anybody successfully run Meteor app on two or more Heroku dynos? If so, what should I do in order to get it working?


回答1:


No, unfortunately Meteor does not work on Heroku with more than one dyno. Meteor needs session affinity, which Heroku does not currently offer.

Meteor needs session affinity: Running meteor in a cluster and real-time changes

Heroku does not support session affinity: https://devcenter.heroku.com/articles/intro-for-java-developers




回答2:


If you want a SaaS hosting provider that supports Meteor and can scale to multiple dynos using session affinity, there is now a CloudBees buildpack which looks promising:

https://github.com/CloudBees-community/meteor-clickstart




回答3:


Heroku now supports session affinity, which allows it to work with Meteor. It's in labs at the time of writing this, so you'll have to enable it.

https://devcenter.heroku.com/articles/session-affinity




回答4:


Well, Session affinity (or something similar) appears to be in the roadmap, at the very least. So, the developers anticipating addressing the issue by the time they release version 1.0.

https://trello.com/board/meteor-roadmap/508721606e02bb9d570016ae



来源:https://stackoverflow.com/questions/14417193/how-to-run-meteor-application-on-two-or-more-heroku-dynos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!