Showing posts with label Load Balancer. Show all posts
Showing posts with label Load Balancer. Show all posts

Wednesday, June 15, 2022

How to setup OCI load balancer

 How to setup OCI load balancer

Here we have 2 webservers. In front of this webservers we will have this OCI LB. Configuration of LB is Weighted Round Robin.

Domain or IP : 1

http://api1v2.f5imagine.org/



Domain or IP : 2


http://api2v2.f5imagine.org/


Login to your to your OCI dashboard. Under Netowking, Load balancer, Create a LB










Now access your LB IP. Each request will go to each web server.

Saturday, September 6, 2014

Nginx as a load balancer

How to configure Nginx as a Load balancer

sudo apt-get install nginx

nano /etc/nginx/sites-available/default

First we need to include the upstream module which looks like this:

upstream backend  {
  server backend1.example.com;
  server backend2.example.com;
  server backend3.example.com;
}

We should then reference the module further on in the configuration:

 server {
  location / {
    proxy_pass  http://backend;
  }
}

sudo service nginx restart