Load Balancing with NGINX




+ Reply to Thread
Results 1 to 5 of 5

Thread: Load Balancing with NGINX

  1. #1
    The Server Admin is offline Junior Member
    Join Date
    Jul 2010
    Posts
    8
    Feedback Score
    0

    Load Balancing with NGINX

    Load balancing can be left to either hardware or software. For most of us, the expensive hardware is out of the question, but cheap (free) software will solve our needs just fine. Here’s a look at how nginx does load balancing

    Code:
    upstream  mysite  {
       server   www1.mysite.com;
       server   www2.mysite.com;
    }
    
    server {
       server_name www.mysite.com;
       location / {
          proxy_pass  http://mysite;
       }
    }
    The above configuration will send 50% of requests for www.mysite.com to www1.mysite.com and the other 50% to www2.mysite.com. However, if you add a “weight” tag onto the end of the “server” definition you can modify the percentages. Other useful options include max_fails and fail_timeout. For sticky sessions use ip_hash. Refer to the full documentation for further details.

  2. #2
    whitecat is offline Junior Member
    Join Date
    Sep 2011
    Posts
    1
    Feedback Score
    0
    thanks a ton mate . . .!!!

  3. #3
    roboid21 is offline Junior Member
    Join Date
    Jul 2011
    Posts
    2
    Feedback Score
    0
    Thanks! Looks great!

  4. #4
    mome is offline Junior Member
    Join Date
    May 2011
    Posts
    2
    Feedback Score
    0
    thanks works great

  5. #5
    biggsmoky is offline Junior Member
    Join Date
    Mar 2011
    Posts
    1
    Feedback Score
    0
    thanks man

+ Reply to Thread

Visitors found this page by searching for:

nginx load balancing

nginx load balancer sticky sessionsnginx loadbalancingnginx sticky sessionload balancing nginxnginx stickyload balancing with nginxnginx balancingnginx loadbalancernginx balancernginx as load balancernginx load balancing sessionnginx sticky load balancingnginx load balancer sessionnginx load balancing sticky sessionnginx sticky sessionsnginx load balancernginx load balancer sticky sessions modulengnix load balancingnginx load balancing howtonginx load balancer howtofnginx load balance weightnginx load balancing stickynginx load balancer weight

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts