Skip to content

Doubt - Balancing loads between managements #8221

@IgaoWolf

Description

@IgaoWolf

Good afternoon, everyone. How are you?

I am implementing an nginx for load balancing between managements, and since I currently have two managements in my environment, it is getting close to the demand to increase to more managements. Currently, I have two because one serves as a slave and the other as a backup, both with a keepalived configured with a VIP interface that goes up when checking if CloudStack is running.

I would like to know if anyone has a template that I can use as a reference to correct my file. I am implementing nginx for the first time to balance the loads between the two managements.

Currently, I am only using keepalived for cases of connection loss and for the elevation of the VIP interface.

I have a file that I put together, but I would like to check a case from someone who has it in production and see if they can comment on how it is working.

I will also leave below the template I am creating for this implementation:

cloudstack_proxy.conf

_upstream cloudstack_backend {
server:8250;
server :8250;
}

upstream cloudstack_backend_8080 {
server :8080;
server :8080;
}

server {
listen 80;
server_name acs..com.br;

location / {
    proxy_pass http://cloudstack_backend;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

}

server {
listen 443 ssl;
server_name acs..com.br;

ssl_certificate /<certificates>
ssl_certificate_key /<certificates>

location / {
    proxy_pass http://cloudstack_backend;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

}

server {
listen 8080;
server_name acs..com.br;

location / {
    proxy_pass http://cloudstack_backend_8080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

}

server {
listen 8250;
server_name acs..com.br;

location / {
    proxy_pass http://cloudstack_backend;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

}_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions