主服务器上的Nignx HLS负载均衡器数据流量

时间:2019-03-11 07:10:14

标签: nginx

我的设计是: 媒体服务器->边缘服务器(多个Nginx缓存服务器-> Nginx负载均衡器) 这是我的私人CDN系统(用于实时内容交付) 我有内容来源和多个优势;在每个边缘中,都有多个缓存服务器和一个负载均衡器 我一步一步地开始工作,因此对于这项工作,我遇到了Nginx负载平衡器的问题。 在此配置中,我在两个服务器s1和s2之间进行平衡。 但是当我通过(nload)检查流量时,例如从nload看到主服务器(负载均衡器)上的流量很大,请参阅s1 = 1GBPS s2 = 1GBPS loadbalancer = 2GBPS 注意:我的内容是HLS(.m3u8)

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;
        }
    }
}

0 个答案:

没有答案
相关问题