IgaoWolf opened a new issue, #8221:
URL: https://github.com/apache/cloudstack/issues/8221

   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<ipserver>:8250;
       server <ipserver>:8250;
   }
   
   upstream cloudstack_backend_8080 {
       server <ipserver>:8080;
       server <ipserver>:8080;
   }
   
   server {
       listen 80;
       server_name acs.<domain>.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.<domain>.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.<domain>.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.<domain>.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;
       }
   }
   `


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to