如何使流星从带有负载均衡器的一个服务器获取代码 [英] How to make meteor get code from one server with load balancer
本文介绍了如何使流星从带有负载均衡器的一个服务器获取代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为流星应用程序运行nginx负载均衡器。我的应用程序偶尔运行到重载循环,不会终止。我在这里采取一些调试屏幕截图:
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
在reload_route_cookies.png(见下文)中,客户端显示多个Cookie路径。如何确保我的应用程式只从一个伺服器载入程式码?
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?
推荐答案
我发现告诉nginx sticky session path = /会解决这个问题。
I found that telling nginx sticky session path=/ will fix the issue.
upstream vida_node_server {
sticky path=/;
# ...
}
这篇关于如何使流星从带有负载均衡器的一个服务器获取代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文