How to make meteor get code from one server with l

2019-05-30 13:12发布

问题:

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=/;
    # ...
}