NTH (Load-Balance) and YouTube issue

Hello there
I have 4 wan and use NTH to get the full speed of wan links and it working great
but in some websites like youtube the viduo stops it self and i have to refresh it every time (i guess cuz its HTTPS)
any help??
#######################################################################
/interface ethernet
set [ find default-name=ether1 ] name=WAN1
set [ find default-name=ether2 ] name=WAN2
set [ find default-name=ether3 ] name=WAN3
set [ find default-name=ether4 ] name=WAN4
set [ find default-name=ether10 ] name=LAN

/ip address
add address=192.168.1.2/24 interface=WAN1 network=192.168.1.0
add address=192.168.2.2/24 interface=WAN2 network=192.168.2.0
add address=192.168.3.2/24 interface=WAN3 network=192.168.3.0
add address=192.168.4.2/24 interface=WAN4 network=192.168.4.0
add address=10.0.0.1/16 interface=LAN network=10.0.0.0

/ip dhcp-server
add address-pool=dhcp_pool1 authoritative=after-2sec-delay disabled=no
interface=LAN name=dhcp1

/ip dhcp-server network
add address=10.0.0.0/16 dns-server=10.0.0.1 gateway=10.0.0.1

/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4

/ip firewall mangle
add action=mark-connection chain=prerouting connection-state=new
new-connection-mark=line1 nth=4,1 passthrough=yes src-address=10.0.0.0/16
add action=mark-connection chain=prerouting connection-state=new
new-connection-mark=line2 nth=4,2 passthrough=yes src-address=10.0.0.0/16
add action=mark-connection chain=prerouting connection-state=new
new-connection-mark=line3 nth=4,3 passthrough=yes src-address=10.0.0.0/16
add action=mark-connection chain=prerouting connection-state=new
new-connection-mark=line4 nth=4,4 passthrough=yes src-address=10.0.0.0/16
add action=mark-routing chain=prerouting connection-mark=line1
new-routing-mark=line1 passthrough=yes src-address=10.0.0.0/16
add action=mark-routing chain=prerouting connection-mark=line2
new-routing-mark=line2 passthrough=yes src-address=10.0.0.0/16
add action=mark-routing chain=prerouting connection-mark=line3
new-routing-mark=line3 passthrough=yes src-address=10.0.0.0/16
add action=mark-routing chain=prerouting connection-mark=line4
new-routing-mark=line4 passthrough=yes src-address=10.0.0.0/16

/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2
add action=masquerade chain=srcnat out-interface=WAN3
add action=masquerade chain=srcnat out-interface=WAN4

/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=line1
add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=line2
add check-gateway=ping distance=1 gateway=192.168.3.1 routing-mark=line3
add check-gateway=ping distance=1 gateway=192.168.4.1 routing-mark=line4
add check-gateway=ping distance=1 gateway=192.168.1.1
add check-gateway=ping distance=2 gateway=192.168.2.1
add check-gateway=ping distance=3 gateway=192.168.3.1
add check-gateway=ping distance=4 gateway=192.168.4.1
#######################################################################

The guess is wrong, the fact that it is a https session has nothing to do with that.

What I could imagine but you’d have to check that would be the following:

  • the browser downloads enough of the video to play for several minutes and closes the TCP session due to inactivity during that time
  • when the contents of the pre-loaded playback buffer becomes small enough to trigger download of another part, a new TCP session gets established, causing the Nth firewall rules to choose another uplink
  • youtube remembers some session identifier but as the follow-up session comes from another IP address, it considers it invalid and rejects it.

To confirm that, you would have to close all browser windows and tabs except the youtube one, sniff the traffic and check whether the first TCP session is really closed and a new one open while the video is being played. If it really happens, I can imagine no way to solve that except excluding the google sites from your Nth handling.