JAVA audio and video solutions ---- Nginx tcp load balancing

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/cuiyaonan2000/article/details/97241852

Preface

Srs now built up a server, (linux system Centos7), are interested can study LVS

A plug flow used to nginx reception program to load balance

Use B Load balancing nginx user to play a video request

 

Steps

--with-stream is opened to receive network layer forwarding. To investigate, please contact [email protected] 

[root@localhost cuiyaonan]# wget http://nginx.org/download/nginx-1.16.0.tar.gz
[root@localhost cuiyaonan]# yum -y install gcc gcc-c++ automake pcre pcre-devel zlib zlib-devel openssl openssl-devel

[root@localhost cuiyaonan]# tar -zxvf nginx-1.16.0.tar.gz

[root@localhost cuiyaonan]# cd nginx-1.16.0/

[root@localhost cuiyaonan]# ./configure --with-stream --with-stream_ssl_module --with-http_stub_status_module

[root@localhost cuiyaonan]# make

[root@localhost cuiyaonan]# make install

 

Profile content

Load balancing strategy on your own Baidu. Http load balancing with the same

#cuiyaonan add
stream {
    upstream rtmp {
        server 192.168.2.63:1935; # 这里配置成要访问的地址
    }
    server {
        listen 8989;  # 需要监听的端口
        proxy_timeout 20s;
        proxy_pass rtmp;
    }
}

 

Guess you like

Origin blog.csdn.net/cuiyaonan2000/article/details/97241852