Subject: [hybi] Additional WebSocket Close Error Codes

From: Alexey Melnikov <[email-masked]>
Date: Wed, 16 May 2012 10:41:49 +0100

Hi WG,
I am sorry I didn't followup on this when the following 2 codes were 
suggested (See 
<http://www.ietf.org/mail-archive/web/hybi/current/msg09284.html>):

1012/Service Restart
1012 indicates that the service is restarted. a client may reconnect, 
and if it choses to do, should reconnect using a randomized delay of 5 - 
30s.

Use case:
restart a service with 100k clients connected
clients present an informative user notification ("service restarting .. 
reconnecting in N secs)
clients should not reconnect all at exactly the same time .. thus the 
randomized delay

1013/Service Overload
1013 indicates that the service is experiencing overload. a client 
should only connect to a different IP (when there are multiple for the 
target) or reconnect to the same IP upon user action.

Use case:
clients present an informative user notification ("service overload .. 
try later or try different IP)

-----

Do people use these and is there still some interest in registering them?

Best Regards,
Alexey

---

From: "Arman Djusupov" <[email-masked]>
Date: Thu, 17 May 2012 12:05:48 +0300

Yes. These status codes do make sense and it is preferable to have them
standardized.

With best regards,
Arman

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of
Alexey Melnikov
Sent: Wednesday, May 16, 2012 12:42 PM
To: Hybi
Subject: [hybi] Additional WebSocket Close Error Codes

Hi WG,

1012/Service Restart

Use case:

1013/Service Overload

Use case:

-----

Best Regards,
Alexey

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

---

From: Greg Wilkins <[email-masked]>
Date: Mon, 21 May 2012 12:45:04 +0200

They both look reasonable.

---

From: Alexey Melnikov <[email-masked]>
Date: Thu, 24 May 2012 13:52:46 +0100

> They both look reasonable.

Ok, I will register these, but I will call the second one "Try Again 
Later" instead of "Service Overload". "Try Again Later" is used by other 
protocols and the meaning is more generic.

> On 17 May 2012 11:05, Arman Djusupov <[email-masked] 
> <mailto:[email-masked]>> wrote:
>
>     From: [email-masked] <mailto:[email-masked]>
>     [mailto:[email-masked] <mailto:[email-masked]>] On
>     Behalf Of
>     Alexey Melnikov
>     [email-masked] <mailto:[email-masked]>
>     [email-masked] <mailto:[email-masked]>

---

From: Jason Duell <[email-masked]>
Date: Fri, 25 May 2012 19:11:48 -0400

On 05/24/2012 08:52 AM, Alexey Melnikov wrote:
> Later" instead of "Service Overload". "Try Again Later" is used by 
> other protocols and the meaning is more generic.
>

I never got much of an answer about adding a new code for "client has 
too many websockets open", but let me ask it again.   We could 
conceivably have your proposed 1013 code  ("try again later") cover this 
case.   But one downside of this is that it doesn't distinguish between 
the case where the application could open a connection to another server 
(a particular server is overloaded), and the case where no websockets 
are going to work unless/until some existing ones go away (Client 
websocket limit reached).  So I suggest we want different codes for these.

This could look like

    1013    "Server busy"
    1014     "Too many websockets open in client"

assuming 1014 isn't taken yet--where's the list of proposed codes?

Thoughts?

Jason Duell
Mozilla

---

From: Salvatore Loreto <[email-masked]>
Date: Sun, 27 May 2012 12:34:20 +0300

Hi,

here you can find the list of registered codes
http://www.iana.org/assignments/websocket/websocket.xml

/Sal

On 5/26/12 2:11 AM, Jason Duell wrote:
> conceivably have your proposed 1013 code  ("try again later") cover 
> this case.   But one downside of this is that it doesn't distinguish 
> between the case where the application could open a connection to 
> another server (a particular server is overloaded), and the case where 
> no websockets are going to work unless/until some existing ones go 
> away (Client websocket limit reached).  So I suggest we want different 
> codes for these.
>
> This could look like
>
>    1013    "Server busy"

---

From: Alexey Melnikov <[email-masked]>
Date: Tue, 29 May 2012 12:15:29 +0100

Hi Jason,

On 26/05/2012 00:11, Jason Duell wrote:
> another server (a particular server is overloaded),

I think having a new code for "try another server" would be better, as 
it is more explicit that an immediate action can be attempted (where 
"server overload" or "try again later" imply that an action in a future 
can be attempted). Would such split work for you?

> and the case where no websockets are going to work unless/until some 
> existing ones go away (Client websocket limit reached).  So I suggest 
> we want different codes for these.
>
> This could look like
>
>    1013    "Server busy"
As Salvatore already pointed out, the list of currently allocated codes 
is here:
<http://www.iana.org/assignments/websocket/websocket.xml#close-code-number-rules>

This doesn't yet list a couple of extra code I approved recently, but 
the web page should be updated soon.