tags:

views:

226

answers:

1

Is there a directive in apache or nginx (preferably) that allows to replicate an incoming stream to multiple upstreams simultaneously?

The reason I need this: I want to stream live video content from one client to a number of Flash RMTP servers that will make that content available to a number of clients.
This setup is working on one streaming server, but I want to add more.

Any help is greatly appreciated.

A: 

I am assuming you are using, something similar to this:

proxy_pass

 location / {
   proxy_pass        http://192.168.1.11:8000;
   proxy_set_header  X-Real-IP  $remote_addr;
 }

--

Use this instead: http:// wiki.nginx.org/NginxHttpUpstreamModule

 upstream backend  {
   server backend1.example.com weight=5;
   server backend2.example.com:8080;
   server unix:/tmp/backend3;
 }

 server {
   location / {
     proxy_pass  http://backend;
   }
 }
Shahan