How to stream on demand video with load balancing

9.7k views Asked by At

I am triyng to figure out how to load balance my video server. The real world scenario is;

i have a storage server which stores all my video files, an several servers to load balance my http request(works like a CDN service). Client requests a video file -> Nearest Load balancing server answers request (lets say it LBS) LBS -> Storage (find the video and start sending first N kbyte to client, so it starts to play) -> LBS caches the rest of the file on its own storage, and on the next request, serves it directly from its cache,not from storage.

The problem with this setup is, i want to serve videos through RTMP, but on the balancing machine(its nginx web server), i couldnt serve the virtual files(like rtmp stream).

For the short; i am looking for an rtmp server implementation that acts like an nginx web server. Any ideas, advices will be great.

Note: currently i am trying to implement crtmpserver

2

There are 2 answers

1
Justo On BEST ANSWER

You can use nginx_rtmp module ... It's support stream flv files as rtmp streams (and transcoding rtmp streams, and repackage rtmp to hls too)

See doc about: https://github.com/arut/nginx-rtmp-module/

j

2
b1_ On

nginx created for handle static files.

For rtmp streamig and balansing use erlyvideo server. It written on erlang so load balancing are built in by design.