> Hmmm. Interesting. Didn't really consider that. 
> 
> How severe of a resource hit is it? Is CF working throughout 
> the streaming of the song? Or just the beginning? 
> 
> Regardless, while it may take up threads, how severe of a CPU 
> hit is it? It's not like CF is doing heavy computations. It's 
> just passing along a file with a particular header. 


It's not really taking any amount of CPU.  It's just that when your CF
Server runs out of worker threads, it stops dead.  The usual rule of
thumb is no more than 8 worker threads per processor.  So even if you've
got a dual P-III Zeon 900MHz monster of a server, when user number 17
makes his request, he'll sit queued up waiting until one of the 16
worker threads is freed up.  The CPUs would probably be idling at less
than 5% at that point, but CF wouldn't be able to do any more work.

Now...  That scenario only applies if you're feeding the actual MP3
stream itself through CF.  If you only feed the meta file, then you'd be
okay.  Winamp or whatever would just retrieve the meta file, disconnect
from your CF Server, and *then* start getting the MP3 streams.  Under
that scenario, assuming your MP3 streams were coming from outside the CF
Server somewhere, you could support thousands of users with no problems.
As soon as you start involving CF for the actual streams, then you're in
trouble.  Thus, using ShoutCAST for the MP3 streams would be a
GoodThing(tm)! ;-)

If the CF Server in question is owned & admin'd by you, you can
certainly up the number of worker threads beyond 8 per processor, but I
have no idea what kind of side effects you might see.  In any case, the
number of worker threads is the maximum number of users you could
support.  However...  Let's say you set the number of threads to 100.
If you've got 100 people listening to music, then nobody else could even
view your web pages (assuming you use CF for them) since all the threads
would be taken by MP3 streams.


If you absolutely need to do this over an HTTP interface, then ASP might
be a better option for you, tho you'd probably need Soft Artisans's
SAFileUp COM component to access the binary files from the server's hard
disk.  ASP, at least, doesn't have a hard thread limit -- the ASP engine
will spawn more threads as needed until all requests are handled *or*
until the server is overloaded.

In any case, neither ASP nor CF was intended to stream large files like
this, and I can't imagine you could get them to do it reliably on
anything but the smallest of scales.  ShoutCAST servers can be had for
nothing, and I thing they'd be a better solution.  Failing that, I
*think* Microsoft Media Services can be made to stream MP3's, so there's
another option.


I hope at least some of that is helpful.  Feel free to pick my brain
further.


Best regards,
Zac Bedell


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to