Giter VIP home page Giter VIP logo

Comments (2)

jhollowe avatar jhollowe commented on September 26, 2024

yes, if your nodes are in a cluster, load balancing across their API will work.

I tested this by creating 2 nodes (in VMs) and joining them together in a cluster. I then created a container on one node, installed nginx, and added the following to /etc/nginx/nginx.conf:

stream {
        upstream api_nodes {
                server 10.0.1.111:8006;
                server 10.0.1.112:8006;
        }

        server {
                listen 8006;
                proxy_pass api_nodes;
        }
}

using the container's IP address, I can access the web UI or use proxmoxer and the calls are evenly distributed between the two nodes. If I were actually doing this for continued use, I would add hash $remote_addr; to the upstream so connections from any give IP are tied to a specific node. This means all the traffic from your computer will go to one node, but multiple clients will be load balanced across the nodes.

I think load balancing individual requests between nodes is okay, but there might be weird race conditions or different responses that I haven't seen. I would try to tie connections (or at least chunks of requests) to a single node (like done above with the hash of the IP).

from proxmoxer.

jhollowe avatar jhollowe commented on September 26, 2024

also note, this will only work when not verifying SSL certificates or updating the certificates on all nodes to allow the IP and/or hostname of the load balancer.

from proxmoxer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.