I was looking for some application to demonstrate the container concept. Most of the examples on the web involve either simple application or more complex stuff that requires you to copy and paste code that only a developer can understand. As I am an infrastructure guy, I am looking for a no code application that is also substantial enough to illustrate various container concepts.
I chance upon RTMP and NGINX and these will be the focus for this lab.
The initial focus for the lab will be to explore containers on Windows servers but can be expanded to other platform, such as Linux.
To have a lab that is targeted at IT Professioinal looking to learn containers and Dockers.
The lab will demonstrate how to stream video content to NGINX via RTMP. The live stream is then viewed via HLS from the NGINX.
See the diagram below for the various components

The lab components consist of 3 containers (NGINX1, NGINX2 and NGINX-LB), OBS to stream video to server and a client which will view the video via a web browser.
- Open Broadcaster Studio (OBS) will stream the video to NGINX1 via RTMP (via port 1935)
- Client will connect to the HLS webpage running on the NGINX servers (via HTTP port 80)
- NGINX-LB container will load balance and proxy the HLS webpage to the backend container (NGINX1 via port 8080 and NGINX2 via port 8081)
- NGINX1 container will receive RTMP from the OBS (via port 1935). It will also push the video stream to NGINX2 container (via port 1936) so that it is also viewable from there. NGINX1 will also host the HLS webpage (via port 8080) for client to stream video.
- NGINX2 container will receive RTMP from NGINX1 (via port 1936). It will also host the HLS webpage (via port 8081) for client to stream video.
- NGINX-LB function as a load balancer to proxy the client request (via port 80) to the 2 backend NGINX container (8080 and 8081)
Clone or download the files in this repo. Refer to the lab guide in the instructions folder.
The Win32 NGINX binaries with rtmp module is pulled from this GIT repo nginx-rtmp-win32
More info on RTMP, HLS RTMP HLS info
Note: The intial lab was only tested on Windows server 2019 with the container feature and Docker installed
Additional to do and enhancements
Configure NGINX load balancer to perform health check on NGINX1 and NGINX2Only for paid version of NGINX- Ensure the lab works on Docker on Windows 10 using Windows container - Done
- Make the lab works on Linux container - Done
- Use Docker compose - Done
- Use Docker swarm
- Use Kubernetes