0

i want to create a loadbalancing system for my streaming server but the problem is that nginx or haproxy both uses proxy and this will make the loadbalance server get overloaded on bandwidth. is there away to make nginx forward the request to one of the streaming servers instread of proxying the traffic ?

For now i tried this but still no luck

stream {
    upstream tcp_backend {
        server ip:8089;
        server ip:8089;
    }

server {
        listen 8089;
        proxy_pass tcp_backend;
    }
}

Thanks in advance for your help.

Andrew
  • 2,142
  • 2
  • 19
  • 25
  • This is not possible with either HAProxy and Nginx because they act as reverse proxies. You need to take a look in other options like LVS, what you're looking for is DSR. See http://www.linuxvirtualserver.org/VS-DRouting.html – Federico Sierra Apr 05 '18 at 13:42
  • Not sure about the real problem. You are indeed creating a load balancer for a couple of endpoint, that way you will have more bandwith used on the reverse proxy but overall the same with more processing power – Federico Galli Apr 05 '18 at 15:42
  • how about using url rewrite ? is there a way to rewrite request's comming to the main server to one of 2 servers in a roundrobin ? – chedlywalid Apr 07 '18 at 18:22

0 Answers0