Old 17th November 2003, 21:13   #1
someToast
Member
 
someToast's Avatar
 
Join Date: Aug 2002
Location: Minneapolis, MN
Posts: 67
How permanent is the ShoutCast yp link?

I'd like to take advantage of the load balancing of ShoutCast's yellow pages station link by posting that link on my station's web page.

http://www.shoutcast.com/.../shoutcast-playlist.pls?rn=6892&file=filename.pls

Just how permanent is that "6892" identifier? Is it maintained as long as my server is available? Will it be reassigned during those times when my server gets no response from the yp? What if my server's name string changes?

.
someToast is offline   Reply With Quote
Old 17th November 2003, 21:17   #2
LollipopLustKil
Insomniac
(Forum King)
 
LollipopLustKil's Avatar
 
Join Date: Jul 2003
Location: Ohio
Posts: 3,033
Send a message via AIM to LollipopLustKil
Once your server disconnects and then reconnects, it changes.

Just use your IP as your station link, no biggy. Or get a No-IP link from http://www.no-ip.com.

Scotty Doesn't Know
LollipopLustKil is offline   Reply With Quote
Old 17th November 2003, 21:39   #3
someToast
Member
 
someToast's Avatar
 
Join Date: Aug 2002
Location: Minneapolis, MN
Posts: 67
But my understanding is, that if I point to the IP of my primary server, once that is full people will be blocked, even though the relay still has a number of slots open.

