title: Nginx HLS Load balancer data traffic on primary server
body: <p>My design is:
  Media Server -> edge servers (Multiple Nginx Cache server -> Nginx Load Balancer)
  it is my private CDN system (for Live content delivery)
  I have content source and multiple edges; in each edge, there is multiple cache server and a Load Balancer
  I started step by step, so for this job I face a problem with Nginx Load Balancer.
  In this configuration, I am balancing between two servers s1 and s2.
  but when I check traffic by(nload), I see big traffic on the primary server(load balancer) for example from  nload see s1=1GBPS s2=1GBPS loadbalancer=2GBPS
  note: my content is HLS (.m3u8)</p>
  
  <pre><code>user www-data;
  worker_processes  5;  ## Default: 1
  error_log  /var/log/nginx/error.log;
  pid /var/run/nginx.pid;
  worker_rlimit_nofile 8192;
  
  events {
  worker_connections  4096;  ## Default: 1024
  }
  
  http {
      include    mime.types;
      include    /etc/nginx/proxy.conf;
      default_type application/octet-stream;
  
      log_format   main '$remote_addr - $remote_user [$time_local]  $status '
      '"$request" $body_bytes_sent "$http_referer" '
      '"$http_user_agent" "$http_x_forwarded_for"';
      access_log   /var/log/nginx/access.log  main;
      sendfile     on;
      tcp_nopush   on;
  
      # upstream
      upstream origins {
        server s1.ip;
        server s2.ip;
      }
  
  
      # default route
      server {
          listen 80;
          server_name  example.com;
          access_log   /var/log/nginx/example.com  main;
          location / {
              proxy_set_header Host $host;
              proxy_pass http://origins;
          }
      }
  }
  </code></pre>