Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Automatic load balancing
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Tue Aug 22, 2006 7:33 pm    Post subject: Automatic load balancing Reply with quote

Is it possible to load balance the stream with multiple servers, with listeners connecting to a central server then redirected to one of a number of relays? We have limited bandwidth, but several volunteers who are willing to relay the stream. Thanks in advance.
Back to top
Anonymous
Guest





PostPosted: Fri Aug 25, 2006 10:04 pm    Post subject: Reply with quote

bump
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Aug 29, 2006 7:54 pm    Post subject: Reply with quote

not in 2.3.1. I have a work in progress for load sharing in my branch work. The slaves authenticate with the master and register themselves as a relay that new listeners can be redirected to using http 302.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Tue Aug 29, 2006 8:08 pm    Post subject: Reply with quote

Where can I find your branch? Is it in the official SVN repository? Do you have any patches just for this feature? Thanks.
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Aug 29, 2006 10:05 pm    Post subject: Reply with quote

karl.mediacast1.com is the main place to get tarballs/exe files from. I sync up with svn frequently (svn.xiph.org/icecast/branches/kh/icecast)

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gee2803



Joined: 11 Aug 2006
Posts: 48

PostPosted: Sun Sep 03, 2006 3:06 pm    Post subject: question Reply with quote

Hello Karl.

Iīve downloaded your latest branch to test the load balancing feature,
but it didnīt work in my case probably caused of misconfiguration.

Which one do I need to install exactly?
The one I downloaded matched the actual Icecast 2.3.1 icecast config.
Can you give a small introduction on how to get load balancing running.

I want to use Icecast on 2 servers. The 1st server is limited to a specific number of listeners for each mountpoint. The 2nd server is unlimited for each mountpoint.

Is it possible to limit each mountpoint while do load balancing, too? E.g

Config:
Server 1 limited to 50. Server 2 unlimited.

50 listeners tune in:
Server1 25 listeners. Server 2 25 listeners.

200 listeners tune in:
Server1: 50 listeners. Server 2 150 listeners.

Thank you in advance!
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Sep 03, 2006 4:08 pm    Post subject: Reply with quote

The default 2.3.1 config won't cause any load balancing you will need some extra tags. The key thing is that the slaves need to authenticate with the master as being able to participate in listener redirection, so because of this both master and slave need to be the same code for it to work.

The sample icecast.xml lists the tags to use, but only a few extra ones are involved.

on the slave
<master-relay-auth>1</master-relay-auth>
this is so that a relay can auth using the relay user/pass, it also informs the master that there is a slave just in case you want on-demand relays.

On the master
<master-redirect>1</master-redirect>
enable the mechanism to work

<max-redirect-slaves>10</max-redirect-slaves>
A limit for the number of slaves that can be used for redirection.

The mechanism is fairly simplistic currently, there's no feedback for the slave listener counts so what happens is that the master fills up first then random selection of slaves occurs. My current thinking is that the stats mechanism could be used get those details to provide better hints for redirection instead of the max-listeners/random selection approach.

As I say this is a work in progress so feedback is welcome.

karl
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gee2803



Joined: 11 Aug 2006
Posts: 48

PostPosted: Sun Sep 03, 2006 6:29 pm    Post subject: Problems Reply with quote

We have some problems. I would like to show you my config files now.
Maybe you can help us out:

The servers:
home.radiostation.de is a local icecast on my computer
server2.radiostation.de is Master
server3.radiostation.de is Slave

Configuration of LOCAL ICECAST @ home (home.radiostation.de)

<icecast>
<limits>
<clients>10</clients>
<sources>2</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-on-connect>1</burst-on-connect>
<burst-size>65535</burst-size>
</limits>

<authentication>
<!-- Sources log in with username 'source' -->
<source-password>sourcepassword</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>relaypassword</relay-password>

<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>adminpassword</admin-password>
</authentication>

<hostname>localhost</hostname>

<listen-socket>
<port>14000</port>
</listen-socket>

<relays-on-demand>1</relays-on-demand>

<fileserve>1</fileserve>


Config of MASTER (server2.radiostation.de)

<icecast>
<limits>
<clients>10</clients>
<sources>5</sources>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-size>65535</burst-size>
</limits>

<authentication>
<!-- Sources log in with username 'source' -->
<source-password>sourcepassword</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>relaypassword</relay-password>

<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>adminpassword</admin-password>
</authentication>

<hostname>server2.radiostation.de</hostname>

<listen-socket>
<port>14000</port>
</listen-socket>

<master-server>home.radiostation.de</master-server>
<master-server-port>14000</master-server-port>
<master-update-interval>20</master-update-interval>
<master-username>relay</master-username>
<master-password>relaypassword</master-password>

<relays-on-demand>1</relays-on-demand>
<master-redirect>1</master-redirect>
<max-redirect-slaves>10</max-redirect-slaves>

<relay>
<server>home.radiostation.de</server>
<port>14000</port>
<mount>/192</mount>
<local-mount>/192</local-mount>
<on-demand>1</on-demand>
<username>relay</username>
<password>relaypassword</password>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>

<fileserve>1</fileserve>


Config of SLAVE (server3.radiostation.de)

<icecast>
<limits>
<clients>1000</clients>
<sources>5</sources>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-size>65535</burst-size>
</limits>

<authentication>
<!-- Sources log in with username 'source' -->
<source-password>sourcepassword</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>relaypassword</relay-password>

<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>adminpassword</admin-password>
</authentication>

<hostname>server3.radiostation.de</hostname>

<listen-socket>
<port>14000</port>
</listen-socket>
<master-server>server2.radiostation.de</master-server>
<master-server-port>14000</master-server-port>
<master-update-interval>20</master-update-interval>
<master-username>relay</master-username>
<master-password>relaypassword</master-password>

<master-relay-auth>1</master-relay-auth>

<relays-on-demand>1</relays-on-demand>

<!--- <master-redirect>1</master-redirect>-->
<!-- <max-redirect-slaves>10</max-redirect-slaves>-->

<relay>
<server>server2.radiostation.de</server>
<port>14000</port>
<mount>/192</mount>
<local-mount>/192</local-mount>
<on-demand>0</on-demand>
<username>relay</username>
<password>relaypassword</password>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>
<fileserve>1</fileserve>


What we found out:
If the clients are set to 10 (e.g.) the admin cannot connect to the Admin Page if too many clients are connected.

Thank you in advance.





[/code]
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Sep 03, 2006 8:01 pm    Post subject: Reply with quote

The clients setting is for specifying a limit for all connections made to icecast. This includes source, web and admin requests. Don't use the clients setting as the trigger for the redirect, use <max-listeners> in <mount> of /192 for that.

Your master config lists a master server (your local icecast), so you don't need to specify a <relay> from the same server.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Sun Sep 03, 2006 8:45 pm    Post subject: Reply with quote

is <fallback-mount> in master config the place for the mountpoint from the slave server ?

<fallback-when-full> falls back to this pointer.


thanks
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Sep 04, 2006 1:30 pm    Post subject: Reply with quote

The fallback-mount refers to a mountpoint on the same server. It's not possible to redirect/move/fallback listeners to another server after they start receiving stream data without them restarting a connection.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gee2803



Joined: 11 Aug 2006
Posts: 48

PostPosted: Thu Sep 14, 2006 6:28 pm    Post subject: Reply with quote

hello again. The load balancing didnīt work out well for us so far. But first of all we need to move our listeners from one server to another.

The problem is that the older server cannot handle so many listeners at the same time. So we need to move the listeners. Is this possible somehow?
Back to top
View user's profile Send private message
Anonymous
Guest





PostPosted: Sun Nov 05, 2006 2:08 pm    Post subject: Reply with quote

hello karlH is there a win32 version of your latest branch to test loadbalancing in win32 environement ?
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Nov 05, 2006 5:16 pm    Post subject: Reply with quote

yes, check in http://mediacast1.com/~karl

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Sun Feb 25, 2007 11:20 pm    Post subject: http://mediacast1.com/~karl not found Reply with quote

Hey karl,

I've tried to download the binaries from http://mediacast1.com/~karl, but your page seems to be off.

Is there any other page where I can download the binaries with the "Automatic Load Balance" feature?

Thanx in advance, cheers,

JonesBones.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber