G.I.S.S. Icecast

From Giss
Revision as of 12:48, 23 January 2022 by Sevy (talk | contribs) (Icecast 2.3.2-kh4-giss available from CVS)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Context And Goals

This task is intended to modify the Icecast to fit specific G.I.S.S. features.

The patches will be based on Icecast 2.3.2-kh4, a branched version by Karl Heyes from the official icecast.

We would like to add the following features :

  • intelligent load balancing in the master-slave redirection
  • encryption of Ips ( anonymizer )
  • improving stability

Intelligent load-balancing mechanism

The code has been modified to take into account the actual activity of each relay, but some servers don't provide the real outgoing bitrate but only the current number of listeners, so we suppose the actual bitrate = bandwidth - listeners * 64kb ( average weight for a stream ).

Based on this calculation, redirection is now made on the server which has the highest bandwidth available.

The bandwidth of relays is refreshed every minute, using the GISS server database, so you have to introduce this section in your configuration file ( icecast.xml ):

<giss>
       <gissdbhost>__host__</gissdbhost>
       <gissdbname>__dbname__</gissdbname>
       <gissdbuser>__user__</gissdbuser>
       <gissdbpasswd>__password__</gissdbpasswd>
</giss>

if everything runs well, you should see the following traces in the log file :

[2009-02-28 21:35:58] EROR slave/redirector_update update on labbs.net:8080 : bandwidth : 20480

[2009-02-28 21:36:05] EROR slave/redirector_update update on labbs.net:8080 : bandwidth : 20480

[2009-02-28 21:36:27] EROR slave/redirector_update update on cupola.psand.net:8000 : bandwidth : 20352

Encrypting Ip addresses

In order to anonymize the sources and the clients, the ip adresses have been encrypted using libgcrypt used in GPG, so it's pretty good encrypting.

In the admin pages you should see Ips display as :

IP : xe9xd3xe7x8ex4fxe9x1ex99x16x5fxeex39x7bxfbx18xdd

Source IPs should appear like this :

Encip.png

And Clients IPs should appear like this :

Encip2.png


Improving Stability

This task mainly consists in fixing some bugs leading to the unexpected crash of the main server. The icecast has been installed in debug mode producing core dumps on every crash. The version of the modified icecast is known as Icecast 2.3.2-kh4-giss

The following bugs has been fixed :

bug core.21596 : meta-data crash : file : admin.c
bug core.25207 : crash in ogg header analysis : file : format_ogg.c

These patches have been sent back to Karl Heyes and he accepted to integrate them in his next release : Icecast 2.3.2-kh5.

From his comment : "kh5 should deal with the 2 issues you've raised, along with a couple of others."

Since the fixes applied in the G.I.S.S. icecast, the system is running stable for more than a month without crashes with peaks of listeners up to 800 so we can affirm we reached the stability.

Icecast 2.3.2-kh4-giss available from CVS

Deprecated.

Servers recommendation ( Important Note )

The G.I.S.S. icecast is only fit to run on a master server and needs to be connected to a G.I.S.S. server database, so the slaves should run an icecast >= 2.3.2-kh5 from [http://www.icecast.pwp.blueyonder.co.uk/]