Meteor Up load balancer

236 views Asked by At

My meteor application is deployed with mup.js
I would like to use balance loader for several reasons. (No downtime deployment, better user experience)
In the docs. there is a Swarm what makes a cross server load balancing, but I would have separated app containers at the same server. And they just running on different ports, what NGINX balancing

Status: Have started different app containers at the same server, but can not configure the nginx.

Having 2x mup file (1. mup.js, mup-support.js) They are pretty same, but the support runs only the app container, and connects it to the db.

mup.js:

  proxy: {
    domains: "domain.com",
    nginxServerConfig: "./staging.nginx.conf",
    loadBalancing: true,
    ssl: {
      // ... config
    }
  }

staging.nginx.conf:

upstream pass_servers {
  server container1
  server container2
}

server {
        server_name domain.com;
        listen 80 ;
        access_log /var/log/nginx/access.log vhost;
        include /etc/nginx/vhost.d/domain.com;
        location / {
                proxy_pass http://pass_servers.com;
        }
}

Result: crashed nginx

Question: Is the logic fine, or should I go in a different way? If the logic is fine, what am I missing?

0

There are 0 answers