Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Youtube Problems with LoadBalancing on

    Scheduled Pinned Locked Moved Routing and Multi WAN
    17 Posts 6 Posters 13.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Valhalla1
      last edited by

      youtube has made some interface upgrades..  I still have problems with youtube and multiwan, now it comes back almost immediately with "We're sorry, this video is no longer available" whereas before it would just endlessly try to load. However if you refresh the page enough times, the request will go out the "correct" wan connection and the video loads fine.

      I haven't tried the instructions above, making aliases and such.. this of course won't help if they add new servers or change the IP's.   would be nice to have domain based routing somehow, make any traffic to *.youtube.com go out only one wan connection

      1 Reply Last reply Reply Quote 0
      • P
        Perry
        last edited by

        In 1.3 it should be possible to use domain names. But I'm not even sure it will be good enough because when i try http://youtube.com/watch?v=fawOrelje7k&feature=related it shows an ip wheres on http://youtube.com/watch?v=LVlbpJPocsI&feature=related it's a domain.

        If you almost never use the combine download speed of the loadbalancing pool you could split the load of your clients by source instead.
        Lan firewall rule:
        Source = 192.168.1.0/25 gateway WanFailsToWan2
        Source = 192.168.1.128/25 gateway Wan2FailsToWan

        /Perry
        doc.pfsense.org

        1 Reply Last reply Reply Quote 0
        • C
          cmb
          last edited by

          I don't think we'll be able to accommodate policy routing by hostname for something like youtube. The IPs its DNS returns change every time you query. That means you would have to do a DNS lookup for every packet, which isn't feasible (you don't want to introduce maybe 100 ms latency waiting for DNS replies to the forwarding of all traffic, and it isn't technically feasible with the underlying software).

          In combination with some squid improvements this might be possible, that's something I want to look into further.

          1 Reply Last reply Reply Quote 0
          • J
            jonnytabpni
            last edited by

            I don't think we'll be able to accommodate policy routing by hostname for something like youtube. The IPs its DNS returns change every time you query. That means you would have to do a DNS lookup for every packet, which isn't feasible (you don't want to introduce maybe 100 ms latency waiting for DNS replies to the forwarding of all traffic, and it isn't technically feasible with the underlying software).

            that's exactly what I was thinking.

            Why does youtube have a problem with 2 IPs requesting a single page???

            1 Reply Last reply Reply Quote 0
            • C
              cmb
              last edited by

              @jonnytabpni:

              that's exactly what I was thinking.

              Why does youtube have a problem with 2 IPs requesting a single page???

              There's the million dollar question.  :)

              The connection that pulls the video should be on only one WAN (it's one state), so apparently there is something in the session info with the remainder of the things on the page.

              You can lookup youtube's IP assignments on arin.net, they were listed by someone previously in this thread, then create an alias including those IP blocks and add a rule to the top that routes all that traffic out one specific WAN. Their IP blocks probably don't and won't change much.

              1 Reply Last reply Reply Quote 0
              • V
                Valhalla1
                last edited by

                @razor2000:

                @extremelymild:

                I tried to configure policy based routing for youtube, but the problem is, I cannot enter a domain in the destination field and I do not know all the Ips the youttube servers use (and I suppose they are changin from time to time). Any idea for me what to try next?

                I am not 100% sure of all the youtube ip ranges, but you could use the following I found for their three main subnet ranges:

                YouTube1 = 208.65.152.0/22
                YouTube2 = 64.15.112.0/20
                YouTube3 = 208.117.224.0/19

                Make an alias inside of pfsense, call it 'youtube' or whatever you'd like, and add those respective three ranges in there.  From there, edit one of your LAN rules to make sure it only goes out one of your WAN links.

                Give it a try and see if all the youtube sites and ip addresses have been covered (for now…)

                Good luck! :)

                I've set this alias up and set it to go down 1 WAN instead of LoadBalance, but I still have issues.. obviously missing some ip ranges or something.  =P  now my users are giving me crap about it too, was hoping they'd just assume it was youtube's fault for a while  ;)

                1 Reply Last reply Reply Quote 0
                • V
                  Valhalla1
                  last edited by

                  does Flash video get downloaded from port 80 http as normal websites are?  I thought I read somewhere like flash video server runs off a diff standard port, like maybe we could do a policy route for flash video on port 'x' to go over 1 wan

                  I think I've seen this issue with other flash video sites besides youtube

                  1 Reply Last reply Reply Quote 0
                  • P
                    Perry
                    last edited by

                    If you almost never use the combine download speed of the loadbalancing pool you could split the load of your clients by source instead.
                    Lan firewall rule:
                    Source = 192.168.1.0/25 gateway WanFailsToWan2
                    Source = 192.168.1.128/25 gateway Wan2FailsToWan

                    What was your thoughts on my solution?

                    /Perry
                    doc.pfsense.org

                    1 Reply Last reply Reply Quote 0
                    • V
                      Valhalla1
                      last edited by

                      @Perry:

                      If you almost never use the combine download speed of the loadbalancing pool you could split the load of your clients by source instead.
                      Lan firewall rule:
                      Source = 192.168.1.0/25 gateway WanFailsToWan2
                      Source = 192.168.1.128/25 gateway Wan2FailsToWan

                      What was your thoughts on my solution?

                      it is interesting, I would say I'm the only 'power user' who uses the combined speed at times, but the users know about the load balancing and often like to appease themselves by doing things like going to download bandwidth speed test sites and refreshing ip-checking sites to verify 2 ip's come up alternating, etc.. its stuff I showed them once when they claimed loadbalancing made their internet 'slower' than before when we were on 1 wan only, and now any time they think they see a slowdown they are always looking for evidence it almost seems to complain with
                      in other words they would probably bitch and moan if I didn't give every access to both wan's even if it fixed their youtube problem

                      1 Reply Last reply Reply Quote 0
                      • P
                        Perry
                        last edited by

                        Yet another poor admin being beating blue and yellow ;D

                        You could also add more ip's to the loadbalancing pool. like 8 for each line

                        /Perry
                        doc.pfsense.org

                        1 Reply Last reply Reply Quote 0
                        • V
                          Valhalla1
                          last edited by

                          well I submitted a bug request/complaint to youtube via their automated help form linking them to this thread and briefly describing the problem accessing youtube from behind a load balancing router. I doubt it will do anything, if I even get a reply I'm expecting something like "This is by design"

                          1 Reply Last reply Reply Quote 0
                          • V
                            Valhalla1
                            last edited by

                            Whats the easiest method to lookup all the potential IP's associated with a particular site ?    I am now getting Myspace, Facebook, Rapidshare etc. issues.    One particularly noisy user got segregated to Failover only instead of LoadBalance as Perry suggested above.. But I'd prefer having a few aliases like the youtube I have setup, so I can still use LoadBalance but seperate some websites off to only one wan

                            1 Reply Last reply Reply Quote 0
                            • P
                              Perry
                              last edited by

                              My guess
                              http://www.squish.net/dnscheck/

                              Now i also see that youtube uses googlevideo.com

                              /Perry
                              doc.pfsense.org

                              1 Reply Last reply Reply Quote 0
                              • V
                                Valhalla1
                                last edited by

                                Hi there,

                                Thanks for informing us of this issue. We're currently investigating the
                                situation and the issue should be resolved shortly. Thank you for your
                                patience and I apologize for any inconvenience.

                                Regards,

                                Mydhili
                                The YouTube Team

                                +1 for Google if they fix this one.  Although -1 for me and my employees in lost productivity time spent watching youtubes  :D

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.