Subject: [hybi] WebSocket & Nagle

From: "Greg Longtin" <[email-masked]>
Date: Fri, 18 Mar 2011 13:29:12 -0500

To all,

I have been working with WebSocket, based on it being a browser based socket
interface for intranet use.

I've created a Windows server, and have been testing with the MSFT 05 and 06
Silverlight prototypes and Pat McManus' WS 06 Minefield build (thank you.)

I believe all three implementations allow the use of the Nagle algorithm for
sending client packets.  On my system, this intermittently introduces a 200
mS delay, along with the combining of packets.  IMHO, for many applications,
that amount of delay isn't acceptable.

I'm not an Internet network type, so I'm not familiar with implications at
that level.

>From my perspective, it would be best if either Nagle was disabled for
WebSocket packets, or the browser script API would allow one to do so.  I
realize that option is outside of hybi spec.

Thanks,

Greg

---

From: Ian Fette (イアンフェッティ) <[email-masked]>
Date: Fri, 18 Mar 2011 11:55:04 -0700

in Chrome, we disable nagle fwiw.

-ian

On Fri, Mar 18, 2011 at 11:29 AM, Greg Longtin <[email-masked]> wrote:

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

---

From: Andy Green <[email-masked]>
Date: Fri, 18 Mar 2011 19:10:38 +0000

On 03/18/2011 06:29 PM, Somebody in the thread at some point said:

Hi -

> realize that option is outside of hybi spec.

libwebsockets also kills Nagling.  Nagle can lead to what is basically 
5Hz service which is "not the right thing".

-Andy

---

From: Gabriel Montenegro <[email-masked]>
Date: Fri, 18 Mar 2011 19:26:57 +0000

> 5Hz service which is "not the right thing".

As for the general issue, while it is true that the JS API applications might mostly benefit from turning off Nagle, the protocol goes beyond the JS API, e.g., with capabilities like binary and streaming. Given the generality of the protocol, I don't think the specification itself can mandate one way or another, similar to how TCP itself cannot mandate one way or another. But having a default, and a way to change it makes sense.

---

From: "Pat McManus @Mozilla" <[email-masked]>
Date: Fri, 18 Mar 2011 15:50:11 -0400

> Silverlight prototypes and Pat McManus' WS 06 Minefield build (thank you.)

its true the minefield build had nagle enabled because it only had the
websocket patch included.. but in our patch tracker the websockets patch
already depends on another one that disables nagle - so a real build
won't go out the door without it.

 though as gabriel notes there are certainly some applications (e.g. one
keystroke per msg) that should work the other way and I'd be happy with
an API to address it.

-- 
http://www.getfirefox.com/