Subject: [hybi] WebSocket Connection Failure Rates By Platform and Localhost or Other Destination

From: Adam Rice <[email-masked]>
Date: Thu, 17 Aug 2017 17:17:00 +0900

I investigated the difference in success rates between WebSocket
connections on different platforms, as recorded by Chrome.

I was able to show that most of the low success rate on Mac OS X could be
explained by attempted connections to localhost.

There is still significant variation between platforms that is unexplained.

The document with the full results is at
https://docs.google.com/document/d/1S2y768C0hbI0etvSZWUoed5SUdXAewRw3UpAKnuz0BE/edit

Feedback and speculation as to the cause of the discrepancy is welcome. I'm
also interested if anyone has data from other sources they could share for
comparison.

---

From: Andy Green <[email-masked]>
Date: Thu, 17 Aug 2017 17:33:07 +0800

On 08/17/2017 04:17 PM, Adam Rice wrote:
> I was able to show that most of the low success rate on Mac OS X could 
> be explained by attempted connections to localhost.
> 
> Feedback and speculation as to the cause of the discrepancy is welcome. 
> I'm also interested if anyone has data from other sources they could 
> share for comparison.

How about [ad|u]block filters the attempted connection?

Linux users have a high probability to use some kind of adblocking.

Last time I looked chrome on Android wouldn't let me install such 
revenue-shrivelling addons.

-Andy

> 
> _______________________________________________
> hybi mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/hybi
>

---

From: Adam Rice <[email-masked]>
Date: Thu, 17 Aug 2017 19:20:14 +0900

Interesting idea, thank you.

WebSockets in Chrome only became directly blockable by extensions (ie. via
the webRequest API) in March.

Prior to that, they could only be blocked by injecting Javascript into the
page to replace the global WebSocket constructor, in which case our metrics
would never see the connection attempt (unless the ad blocker just rewrote
it to a different URL?).

I just checked, and the relative failure rates in February were very
similar to what they are today.

On 17 August 2017 at 18:33, Andy Green <[email-masked]> wrote:

>> I'm also interested if anyone has data from other sources they could share
>> for comparison.
>>
>

---

From: Adam Rice <[email-masked]>
Date: Thu, 17 Aug 2017 20:57:38 +0900

On 17 August 2017 at 19:48, Andy Green <[email-masked]> wrote:

> I don't know, but a quick google shows
>
> https://adblockplus.org/development-builds/new-filter-
> type-option-for-websockets
>
> "Starting with Adblock Plus 1.12.2 for Chrome, Opera and Safari we can
> block connections initiated via WebSockets on all major platforms (this
> functionality was available on Firefox since the very start). "
>

Really interesting, thanks.

> That's from 2016-09.
>
> It'd make sense if they were rewritten or resolved to 127.0.0.1, because
> that'd be the other side of the coin as to why stuff trying localhost is so
> likely to fail... it was sent there to fail.
>

Actually, success rates for Mac OS X went up from 2016-09-01 onwards. They
were at an extremely terrible 5% back then. So if Adblock Plus did
anything, it blocked a bunch of things that weren't working!

I just looked at what AdBlock does and it closes the connection if it fails
the check. I haven't looked at AdBlock Plus yet.