Slashdot Mirror


Low Cost Webcast Optimizations?

ChunKing asks: "I work for a small community broadcasting organization, and we operate a limited streaming media facility for a number of not-for-profit webcasters. It has always been an issue to optimize our streaming media infrastructure to most benefit our users. We operate a small cluster of servers from a data center with good connectivity and a highly-rated ISP, who will occasionally allow us to burst to unlimited bandwidth. For big webcasts, we will load balance the stream over a number of servers using round robin DNS. However, we still get problems with stream buffering and network drop-outs, particularly with streaming video. We cannot afford a network of edge delivery servers like Akamai, so in what ways can we further optimize our streaming media capacity to better produce smooth webcasts?"

17 of 108 comments (clear)

  1. Torrent by MyNymWasTaken · · Score: 3, Interesting

    (This probably won't be helpful to your present problem, unless something along this line of thought already exists.)

    I wonder how well a method such as bittorrent adapted to streaming data would do - i.e. decentralized streaming.

    The first few viewers receive the stream directly from the source, while acting as mirrors for subsequent viewers. It would dramatically cut down on the server load & overhead for the broadcasters.

    1. Re:Torrent by jimmyhat3939 · · Score: 3, Informative

      There was a system that came out to do this. There are numerous problems, including differential lag times between servers and firewalls. Most importantly, unlike torrents, you need to stream media in a linear fashion. The great thing about BitTorrent is you can get, say, piece 53 from one guy and piece 173 from another guy at the same time. Here, you'd have a mad rush for pieces 1 and 2 right from the outset. Also, I suspect it's much harder to get people to 'seed' stuff in the media world. I believe there's still some sort of system based on shoutcast that does this, though, if you want to look it up.

      --
      Free Conference Call -- No Spam, High Quality
  2. Unlimited Bandwidth by lax-goalie · · Score: 4, Informative

    "who will occasionally allow us to burst to unlimited bandwidth"

    Well, unless your provider has "unlimited bandwidth" themselves, you're basing your webcast on a lie. Pretty much no one has unlimited bandwidth; even a couple hundred broadband streams can saturate an OC-3 connection.

    What you need to do is plan your webcasts a little better and ask a bunch of questions: What's the real bandwidth your ISP can provide (with redundancy)? What's the buffer size that your client apps are using? (Settable in some clients, like Flash.) Does your ISP (who promised you unlimited bandwidth) even know what the hell they're doing?

    Without going to a dedicated CDN like Akamai, it's still pretty easy to design a distributed service network with colocated servers scattered across the country. You might want to consider finding someone who knows this kind of thing and paying them a few bucks to fix your problems...

    1. Re:Unlimited Bandwidth by Anonymous Coward · · Score: 4, Funny

      I actually do have unlimited bandwidth. That's because I'm connected to the Google DarkNet. Unfortunately, at present it's just me, a bunch of empty GoogleCubes and Marissa Mayer on here. So we just send porn back and forth really fast and gossip about who Larry's dating this week.

    2. Re:Unlimited Bandwidth by EggyToast · · Score: 3, Interesting
      Would it be possible to simply have their server limit the amount of connections to ensure that everyone who has a connection keeps a solid stream going? It seems like that would be a more immediate option that would allow them to scale up bandwidth according to their budget.

      After all, even if they scale up with colocation and distributing their webcast to other servers, if they can handle [x] users but only get [x/2], with a burst of x+2 once every 6 months, it seems like they should focus more on what they can do to reasonably control dropouts among users who are already connected, vs the rare scaleup to accomodate a large number of users for a short period of time.


      Of course, it might also prove out that by having more solid streams, they'll have more users, and will inherently get more users, which would lead to an escalation of costs. Might be screwed either way.

  3. streaming is so 1997 by sPaKr · · Score: 4, Informative

    Streaming? Are you for real, that is so 1997. Just more old media companies trying to push their way of doing things on the net. Give up on streaming. Produce several quailty versions of the same file support a few differnt codecs mp4, xvid, wmv... and setup torrents for each file. Then use your limited bandwidth to deliver the torrent files, run the tracker and with the remaining bandwidth seed the torrents with a good bittorrent client. Why suffer quailty and bandwidth requirements just so the show can be 'live'? I suspect you arn't even showing live events so why streaming? Stop thinking like a TV broadcaster and start thinking like an internet distributer.

    1. Re:streaming is so 1997 by dasnov · · Score: 5, Informative

      It all depends on who the target is. If this is targeted to the average person, I doubt they would know what a torrent is, or want to spend the extra 5 seconds to figure out how to download the file. Plus more and more people are behind firewalls and routers, and I don't think the average person would open (or know how to open) the correct ports to seed. So if this site is for the average computer illiterate person I doubt using a torrent as a solution would be much more benefitial.

      People like the simplicity of just clicking a link and the video poping up and streaming in media player, no download overhead eather.

    2. Re:streaming is so 1997 by aykroyd · · Score: 5, Informative

      A broadcast organization, like the poster is working for, is most likely in a live environment and can't just Bittorrent to success. There are Peer to Peer streaming tools out there including Abacast and Red Swoosh who I work with on a daily basis that provide sound results for their customers.

      Unfortunately, though, a CDN-style infrastructure is still the optimal way to go. There are generally resellers of the CDN technologies that can give you reduced rates on the same service. I know our particular model allows for easy scalability with tools that allow you to control your bandwidth usage. </pitch type="shameless">

  4. Do they *have* to stream? by OverlordQ · · Score: 3, Interesting

    Is it vitally important that they have to stream the data? You cannot just distribute downloads and Coral Cache em? Cut my bandwidth for files from 120GB/mo to ~15GB/mo

    --
    Your hair look like poop, Bob! - Wanker.
  5. bottleneck? by adrianmonk · · Score: 4, Informative

    You mention a lot of factors, but you haven't said what area you're having the most problem with. Have you at least managed to identify what the actual bottleneck is? It could be bandwidth at your servers, or between your ISP and some peer (through which most of your traffic is going), or it could be CPU load on your servers, or it could be disk I/O limits on your servers, or it could be lack of memory on your servers (causing them to thrash), or it could be uneven load balancing to DNS-based load balancing being somewhat random, or it could be that you've reached the maximum capacity (in terms of hosts per response record in DNS) with DNS load balancing and you need to add another layer of load balancing.

    The first step is going to be to check into all those areas and identify where the failure is currently happening. Once you know that, the solution will be more obvious. You might just need to add striping for your disks (to increase throughput by brute force) or RAM (to be able to cache all active streams) if the problem is that your disks can't keep up. But, if your ISP's connection to a major peer isn't sufficient, then you will need to do something much more involved (and will probably include gathering data during an actual event where the streaming can't keep up in order to prove that the ISP is the problem).

  6. Akamai and other Content Delivery Networks by dirtyhippie · · Score: 4, Informative

    Stay away from CDNs if you're looking for performance (if it's pricing you're after, that's a seperate issue) - they are likely dealing with all the same issues that you are. Except that when something goes wrong, there's nothing you can do except shrug and say "it's the CDN's fault". My organization went to a CDN to save on ridiculous colo bills, and we heard all the claims about performance with skepticism, but we were shocked to find that despite all the "second generation edge servers" our CDN has, thruput actually went DOWN significantly when we switched to them. We didn't much care since it was saving us a lot of money and was usually unnoticeable or at least bareable...

    But to return to your original question - since you're dealing with not-for-profits, clearly the answer is a live streaming P2P "edge network". Let me know when you release that code :)

    If you don't have the development resources for that, the best solution is probably to scale down your investment in your current colo and pop a few servers in a different geographic locale, a kind of DIY edge network. With 3 or 4 colos (say, Europe, US-East, US-West), and smart determination of which host to route to using Geo::IP or the like, you could probably save a lot of traffic and latency.

  7. Outsource it to Google video by iamelgringo000 · · Score: 5, Interesting

    Upload video to Google video or YouTube.

    Use their bandwidth to stream your video.

    Use their API to embed the video on your website.

    You lose control over the distribution of the content, but you save a lot of money in the process. The other option is Bit torrent.

    Also, have you looked into DigitalBicycle? They are working on a PeerCasting system for Using Bit Torrent, RSS, and web community software

  8. Ourmedia.org by digitalfilmmaker · · Score: 3, Informative

    http://ourmedia.org/ is setup for just such occassions. My video podcasts to a 100,000 people in the last month without complaint. CC friendly. And free.

  9. Investigate Ultravox by kriston · · Score: 4, Interesting

    This problem has been solved already. It's called Ultravox. It's a protocol that is format-agnostic and is used to efficiently multicast a broadcast within the data center up to the point it leaves your network. America Online and Cisco designed and implemented the protocol both in software and in the firmware of specialized Cisco routers and it is used for AOL Radio and for Winamp radio It's very interesting. All your viewers need is Winamp to hear or view your program.

    http://ultravox.aol.com/

    --

    Kriston

  10. Sounds like bandwidth by Malduin · · Score: 5, Informative

    It sounds like your problem is bandwidth. Either on the client-side, coming off your net to your ISP, or routing problems elsewhere on the Internet. The hard part is tracking down where the bottleneck is. Try to have multiple end-user test points. The company I work for has employees on a couple of different local ISPs and servers at various colo facilities. Try logging in to each machine and testing the stream. If it's across the board, you can safely bet it's your "unlimited" pipe to your ISP or a problem at your ISP. If it's a problem with a fraction of the clients, try doing traceroutes and see how the packets hop across the Internet and look for any similarities to see where the hang-ups can be. It's also possible that some clients just aren't getting the bandwidth they think they should be getting. Try everything you can to optimize your streaming application of choice. Reduce the number of FPS if you can. If it's only a talking head or something with little movement, try spacing out the keyframes more. Unless you're broadcasting a music video or movie, try using mono instead of stereo for audio. If it's a speech, you probably don't need CD-quality sound. Dropping the sound to 32, 24, or even 16kbps for a WMA/MP3/RA stream will still sound decent for something that doesn't have a lot of variation in sound.

    Also, if it is possible, try to expirament around with variable bit-rate streams for video and/or audio. That can come in handy if your target audience spreads from AOL dial-up in the middle of nowhere to your urban 8 Mbps+ broadband connections.

    In streaming, the big three big things that you have to worry about are the encoder's connectivity (to push the stream to the distribution point), the encoder's power (to make sure it can really compress all that video without overheating or dropping frames), and the distribution point's connectivity. Distribution servers don't use much bandwidth as all they do is simply regurgitate the data back out to clients without having to do any processing other than logging.

    I've been doing streaming for about 5-6 years now. I've done everything from web cam streaming to large convention streaming that put out 300+ Mbps of connectivity. By no means am I an expert (I've done streaming--it's not what I do), but everything above is my experience with it. Most of all, just stick with what you know and are comfortable with. Your client base will determine most things. Personally (even being a BSD guy), my preferred streaming setup is using Windows Media Encoder at the source, Windows Media Server 2003 at the distribution point, and Windows Media Player (or anything else that can play Windows Media v9) at the end-user. In my experience, it has been rock-solid and can be deployed quickly. If you're already running Windows 2000/XP/2003, all the software mentioned above is provided free-of-charge.

    Hope this helps.

  11. Start your own "Flickr of Video" by StreetFire.net · · Score: 3, Informative

    First, I can give you unlimited bandwidth on a Dial up line but you're not going to stream video over it, so any ISP that is giving you "unlimited" probably isn't set up to host your video. ;-)

    Second on YouTube and Google
    I agree there is something to be said for "out sourcing" your video to a company like Google Video or YouTube, but if you don't mind I would like to throw my little Start-Up (Vidiac.com) into the ring since we've been doing free video hosting longer than either of those two without all the Web 2.0 Hype. Of course the difference with us is we give you a video hosting portal you can run on your website (Like video.YOURDOMAIN.com), so with us you can start your own "Flickr of Video" either free (ad supported) or pay-per stream. Sorry about the self promotion there.

    Regarding your Dilemma
    Here is my input on the question at hand based on my own experience (I'm streaming just over a million streams a day to 2.5 Million Unique visitors a month). First, as always, start with the needs of the users.

    1.) Are they sophisticated? How would they react to a Torrent? From my experience, if someone has a torrent client installed then they're fine with it, but if they don't you have a large "fear factor" to overcome convincing a user to install a program to watch your video.

    2.) Do they want to click and Watch, (stream), or do they want to download? If you produce content like a video podcast, then I highly recommend giving your users a download option over streaming. If you run a portal-site, like Big-Boys.com that aggregates content then you're better off streaming as you want to be viewed as more than an FTP site.

    3.) How big is your Audience? This is probably the single biggest factor for capacity planning. If they all hit your site at once you need a ton of bandwidth.

    4.) Is this a scheduled broadcast (like a weekly show), or is this content that will be downloaded over time? Scheduled events can cause massive spikes. 10,000 users all at once is harder on a server than a Million users spread out over a month.

    5.) What video quality will your users tolerate? What Software can they use to view it? Windows Media? Quicktime? Flash? Size? Bit Rate? If your users are watching these videos on an iPod they'll accept a lower quality than if they're viewing it on their Plasma HDTV.

    Based on the above you can get a firm handle on your
    1.) Delivery Method (Direct Download, stream, Torrent)
    2.) Video Size (Format, Quality, etc)
    3.) Pipe Size (How much do you need to stream at once)
    3.) Bandwidth Utilization profile (spikes and valley vs. flat)

    Compare the above to your current solution. If your users are buffering, is it because...

    Your upload pipe is saturated? Upgrade to a larger pipe (100Mbps is about the minimum if you have more than 10 people hitting your video at the same time)

    Is your Disk I/O saturated? SATA and IDE are fine for most sites, but if you have 50 viewers requesting 30 different videos you need some strong I/O. we were burning through SATA drives on a weekly basis before switching to a SCSI SAN.

    Does your ISP have proper Network access to get to your end users? Consider pulling in a pipe from an appropriate network. (AT&T strongly peers with Cox cable for instance, MCI has fantastic AOL connectivity).

    Anyhow, I hate to answer a question with more questions, but there are so many ways to deliver video, there is no one silver bullet solution. You just have to do what works for your users and company. From experience though capacity planning for an online video application takes a lot of work, but once you wrap your head around the bandwidth issue, it gets easy. Good Luck!

    -Adam

  12. Look at what Pr0n is doing by xoip · · Score: 3, Interesting

    When ever you're in need of a streaming solution look and see what the Pr0n industry is up to. Awhile back Wired ran an article on an adult site who claim to offer P2P streaming Pr0n...great way to save on bandwidth if it works.