New issue
Advanced search Search tips

Issue 917418 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocking:
issue 916718



Sign in to add a comment

Clean up TransportConnectJob's happy eyeballs implementation.

Project Member Reported by mmenke@chromium.org, Dec 21

Issue description

Happy eyeballs is a way to prefer IPv6 connections over IPv4 ones, and still work with IPv4.

The way our current implementation works:
* If the first IP address in our list is IPv4, or all the IP addresses are IPv4 or IPv6, just try all the addresses serially. Only try the next IP after connecting to the previous one returned an error.
* Otherwise, try to connect to them all in order, as above. But if connecting to them all (in order) takes more than 200 milliseconds, create a copy of the address list, with all the IPv4 addresses in font (But that still has the IPv6 addresses), and race trying them all in order against trying all entries in the old list in order.

That means when we use happy eyeballs, we potentially try and connect to all IP addresses twice, which seems inefficient.

There are other options here - make one sub-job only connect to IPv6, and the other only connect to IPv4, for instance, though that would have the disadvantage of potentially preferring low-priority IPv6 addresses later in the list over IPv4 addresses earleir in the list (That having been said, the current implementation does potentially prefer low-priority IPv4 addresses over earlier IPv6 addresses).  Another alternative would be to just make sure the IPv4 and "IPv6" tasks each skip addresses already looked up.

Anyhow, I think cleaning this up is fairly low priority.
 
Labels: -Type-Bug Type-Task
Blocking: 916718
Owner: mmenke@chromium.org
Status: Started (was: Untriaged)
Actually, I think I need to fix this before I can tackle issue 916718 - WebSockets and TransportConnectJob's implementations are too different to punt on this.
Status: Assigned (was: Started)

Sign in to add a comment