Matt Gray
2014-Oct-13 19:08 UTC
[Icecast] Running Icecast2 behind Amazon Elastic Load Balancer (ELB)
Hello, I'm writing to see if anyone here has had any success running Icecast2 (specifically I am using 2.4) on Amazon EC2 behind an Elastic Load Balancer? I have the ELB configured to do TCP loadbalancing rather than HTTP. I am able to connect and to stream music via the ELB, but when I disconnect, the listener count in Icecast does not decrease. On examining the state of the sockets table after disconnection I see that the socket from the ELB to Icecast is in the CLOSE_WAIT state *, and it remains in that state indefinitely. When I connect to the Icecast server directly, connections are established and closed as expected. I'm using Debian Wheezy in EC2. Any suggestions or workarounds? It is my understanding that Icecast should be closing the sockets in the CLOSE_WAIT state. Thanks, Matt * root at ip-10-0-0-60:~# netstat -atnp | grep 8000 tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 9615/icecast2 tcp 1000 0 10.0.0.60:8000 10.0.0.79:35915 ESTABLISHED 9615/icecast2 <-- This is my liquidsoap source server tcp 1 0 10.0.0.60:8000 10.0.0.69:14665 CLOSE_WAIT 9615/icecast2 <-- This is the listener connection via ELB that I believe should now be closed. ps: Apologies for the email disclaimer below, I can't remove it. -- This email, including attachments, is private and confidential. If you have received this email in error please notify the sender and delete it from your system. Emails are not secure and may contain viruses. No liability can be accepted for viruses that might be transferred by this email or any attachment. Any unauthorised copying of this message or unauthorised distribution and publication of the information contained herein are prohibited. 7digital Limited. Registered office: 69 Wilson Street, London EC2A 2BB. Registered in England and Wales. Registered No. 04843573. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20141013/894fb129/attachment.htm
"Thomas B. Rücker"
2014-Oct-14 12:41 UTC
[Icecast] Running Icecast2 behind Amazon Elastic Load Balancer (ELB)
Hi Matt, On 10/13/2014 07:08 PM, Matt Gray wrote:> Hello, > > I'm writing to see if anyone here has had any success running Icecast2 > (specifically I am using 2.4) on Amazon EC2 behind an Elastic Load > Balancer?Why do you think you need a load balancer in the first place? Icecast saturates the network before you notice any other significant resource usage. I'm happy to help you with your problem if there is a good reason, but would like to first make sure that this needs to be addressed. Cheers Thomas
Matt Gray
2014-Oct-14 12:56 UTC
[Icecast] Running Icecast2 behind Amazon Elastic Load Balancer (ELB)
Hi Thomas, We need a load balancer to allow for a single URL "entry point" to multiple Icecast servers - we intend to host multiple Icecast servers behind the load balancer so that we can expand / contract capacity as required - we would add servers into the load balancer pool. This also allows us to scale beyond the number of listeners a single Icecast server can support, while still maintaining the "illusion" of a single streaming server. It also provides redundancy / failover capability by allowing us to balance connections across Icecast servers in multiple AWS availability zones. I'm aware of some "playlist based" loadbalancing techniques using .m3u or HTTP redirects to the icecast servers, but this is not ideal for us, as a) we need to support some legacy players (eg. set top boxes) that don't support redirects or m3u's, and b) using ELB allows us to very easily provision backend health checks, multi availability zone redundancy, and auto scaling of Icecast servers. Hope that answers your question, Cheers, Matt On 14 October 2014 13:41, "Thomas B. R?cker" <thomas at ruecker.fi> wrote:> Hi Matt, > > On 10/13/2014 07:08 PM, Matt Gray wrote: > > Hello, > > > > I'm writing to see if anyone here has had any success running Icecast2 > > (specifically I am using 2.4) on Amazon EC2 behind an Elastic Load > > Balancer? > > Why do you think you need a load balancer in the first place? > > Icecast saturates the network before you notice any other significant > resource usage. > > I'm happy to help you with your problem if there is a good reason, but > would like to first make sure that this needs to be addressed. > > > Cheers > > Thomas > > _______________________________________________ > Icecast mailing list > Icecast at xiph.org > http://lists.xiph.org/mailman/listinfo/icecast >-- *Matt Gray* System Administrator *T:* +44(0)207 099 7777 *E:* matt.gray at 7digital.com *W:* www.7digital.com <http://www.google.com/url?q=http%3A%2F%2Fwww.7digital.com&sa=D&sntz=1&usg=AFrqEzeLlO75mVeA-8Yi-niLjEpFokXaYA> -- This email, including attachments, is private and confidential. If you have received this email in error please notify the sender and delete it from your system. Emails are not secure and may contain viruses. No liability can be accepted for viruses that might be transferred by this email or any attachment. Any unauthorised copying of this message or unauthorised distribution and publication of the information contained herein are prohibited. 7digital Limited. Registered office: 69 Wilson Street, London EC2A 2BB. Registered in England and Wales. Registered No. 04843573. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20141014/ae639d1a/attachment.htm