Limitations: I just did this once as a snapshot. I wrote what I was doing as I did it. I've also not really stopped to explain much in detail, I've just got on with it. I'd like to see how this works at "peak" demand times for some of these services, to see if they offload to different CDN's or the like when under load. I'd also like to just repeat these tests, and tbh, to be more scientific in my analysis. This was just the kind of thing I could do in half an hour.
Feel free to post any questions in the thread, I'll do my best to answer everything.
I fired up twitch in Firefox, with Firebug + FirebugFlash installed, and tried to work out what was going on. I loaded up SlayersDragon's stream as it had a bunch of viewers when I was working on this.
A bunch of web assets came from www-cdn.jtvnw.net, but the web bits aren't what we are interested in, we want the video. Now the Flash debugger in Firebug found the advert nice and easy, the ad I got was :-
edgesuite.net is a domain owned by Akamai, the largest of the global internet CDN's. The content came from an Akamai cache on my ISP's network as well :-
$ host 18.104.22.168
22.214.171.124.in-addr.arpa domain name pointer host144-rangeA-akamai-aanp.cdn.enbgk.isp.sky.com.
Useful to know, but what we are really interested in is where the LIVE video is coming from. and the debugging data from firebug wasn't finding anything. This suggests that the content coming in isn't coming in via HTTP. To try and figure this out, I broke out wireshark. This revealed the video quickly enough, RTMP packets !. In my specific case, they were coming from 126.96.36.199. A quick use of whois shows :-
Not that much of a surprise really then, this content was coming directly from JustinTV kit.
VOD can be very different from live, so to check, I loaded up some old dreamhack footage, and sure enough, straight away we find a difference. While watching TLO beating Idra, I spotted the video was being delivered via HTTP, in this case from media10.justin.tv. Unsurprisingly, this is also a server owned by justin.tv.
So it looks like for both VOD and Live, Twitch are delivering content directly, with the ads coming from Akamai.
I had a look at a Reginald stream of some LOL, this with 3000 viewers. The advert I got when I joined the stream came from http://playtime.tubemogul.com/ad_promoted_videos/74446_6R63yitCs84xe4LgYZGw_1327619629.flv, and again I could just download this and play it offline. This name resolves through to :-
$ host playtime.tubemogul.com
playtime.tubemogul.com is an alias for wpc.1500.edgecastcdn.net.
wpc.1500.edgecastcdn.net is an alias for ne.edgecastcdn.net.
ne.edgecastcdn.net has address 188.8.131.52
and edgecastcdn is http://www.edgecast.com/, a minor CDN player when compared to "the big 3 general CDN's, Akamai, Level3 and Limelight".
Similarly to Twitch Live, the video itself didn't seem to be coming in over HTTP, and again a look at wireshark shows RTMP from 184.108.40.206, edgecast again !. Looks like own3d seem to have quite the relationship with Edgecast !.
I watched some fnatic VOD put up on own3d, and I found yet more edgecast !. The video was coming from :-
$ host vodcdn.ec.own3d.tv
vodcdn.ec.own3d.tv is an alias for wpc.2010.edgecastcdn.net.
wpc.2010.edgecastcdn.net is an alias for gs1.wpc.v1cdn.net.
gs1.wpc.v1cdn.net has address 220.127.116.11
Well, I can cheat here, I know a lot about how youtube deliver video. I watched a TotalHalibut video explaining why Dark Souls should be put on the PC. The video came from o-o.preferred.bskyb-bhx1.v15.lscache4.c.youtube.com, which is a Google on-net cache on my ISP's network.
The advert from blip came from http://j5.video2.blip.tv/13130010314406/Striderdoom-Day9Daily413P2FeastsStalkerGatewayPvTStyle699.m4v (interesting to see an old Day9 alias in thata URL), and I can just download that URL outside the browser and get some day9 content for offline playback. j5.video2.blip.tv is an alias for l.images.blip.tv.c.footprint.net, and footprint.net is one of the names for the Level3 CDN (as previously mentioned, one of the big players). It is interesting though that if you mess around with the URL, and instead use j5.video5.blip.tv, I got a server that was hosted directly by blip.tv (j5.video5.blip.tv has address 18.104.22.168, and in fact a quick "X=0; while [ 1 ]; do X=`expr $X + 1`; host j5.video$X.blip.tv; done" shows that this contiunes up to at least video100.
This is the kind of useful trick. If you were getting sent to the blip servers directly, but you had connectivity issues of some kind, you might be better off going to a CDN (particularly as people like me do things like putting those CDN's directly into your ISP's network, so in theory at least, you should have better connectivity to them, unaffected by issues on the wider internet like congestion at exchange points, or your ISP being a cheapskate about transit). Of course, you could just see congestion to the CDN node and actually want to do the reverse, you just never know .
I fixed a few people having problems with watching the DOTA2 launch event in Germany by similar tricks, moving people to non-congested CDN nodes by adding things to hosts files.
The video itself was coming via HTTP from v7.nonxt4.googlevideo.com (which didn't come from an on-ISP google cache, but instead came from a google server on the google network. As with other videos, I could grab a copy of the ad to play offline.
The video itself came from a straight up ip address, and for me that IP address was 22.214.171.124. Whois suggests this belongs to Gretech (network:Org-Name:Gretech Corporation), which makes sense. Interestingly though, these servers don't seem to be located in Korea like you might expect, instead they look like they are located in/around New York. Cogent, the ISP that are hosting these Gretech servers use a easy to follow set airport codes for equipment, and the final hop before the Gretech owned ranges for me was te4-1.ccr01.jfk03.atlas.cogentco.com.