How to make meteor get code from one server with load balancer

给你一囗甜甜゛ 提交于 2019-12-08 06:40:35

问题


I'm running nginx load balancer for meteor application. My app occasionally run into reload loop and does not terminate. I take some debug screenshots here:

https://drive.google.com/#folders/0B0ayFgn4x5Sccjd1QTdYdDNkNXc

In reload_route_cookies.png (see below), client side shows multiple cookie routes. How do I make sure that my app only loads code from one server?


回答1:


I found that telling nginx sticky session path=/ will fix the issue.

upstream vida_node_server {
    sticky path=/;
    # ...
}


来源:https://stackoverflow.com/questions/23769925/how-to-make-meteor-get-code-from-one-server-with-load-balancer

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