WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

RE: [Xen-users] multiple streaming servers in a xen cloud

To: "'Tapas Mishra'" <mightydreams@xxxxxxxxx>, "'Xen List'" <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-users] multiple streaming servers in a xen cloud
From: "Simon Billis" <simon@xxxxxxxxxx>
Date: Mon, 9 Aug 2010 10:35:40 +0100
Cc:
Delivery-date: Mon, 09 Aug 2010 02:36:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTink_W_3qb89QLqHgwuorAb2zg3GBCxn+dujUNuQ@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTink_W_3qb89QLqHgwuorAb2zg3GBCxn+dujUNuQ@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acs3lv7SZ2N1sxRRTVKkzXr+ytIL3gADGvoQ
Hi,
> I have multiple video streaming servers running on some virtual
> machines running on Xen.
> 
> For different subdomains.
> i.e.
> site1.mydomain.com
> site2.mydomain.com
> site3.mydomain.com
> site4.mydomain.com

I assume that these different sites are streaming different content and do
not need to be load balanced or HA.

> The front end to the world is apache2 on Dom0

This is not recommended, you would be better off creating another DomU and
having apache in there.


> To be able to reach the streaming server I
> embed a javascript in HTML pages
> as follows
> Code:
> 
> <embed .....
> var="rtmp://site1.my_domain.com"
> 
> the problem is the website are many
> 
> site1.mydomain.com
> site2.mydomain.com
> site3.mydomain.com
> site4.mydomain.com
> 
> each on a separate virtual machine.

This is the important bit - If each machine is a different DomU and you have
setup the networking in such a fashion that each DomU has its own IP address
then nothing has to be done to the url to make this work. You don't even
have to change the listening port on the streaming servers.

> Each of these four have their own streaming servers the front end to
> each of these four is apache running on Dom0.

This is one instance of apache with either a number of virtual hosts or a
single host with a, for example, single page with the different urls on it.
 

> 
> If I run rtmp on each of the subdomains (the virtual machines) at a
> different port
> 
> how will I make sure
> a request such as
> 
> rtmp://site1.mydomain.com
> rtmp://site2.mydomain.com
> 
> goes to their respective servers.
> from the front end server from Dom0.

The simplest thing to do is either ensure that the DomU's containing the
streaming servers are on different IP addresses and then you can use those
urls for the specific DomU without change, or if you really want to have
different ports then specify the port in the url such as:
rtmp://site1.mydomain.com:8888 where 8888 is the port that the streaming
server is listening on.

 
> What do I need to handle in this case ?
> 
> IPTABLES came to mind instantly but from the client browser on
> internet when some one requests
> rtmp://site1.mydomain.com
> 
> how will I make sure this rtmp request is mapped to a port different
> than
> 1935 as there are three other streaming servers which are also to
> respond to their respective requests
> ?
> 
> For handling HTTP requests in this case I use Apache Reverse Proxy
> but for rtmp requests I am not clear as which direction to proceed.
> 

In general, try to keep it simple, the above can work, but is difficult to
implement and maintain. It requires an good knowledge and understanding of
iptables and Squid in each case.


If you provide some specific information on the networking side of the
DomU's then I might be able to be more specific.

Rgds

Simon.



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users