Meteor app using NGINX as load balancer -


i have meteor app deployed in digitalocean (ubuntu 14.04). able setup nginx , deployed app using mup. however, problem is, app used our company , 95% of total population of users have same ip. tested ip_hash directive directs 1 of our servers.

i tried different options, can't seem figure out wrong on our configurations. these setup, load balancing doesn't make sense because users direct 1 server.

what think best nginx configuration this? please see code below:

map $http_upgrade $connection_upgrade {     default upgrade;     '' close; }  upstream unifyhub {     ip_hash;     server 111.222.333.44:3000; # server 1     server 555.666.777.88:3000; # server 2 }  server {      listen 80;      #listen [::]:80 ipv6only=on;     server_name www.unifyhub.com;     access_log /var/log/nginx/unify.access.log;     error_log /var/log/nginx/unify.error.log;  location / {     proxy_pass http://unifyhub;     #proxy_set_header x-real-ip $remote_addr;  # http://wiki.nginx.org/httpproxymodule     #proxy_set_header host $host;  # pass host header - http://wiki.nginx.org/httpproxymodule#proxy_pass     #proxy_set_header    x-forwarded-for     $proxy_add_x_forwarded_for;      proxy_http_version 1.1;     proxy_set_header upgrade $http_upgrade; # allow websockets     proxy_set_header connection $connection_upgrade;      add_header cache-control no-cache; } } 

tia!


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -