Thursday, June 19, 2008

Youtube and load balancing.

It seems that youtube doesn't like people who load balance. Simply put, the IP that loads the webpage and probably the flash element needs to be the same one getting the video stream from one of their MANY servers.

The way I solved it was to bind certain IP ranges to a single WAN connection.

208.65.152.0/255.255.252.0
74.125.15.0/255.255.252.0
208.117.225.0/255.240.0.0
64.15.114.0/255.240.0.0

This seems to have gotten most of them. I may be missing a few or assigned too large a subnet, but at least my videos usually don't say "We're sorry, this video is no longer available" anymore.

4 comments:

Tobias said...

This post helped a lot, thanks!

But your networks are a bit off, the correct network addresses would be:

208.65.152.0/255.255.252.0
74.125.12.0/255.255.252.0
208.112.0.0/255.240.0.0
64.0.0.0/255.240.0.0

LySiNe said...

I don't think that's quite right either.

Checking the who is shows that the youtube IP ranges only go to.

dns3.sjl.youtube.com 64.15.112.0/20
mia-ns1.mia.youtube.com 64.15.112.0/20
nyc-ns1.nyc.youtube.com 64.15.112.0/20
ash-ns1.ash.youtube.com 64.15.112.0/20
dns1.sjl.youtube.com 208.65.152.0/22
dns2.sjl.youtube.com 208.65.152.0/22
dal-ns1.dal.youtube.com 208.117.224.0/19
youtube.com 208.117.224.0/19

and 64.0.0.0/14 goes to XO Communications

LySiNe said...

had to add the entire google video block today

74.125.15.0/255.255.252.0 is now 74.125.0.0/255.255.0.0

bullfrogfrancis said...

This post helped a lot too, Thanks!

But im looking into Quality Of Service (QoS) for DD-WRT for the Netmask Priority.

208.65.152.0/22
74.125.0.0/16
208.0.0.0/8
64.0.0.0/14

set priority to Bulk, Then click save then hit apply

Happy days =)