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>
Subject: RE: [Xen-users] multiple streaming servers in a xen cloud
From: "Simon Billis" <simon@xxxxxxxxxx>
Date: Mon, 9 Aug 2010 11:44:48 +0100
Cc: 'Xen List' <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 09 Aug 2010 03:46:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTi=vu4tsxgVs1wj2CA_Atq_+NZpHzo3f007yQ-pS@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> <0a3101cb37a6$3b8ff4e0$b2afdea0$@com> <AANLkTi=vu4tsxgVs1wj2CA_Atq_+NZpHzo3f007yQ-pS@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acs3qDQzywe3kOL8QkGWNmo4gbO9CAAAQT9g
Hi,

> >> 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.
> I am not clear with this point.
> The Dom0 has public IP so you mean to say I create another guest which
> would have my public IP.

I'm not sure about this - I don't run xen in this configuration, I split the
firewalling off to dedicated hardware and then have my Xen host behind the
firewall doing stuff however, here is a stab at it - I'm sure that someone
here will correct me :-)

>From the info on your wiki page I would do the following:

Create an instance called "e" with an IP address of 192.168.0.15 and have
apache on it with the config that you have on Dom0 (G). I would then use the
firewall on "G" to forward requests from the Public IP to "e" to be served
by the apache instance there. The Apache on "e" is doing the reverse proxy
stuff and all the connections to the other servers is handled by that, so
all should just work.

This fixes the first issue with running services on Dom0

Info from you wiki page:
   IP of Domu1:192.168.0.11                    Lets call it as a
   IP of Domu2:192.168.0.12                    Lets call it as b
   IP of Domu3:192.168.0.13                    Lets Call it as c
   IP of Domu4:192.168.0.14                    Lets Call it as d
   Ip of Dom0 :192.168.0.100  (Will behave as Gateway for DomU's)
   Lets call Dom0 as A
   Gateway for the network is 192.168.0.1 We will call it as G.



> >> Each of these four have their own streaming servers the front end to
> >> each of these four is apache running on Dom0.
> >> rtmp://site1.mydomain.com
> >> rtmp://site2.mydomain.com
> >>
> >> goes to their respective servers.
> >> from the front end server from Dom0.
> 
> For some time leave this part of question let us run all the rtmp
> server on 1935 only.
> 
Ahhahhh! Got it... 

You are attempting to have site1.mydomain streaming server and
site2.mydomain streaming server on the same single Public Ip Address.

OK - This is not simple to do with a single Public IP address. It requires
either port redirection or layer7 firewalls/reverse proxies such as SOCKS or
perhaps Squid. 


Port redirection is handled on the firewall using iptables. It can only work
if you are able to control the url that is being presented to the outside
world. E.g. in normal web browsers you can specify alternate ports for the
url in this manner:

http://site1.mydomain:8080 this tells the browser to connect to port 8080 on
the ip address that site1.mydomain points to. This doesn't work if you have
no control over the url or are expecting web crawlers etc to access the
site. However, in your case I "think" that you have some control over the
url that is presented to the outside world, so there for you are able to do
the following:

rtmp://site1.mydomain:8888 ---> your public IP address port 8888 which then
hits the firewall and is redirected:
publicIP port 8888 -----> privateip 192.168.0.1 port1935
 
rtmp://site2.mydomain:9999 ---> your public IP address port 9999 which then
hits the firewall and is redirected:

publicIP port 9999 -----> privateip 192.168.0.2 port1935


Simple to do and works well.

Layer 7 proxies / firewall have to look at the url requested and then
determine which server should answer the query. This is a question that you
would need to ask on the relevant list for the chosen proxy.


HTH

Simon.





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