The implementation of such a system ought to be in your application layer. e.g.: Streams published to origin "1" can only be played on edges pulling from origin "1". I've solved this using a consistent hashing algorithm to map streams to different video clusters, spreading the load around. If you want to have origins with separate sets of streams (makes sense for scaling), you will have to manage that on your end. It will use the first available (connection wise) origin. It has no way of knowing whether a certain stream exists on the origin or not. NOTE #2: All the nodes being pulled from must have the same streams. If you expect IPs to change (I'm using an AWS ELB, so they change a lot), you'll either need to mess with the DNS resolver in NGINX or use the exec_pull directive in combination with ffmpeg instead. NOTE #1: NGINX caches DNS resolutions until it is restarted. With just one server, you have a single point of failure. Other practical considerations aside, it gives you more reliability. You can have a DNS record resolve to multiple origin servers - not only could you use this for simple DNS round-robin load balancing, but this would be the way you'd have nginx-rtmp pull from multiple origins.Īfter a certain point, it makes sense to have more than one ingest server. Sample Node.js WebSocket-based server To create a WebRTC connection, clients need to be able to transfer messages via WebSocket signaling a bidirectional socket connection between two endpoints.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |