Redirect users using nginx as a load balancer to save on bandwidth -


I recently purchased 4 servers to load my videos. I am currently using NGNX as a load balancer, but I'm exiting bandwidth.

Is there any way that I can redirect one of the users to reduce my bandwidth usage and still find out if the server is up?

This is what I am currently using:

  upstream video {server xx.xx.xxx.130: 8080; Server xx.xx.xxx.131: 8080; Server xx.xx.xxx.132: 8080; Server xx.xx.xxx.133: 8080; } Proxy_next_upstream error; Server {80; Server_name www.example.com; Location / {proxy_pass http: // video; Proxy_redirect closed; Proxy_set_header host $ http_host; You can play with weight parameters for the bandwidth balance:    
upstream video {server xx. xx.xxx.130: 8080 weight = 5; # High bandwidth server server xx.xx.xxx.131: 8080 weights = 5; # High bandwidth server server xx.xx.xxx.132: 8080 Weight = 3; # Medium bandwidth server server xx.xx.xxx.133: 8080 weight = 1; # Less bandwidth server}

Therefore, every 14 requests will go: 5 xx.xx.xxx.130 and 131 servers, 3 to 132 and one to 133.

Read more:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -