-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Advantages of Nginx over SRS #1576
Comments
In the nginx.org documentation, an article introducing nginx is excerpted. The article is titled Chapter "nginx" in "The Architecture of Open Source Applications", and it is written very well. Let's read it together.
|
The rewrite module of Nginx is a module that allows rewriting paths. In the configuration of Nginx, it can be seen that besides supporting regular expressions with PCRE, it can also configure complex processes. For example, the "if" statement can rewrite paths under different conditions.
This is already equivalent to parsing some logic. Besides supporting the Lua extension language in OpenResty, Nginx also supports njs, which is JavaScript. SRS does not support scripting languages. Currently, HTTP(S) serves as the common language between systems, and I believe integrating with HTTP is a more suitable approach. However, Nginx has done an excellent job in terms of configuration and scripting language extensions, which is admirable and worth learning from.
|
Nginx can support WebSocket proxying, please refer to WebSocket proxying. For example, to convert a live HTTP-FLV stream The SRS configuration is as follows:
Start videojs-flow/demo/mse.go to convert HTTP-FLV to WS-FLV.
Configure Nginx to reverse proxy WS-FLV as follows:
Use bilibili/flv.js to play the stream address:
|
Almost all SRS have been completed.
|
Learn where Nginx performs better than SRS and the areas worth studying.
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: