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 

redirect from master to slave

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
nesale



Joined: 17 Apr 2014
Posts: 19

PostPosted: Thu Apr 17, 2014 7:47 am    Post subject: redirect from master to slave Reply with quote

Hi, Karl!
so whether the system works master-slave, i.e. all listeners are directed to master, when exceeded sent to slave? see figure



master - Icecast 2.3.3-kh9
slave - Icecast 2.3.3-kh10

slave see mount master, but redirect from master to slave - transfer listeners is not

config master

Code:

<icecast>
    <location>EU</location>
    <limits>
        <clients>20000</clients>
        <sources>20</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>
        <source-password>masterpass</source-password>
        <relay-password>masterpass</relay-password>
        <admin-user>admin</admin-user>
        <admin-password>masterpass</admin-password>
    </authentication>

    <hostname>master.example.com</hostname>

    <listen-socket>
        <port>8052</port>
    </listen-socket>
   

    <master-redirect>1</master-redirect>

    <max-redirect-slaves>3500</max-redirect-slaves>

    <relay>
        <server>source.example.com</server>
        <port>8014</port>
        <mount>/source-mount</mount>
        <local-mount>/master-mount</local-mount>
        <on-demand>1</on-demand>
        <retry-delay>30</retry-delay>
        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
    </relay>
   
    <fileserve>1</fileserve>

    <paths>
        <basedir>/usr/local/share/icecast</basedir>
        <logdir>/home/master/log</logdir>
        <webroot>/home/master/web</webroot>
        <adminroot>/home/master/admin</adminroot>
        <alias source="/" dest="/index.html"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
    </logging>

    <security>
        <chroot>0</chroot>
            <changeowner>
            <user>master</user>
            <group>master</group>
        </changeowner>
        </security>
</icecast>


config slave

Code:

<icecast>
    <location>DE</location>
    <limits>
        <clients>20000</clients>
        <sources>20</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>
        <source-password>slavepass</source-password>
        <relay-password>slavepass</relay-password>
        <admin-user>admin</admin-user>
        <admin-password>slavepass</admin-password>
    </authentication>

    <hostname>slave.example.com</hostname>

    <listen-socket>
        <port>8052</port>
    </listen-socket>
   
    <master-server>master.example.com</master-server>
    <master-server-port>8052</master-server-port>
    <master-update-interval>10</master-update-interval>
    <master-username>relay</master-username>
    <master-password>masterpass</master-password>
   <master-redirect>1</master-redirect>

     <fileserve>1</fileserve>

    <paths>
        <basedir>/usr/local/share/icecast</basedir>
        <logdir>/home/slave/log</logdir>
        <webroot>/home/slave/web</webroot>
        <adminroot>/home/slave/admin</adminroot>
        <alias source="/" dest="/index.html"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
       <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
    </logging>

    <security>
        <chroot>0</chroot>
            <changeowner>
            <user>slave</user>
            <group>slave</group>
        </changeowner>
        </security>
</icecast>
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Apr 17, 2014 12:12 pm    Post subject: Reply with quote

try adding a limiter on the master mount such as max-listeners or max-bandwidth. There does not seem to be a trigger point as to when to accept new listeners and when to bounce them to the slave.

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



Joined: 17 Apr 2014
Posts: 19

PostPosted: Fri Nov 07, 2014 9:27 am    Post subject: Re: redirect from master to slave Reply with quote

Hello

Should work this scheme of the 3 servers?

Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Nov 07, 2014 11:06 pm    Post subject: Reply with quote

Generally, server 3 would use server 1 as a master but I suppose you can use a cascading master chain like this.


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



Joined: 17 Apr 2014
Posts: 19

PostPosted: Tue Nov 11, 2014 8:01 am    Post subject: Reply with quote

Hello, Karl

I have a few mount. Whether I specify in section <limits>, <max-bandwidth>990M</max-bandwidth>

Will work relay?

Code:

<icecast>
   <limits>
        <sources>20</sources>
        <queue-size>102400</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>15</header-timeout>
        <source-timeout>10</source-timeout>
        <burst-size>65535</burst-size>
<max-bandwidth>990M</max-bandwidth>
    </limits>
 
    <authentication>
        <source-password>passsource</source-password>
        <relay-password>passsource</relay-password>
        <admin-user>admin</admin-user>
        <admin-password>passsource</admin-password>
    </authentication>
 
    <hostname>master.example.org</hostname>
 
    <listen-socket>
        <port>80</port>
    </listen-socket>
 <relay>
        <server>relay.example.org</server>
        <port>8000</port>
        <mount>/mount1.mp3</mount>
        <local-mount>/mount1.mp3</local-mount>
</relay>
 <relay>
        <server>relay.example.org</server>
        <port>8000</port>
        <mount>/mount2.mp3</mount>
        <local-mount>/mount2.mp3</local-mount>
</relay>
 <relay>
        <server>relay.example.org</server>
        <port>8000</port>
        <mount>/mount3.mp3</mount>
        <local-mount>/mount3.mp3</local-mount>
</relay>



    <fileserve>1</fileserve>
    <paths>
        <basedir>/home/nashe1</basedir>
        <logdir>/home/nashe1/log</logdir>
        <webroot>/home/nashe1/web</webroot>
        <adminroot>/home/nashe1/admin</adminroot>
        <pidfile>/home/nashe1/run/server.pid</pidfile>
        <alias source="/" dest="/status.xsl"/>
    </paths>
 
    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
   <playlistlog>playlist.log</playlistlog>
         <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
      <logsize>100000</logsize>
      <logarchive>1</logarchive>
    </logging>
 
    <security>
        <chroot>0</chroot>
        <changeowner>
            <user>nashe1</user>
            <group>nashe1</group>
        </changeowner>
    </security>
</icecast>
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Nov 11, 2014 3:07 pm    Post subject: Reply with quote

max-bandwidth works in the limits or mount, and it's a limiter on outgoing bitrate. incoming feeds are not limited with this, whether relay or source client.

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



Joined: 17 Apr 2014
Posts: 19

PostPosted: Thu Nov 13, 2014 11:28 am    Post subject: Reply with quote

Karl, thanks

A few more question

1. <max-bandwidth>990M</max-bandwidth> - this record correct?
2. how icecast learn bandwidth my server? eth?
3. directive <bitrate> for @mount you need to specify?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Nov 13, 2014 9:00 pm    Post subject: Reply with quote

1. yes, M K are both acceptable modifiers

2. the outgoing bitrate is calculated based on how much is sent to each client. This applies to each mount and server wide. The stats show regular updates.

3. no, that is really just for YP information.


karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
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