Tutorial Use NGINX As Wowza Cache
Use NGINX As Wowza Cache
Wowza server can both transcode and serve your HLS/DASH stream,
but sometimes serving the files to many users from the origin itself can overload the Wowza server, which is already busy transcoding the video. In order to increase the amount of users that you can serve, a common approach is to setup cache servers (one or more) to reduce the load of serving the files from the Wowza server to the cache servers.
In this guide we will use Ubuntu servers with nginx as a warm cache for Wowza.
Example setup
A standard setup might be compiled from the following servers:
Install nginx
Server tuning
In order to allow the cache servers to fully utilize their resources, several adjustments should be made. Please check out our
NGINX tuning
Here is a complete nginx config tuned for caching.
Be sure to edit the upstream section to match your wowza server ip and port, multiple servers can be added - one per line (don't forget the semi-colon).
Replace /etc/nginx/nginx.conf completely with this
(The config might be on /usr/local/nginx/conf/nginx.conf on certain platforms)
NOTE: Did you update your Wowza actual ip address?
Go up and search for '# ADD YOUR SERVERS HERE' comment
After setting up the config we check that it's valid
Then we restart the server to apply the new configuration
Load Balancing
The last step is to point you users to request the content from nginx as if its wowza. This can be done using DNS or via randomly assigning one of the servers.
now becomes
Or
You need to be registered to see the hidden links
Wowza server can both transcode and serve your HLS/DASH stream,
but sometimes serving the files to many users from the origin itself can overload the Wowza server, which is already busy transcoding the video. In order to increase the amount of users that you can serve, a common approach is to setup cache servers (one or more) to reduce the load of serving the files from the Wowza server to the cache servers.
In this guide we will use Ubuntu servers with nginx as a warm cache for Wowza.
Example setup
You need to be registered to see the hidden links
A standard setup might be compiled from the following servers:
- 1x Wowza transcoder
- 3x NGINX caching server (Ubuntu)
Install nginx
You need to be registered to see the hidden links
apt-get update apt-get install nginx -y |
You need to be registered to see the hidden links
In order to allow the cache servers to fully utilize their resources, several adjustments should be made. Please check out our
You need to be registered to see the hidden links
NGINX tuning
You need to be registered to see the hidden links
Here is a complete nginx config tuned for caching.
Be sure to edit the upstream section to match your wowza server ip and port, multiple servers can be added - one per line (don't forget the semi-colon).
Replace /etc/nginx/nginx.conf completely with this
(The config might be on /usr/local/nginx/conf/nginx.conf on certain platforms)
NOTE: Did you update your Wowza actual ip address?
Go up and search for '# ADD YOUR SERVERS HERE' comment
After setting up the config we check that it's valid
Then we restart the server to apply the new configuration
service nginx restart |
You need to be registered to see the hidden links
The last step is to point you users to request the content from nginx as if its wowza. This can be done using DNS or via randomly assigning one of the servers.
now becomes
You need to be registered to see the hidden links
You need to be registered to see the hidden links
Or
You need to be registered to see the hidden links
Last edited by a moderator:
Relate Threads