From: Steve McMillen <[EMAIL PROTECTED]>
Subject: Re: load balancing
A nice simple solution is CGI scripting. This works for moderate load
scenarios. Following is a sample script in PERL and one in TCL. Feel free to
use as-is or repurpose this code for your own uses but please understand this
is unsupported.
Other folks have used round-robin DNS and yet other more advanced folks have
used various layer 4 switch software for a more advanced "semi-intelligent"
load balancing. Semi-inteligent defined as where the load balancing software
makes decisions on number or existing connections and sometimes rough
geographic balancing (usually by country code of requester). Alteon WebOS
(http://www.alteonwebsystems.com) or Cisco LocalDirector
(http://www.cisco.com) are two I have heard of used with RealSystem G2.
Resonate makes a product that does not require use of Layer 4 switches to
perform semi-intelligent server load balancing.
You will likely find other alternatives for server load balancing by searching
the database at http://partners.real.com
cheers!
[EMAIL PROTECTED]
-----------------
------------
#!/usr/bin/perl
# usage: http://www.webserver.com/cgi-bin/load?anything.rm
#
# Modify the line below to include the list of servers you would like to load
balence between
# Include a server multiple times to weight the referrals
@ip = ( 'server1', 'server2', 'server2', 'server2', 'server3' );
$content = $ENV{'QUERY_STRING'};
srand($$ + time);
$count = int(rand($#ip + 1));
# If you are using the RealPlayer Plugin then modify the line below with
"-plugin" after "realaudio"
print "Content-type: audio/x-pn-realaudio\n\n";
print "rtsp://$ip[$count]/$content\n";
print "--stop--";
print "pnm://$ip[$count]/$content\n";
------------
------------
# Usage: http://webserver.com/cgi-bin/ramgen.tcl?ram=144.ra
# http://webserver.com/cgi-bin/ramgen.tcl?rpm=144.ra
# Enter servers in following list.
# To weight entry use multiple entries for a given server.
# Even distribution clustering
set servers { your.realserver1.com your.realserver2.com your.realserver3.com }
# Weighted distribution clustering
set servers { your.realserver1.com your.realserver1.com your.realserver2.com }
set N [llength $servers]
set n [expr int( fmod( [clock clicks], $N ) ) ]
set server [lindex $servers $n]
# Compute MIME Type Req'd #
###########################
foreach {filetype filename} [split $argv "="] {}
set filetypes(ram) audio/x-pn-realaudio
set filetypes(rpm) audio/x-pn-realaudio-plugin
# Return Headers #
##################
puts "HTTP/1.0 OK"
puts "Content-Type: $filetypes($filetype)\n"
puts "pnm://$server/$filename"
------------
RealForum wrote:
>
> From: "Terence Kwan" <[EMAIL PROTECTED]>
> Subject: load balancing
>
> Can anybody suggest any load balancing hardware/software for streaming
> servers?
>
> Thanks
>
> TK
>
*******************************************************
The RealForum is an email discussion group focused on using RealNetworks
products. The RealForum is a place to post messages about the best methods
for creating content using RealNetworks technologies and the planning and
implementation of streaming-media web sites. Archives of RealForum can
be found at http://realforum.real.com
If you ever want to remove yourself from this mailing list,
you can send mail to <[EMAIL PROTECTED]> with the following
command in the body of your email message:
unsubscribe realforum
or from another account, besides the address you subscribed with:
unsubscribe realforum <[EMAIL PROTECTED]>