Or am I misinterpreting this? (Please tell me that I'm misinterpreting this.)

Of course my cable would have to go out right now for the first time in months.

.
someToast is offline   Reply With Quote
Old 17th November 2003, 21:41   #4
DJHotIce
Forum Loser
(Forum King)
 
DJHotIce's Avatar
 
Join Date: Jan 2003
Location: That place I can't remember the name.
Posts: 4,617
Send a message via AIM to DJHotIce Send a message via Yahoo to DJHotIce
Just set your primary server to allow 1 listener, and to allow only relay connections. Then allow your relay to connect to the SC Primary server on your connection. That is what I best recomend

-DJHotIce
Bounce Multimedia - Professional Web Design
DJHotIce is offline   Reply With Quote
Old 17th November 2003, 21:48   #5
JoeDeeJay
Junior Member
 
JoeDeeJay's Avatar
 
Join Date: Nov 2003
Posts: 26
Ok im pretty embarassed but what is www.no-ip.com and what can i get from it or what does it do?
JoeDeeJay is offline   Reply With Quote
Old 17th November 2003, 21:51   #6
DJHotIce
Forum Loser
(Forum King)
 
DJHotIce's Avatar
 
Join Date: Jan 2003
Location: That place I can't remember the name.
Posts: 4,617
Send a message via AIM to DJHotIce Send a message via Yahoo to DJHotIce
No-IP.com is a leading dynamic DNS service provider. We offer a wide range of services pertaining to your internet presence, from that pesky dynamic IP problem to getting around ISPs who block port 25. All of our services take advantage of our global network of redundant DNS and mail servers peered with tier-1 data centers.

-DJHotIce
Bounce Multimedia - Professional Web Design
DJHotIce is offline   Reply With Quote
Old 17th November 2003, 21:54   #7
someToast
Member
 
someToast's Avatar
 
Join Date: Aug 2002
Location: Minneapolis, MN
Posts: 67
Quote:
Originally posted by DJHotIce
Just set your primary server to allow 1 listener, and to allow only relay connections. Then allow your relay to connect to the SC Primary server on your connection.
But that sounds like offloading all traffic to the relay. I want both the primary server and the relay to share the listener load.

.
someToast is offline   Reply With Quote
Old 17th November 2003, 22:00   #8
DJHotIce
Forum Loser
(Forum King)
 
DJHotIce's Avatar
 
Join Date: Jan 2003
Location: That place I can't remember the name.
Posts: 4,617
Send a message via AIM to DJHotIce Send a message via Yahoo to DJHotIce
Ok then. when they click the SC link it will attempt to ballance the weight

-DJHotIce
Bounce Multimedia - Professional Web Design
DJHotIce is offline   Reply With Quote
Old 17th November 2003, 22:01   #9
FesterHead
Alumni
 
FesterHead's Avatar
 
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
Check out the results from a SHOUTcast forum search on 'load balancing'.

Look for a post by danielsan titled:
equal serverload without a cluster?

Note: Other search criteria may yield more results.

****************************

Alternativeley, check out Radio Toolbox.

FesterHead is offline   Reply With Quote
Old 17th November 2003, 22:19   #10
someToast
Member
 
someToast's Avatar
 
Join Date: Aug 2002
Location: Minneapolis, MN
Posts: 67
I'm seeing many of the same pages for a "load balancing" search as I did this morning for "relay".

I probably shouldn't have said "share the load." I'm fine with the primary server having 5 listeners and the relay having one. My concern is people being needlessly locked out of one or the other.

In my limited tests, it appears that even with both server addresses in the .pls file, the audio client only retains the IP address it connected to at the time. What happens if ten people try to connect with the relay address (which they happened to be shunted to on their previous visits). Does the relay know enough to send them back to the primary server's open slots? Can it be told to?

.
someToast is offline   Reply With Quote
Old 17th November 2003, 23:13   #11
FesterHead
Alumni
 
FesterHead's Avatar
 
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
If the main DNAS is full, listeners get directed to a relay.

If the relay(s) is(are) full, listeners get directed to the main DNAS.

If they're all full, the listener gets bounced.

FesterHead is offline   Reply With Quote
Old 17th November 2003, 23:20   #12
someToast
Member
 
someToast's Avatar
 
Join Date: Aug 2002
Location: Minneapolis, MN
Posts: 67
Excellent. This is exactly what I was looking for. Thanks!

.
someToast is offline   Reply With Quote
Old 17th November 2003, 23:21   #13
someToast
Member
 
someToast's Avatar
 
Join Date: Aug 2002
Location: Minneapolis, MN
Posts: 67
Excellent. This is exactly what I was looking for. Thanks!

Now I just have to edit the web page so it culls listener stats from both servers.

.
someToast is offline   Reply With Quote
Old 18th November 2003, 01:18   #14
Jay
Moderator Alumni
 
Jay's Avatar
 
Join Date: May 2000
Location: Next Door
Posts: 8,942
Just an FYI Radio toolbox provides dynamic load balancing for your listeners as of the latest version, just go to the web admin panel and click listen with all your servers listed, it uses percentage rather then listener count to determine the best servers to send people to.
Jay is offline   Reply With Quote
Old 10th October 2004, 03:58   #15
theravenz
Junior Member
 
Join Date: Oct 2004
Location: Melbourne Australia
Posts: 12
Alright, I found a script on this site somewhere, which i modified for my own site, so im going to post my modification here, You might see this script somewhere (thanks to whoever posted it - forgot who)

But anyways, it didnt have listener count on it, like the shoutcast.com cluster link did, so i pretty much made it identical to the cluster link, here it is

code:

<?
##Settings##

//Define all servers here (add more if needed)
$server_address[0]='65.75.186.30';
$server_port[0]=8400;
$server_title[0]='fuseRADIO 24/7 Mix';

$server_address[1]='67.19.102.78';
$server_port[1]=8010;
$server_title[1]='fuseRADIO 24/7 Mix';

$server_address[2]='67.19.102.78';
$server_port[2]=8012;
$server_title[2]='fuseRADIO 24/7 Mix';

//Set mode (either load_balancing, random, or new_random)
// $mode='load_balancing';
// $mode='random';
$mode='load_balancing';

##Settings complete##

if($mode=='random'){
mt_srand((double) microtime() * 1000000);
for($i=0; $i<count($server_address); $i++){
$server[$i]=mt_rand(0, count($server_address)-1);
for($j=0; $j<$i; $j++){
if($server[$j]==$server[$i]){
$i--;
break;
}
}
}

}
elseif($mode=='load_balancing'){
//This is really not a good way to do this since each request will
//query all the servers. It would be better to have a cache that is updated
//periodically (file or database) and just grab the current numbers from there,
//but since this is just something to go off of I will do it by contacting each
//server.
for($i=0; $i<count($server_address); $i++){
$fp = fsockopen($server_address[$i], $server_port[$i], $errnum, $errstr, 2);
if ($fp){
$buffer='';
fwrite($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Playlist Generator(Mozilla)\r\n\r\n");
while(!feof($fp)){
$buffer.=fread($fp, 1024);
}
fclose($fp);
$data=eregi_replace(".*<body>(.*)</body>.*", '\1', $buffer);

$numbers=explode(",", $data);

$lnr[$i]=$numbers[0];
$mx[$i]=$numbers[3];
$percent_filled[$i][0]=$numbers[0]/$numbers[3];
$percent_filled[$i][1]=$i;
}
else{
$lnr[$i]=$listen;
$mx[$i]=$max;
$percent_filled[$i][0]=1.1;
$percent_filled[$i][1]=$i;
}

}
sort($percent_filled);
reset($percent_filled);
for($i=0; $i<count($server_address); $i++){
$server[$i]=$percent_filled[$i][1];

}
}
elseif($mode=='new_random'){
//Doubt it is useful for this, but if you had a LARGE number of servers this would
//be faster since in the other random there are only as many random numbers as servers
//and technically you could get stuck in a for loop for a long time trying to get an unused
//random number. This method uses 1000 times the number of servers so the probability
//of getting repeats is much less meaning less time in the for loop that makes sure the
//random numbers are unique.
mt_srand((double) microtime() * 1000000);
for($i=0; $i<count($server_address); $i++){
$rand[$i][0]=mt_rand(0, (1000*count($server_address)));
$rand[$i][1]=$i;
for($j=0; $j<$i; $j++){
if($rand[$j][0]==$rand[$i][0]){
$i--;
break;
}
}
}
sort($rand);
reset($rand);
for($i=0; $i<count($server_address); $i++){
$server[$i]=$rand[$i][1];
}

}
else{
for($i=0; $i<count($server_address); $i++){
$server[$i]=$i;
}
}
$totall=$lnr[$server[0]]+$lnr[$server[1]]+$lnr[$server[2]];
$totalm=$mx[$server[0]]+$mx[$server[1]]+$mx[$server[2]];
$total_entries=count($server_address)+1;


header("Content-Type: audio/x-scpls");

echo("[playlist]\n");
for($i=0; $i<count($server_address); $i++){
$file=$i+1;
echo('File'.$file.'=http://'.$server_address[$server[$i]].':'.$server_port[$server[$i]].'/');
echo("\n");
echo('Title'.$file.'=(#'.$file.' '.$lnr[$server[$i]].'/'.$mx[$server[$i]].') '.$server_title[$server[$i]].'');
echo("\n");
echo("Length$file=-1\n");
}
echo("File4=http://hmmm:8743/");
echo("\n");
echo("Title4=Current total listeners (".$totall."/".$totalm.")");
echo("\n");
echo("Length4=-1\n");
echo("NumberOfEntries=$total_entries\n
Version=2\n");

?>



This is the script i use,
theres 2 copies of it of you guys wanna test it out, links should be in my sig, else here they are again :P

http://fuseradio.com.au/alt.pls
http://fuseradio.com.au/trance.pls

Have fun.
theravenz is offline   Reply With Quote
Old 10th October 2004, 04:04   #16
protegechris
Forum Queen
 
protegechris's Avatar
 
Join Date: Feb 2004
Posts: 6,635
theravenz, stop digging up old threads trying to show off the script.

yeah, i'm back.
protegechris is offline   Reply With Quote
Old 10th October 2004, 04:06   #17
theravenz
Junior Member
 
Join Date: Oct 2004
Location: Melbourne Australia
Posts: 12
theravenz is offline   Reply With Quote
Old 10th October 2004, 09:09   #18
NJK
FRISIAN (MOD)
 
NJK's Avatar
 
Join Date: Sep 2003
Location: in a house
Posts: 16,103
I don't see anything funny about this, and please read the rules which you agreed to about signature size, yours is way over the line.

Each Thursday a new show on Celtica Radio with Darkwave music.

WINAMPSHOUTCAST
NJK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump