consistant worker for websocket
This commit is contained in:
parent
2243628c6e
commit
7276da8673
|
@ -65,6 +65,7 @@ http {
|
||||||
upstream socket_nodes {
|
upstream socket_nodes {
|
||||||
# sticky only on commercial nginx
|
# sticky only on commercial nginx
|
||||||
# sticky cookie srv_id expires=8h;
|
# sticky cookie srv_id expires=8h;
|
||||||
|
hash $remote_addr consistent;
|
||||||
{% for n in range(osp_worker_count) %}
|
{% for n in range(osp_worker_count) %}
|
||||||
{% if n != 0 or osp_worker_count == 1 %}
|
{% if n != 0 or osp_worker_count == 1 %}
|
||||||
server 127.0.0.1:{{ osp_worker_start_port + n }};
|
server 127.0.0.1:{{ osp_worker_start_port + n }};
|
||||||
|
|
Loading…
Reference in New Issue