[whatwg] WebSockets: what to do when there are too many open connections

Perry Smith pedzsan at gmail.com
Fri May 14 07:59:33 PDT 2010


On May 13, 2010, at 9:00 PM, Boris Zbarsky wrote:

> On 5/13/10 7:55 PM, Perry Smith wrote:
>> Its not that hard and it won't happen that often.  And it gives
>> the javascript authors more control and choices.
> 
> If a situation doesn't happen often, then historically speaking most authors will have no provisions to handle it.  Try browsing the web with non-default colors set in your browser, with a default font size that's not 16px, or with a 13px minimum font size set.  These aren't exactly hard things to deal with, but authors just don't deal with them.  I sincerely doubt they'd deal with the possibility of a websocket not actually opening unless is was _very_ common.
> 
> Maybe the spec should say that attempts to open a websocket should have a 50% chance of failing even if there's no good reason for it, just so it is in fact common for opening to fail?  ;)  (No, that's not a completely serious proposal, but it's not completely facetious either; it would take something like that for authors to handle failure properly.)

That wasn't what I meant.  "it won't happen often" I meant, the need to have a queueing mechanism written in Javascript.  i.e. most applications of web sockets would want to just fail.  The few that do not, can roll their own.




More information about the whatwg mailing list