Re: [hybi] Additional WebSocket Close Error Codes

Alexey Melnikov <alexey.melnikov@isode.com> Tue, 29 May 2012 11:15 UTC

Return-Path: <alexey.melnikov@isode.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 93AA021F8634 for <hybi@ietfa.amsl.com>; Tue, 29 May 2012 04:15:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.494
X-Spam-Level:
X-Spam-Status: No, score=-102.494 tagged_above=-999 required=5 tests=[AWL=0.104, BAYES_00=-2.599, HTML_MESSAGE=0.001, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TntqBvryY92s for <hybi@ietfa.amsl.com>; Tue, 29 May 2012 04:15:34 -0700 (PDT)
Received: from rufus.isode.com (cl-125.lon-03.gb.sixxs.net [IPv6:2a00:14f0:e000:7c::2]) by ietfa.amsl.com (Postfix) with ESMTP id E079121F8630 for <hybi@ietf.org>; Tue, 29 May 2012 04:15:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1338290132; d=isode.com; s=selector; i=@isode.com; bh=vGspw2d57+pDh5m+NbO6AxaOd3cnPgJfLbHBXoJY8ZE=; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version: In-Reply-To:References:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description; b=aADB9xWYoHpx4tMg5os+KFd26PCxD340Gmfw5d9/geTDWT1JZou62w94x54475xpqAfulB A52/ElrbsP1V1vHSW4p+mnZ1z9/tmrWhQQVi2zPAbX30tSIJc35TOs3uJ6/eWp7EGJ5xx3 ZHV506FQSuhHh2JYFdVm9pfvJsV4j50=;
Received: from [192.168.1.144] ((unknown) [62.3.217.253]) by rufus.isode.com (submission channel) via TCP with ESMTPSA id <T8Sv0wAE4zfs@rufus.isode.com>; Tue, 29 May 2012 12:15:31 +0100
X-SMTP-Protocol-Errors: NORDNS PIPELINING
Message-ID: <4FC4AFD1.8080100@isode.com>
Date: Tue, 29 May 2012 12:15:29 +0100
From: Alexey Melnikov <alexey.melnikov@isode.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
To: Jason Duell <jduell.mcbugs@gmail.com>
References: <4FB3765D.5060308@isode.com> <001401cd340c$446034e0$cd209ea0$@noemax.com> <CAH_y2NEqgUKeu5VHYkm59vmybseq6gkMNQqCY0WcqM8BSYtSrQ@mail.gmail.com> <4FBE2F1E.1030307@isode.com> <4FC011B4.1080508@gmail.com>
In-Reply-To: <4FC011B4.1080508@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="------------030605080307010507010800"
Cc: hybi@ietf.org
Subject: Re: [hybi] Additional WebSocket Close Error Codes
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 29 May 2012 11:15:36 -0000

Hi Jason,

On 26/05/2012 00:11, Jason Duell wrote:
> On 05/24/2012 08:52 AM, Alexey Melnikov wrote:
>> On 21/05/2012 11:45, Greg Wilkins wrote:
>>>
>>> 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.
>>
>
> 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),

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"
>    1014     "Too many websockets open in client"
>
> assuming 1014 isn't taken yet--where's the list of proposed codes?
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.
> Thoughts?
>
> Jason Duell
> Mozilla
>
>
>>> On 17 May 2012 11:05, Arman Djusupov <arman@noemax.com 
>>> <mailto:arman@noemax.com>> wrote:
>>>
>>>     Yes. These status codes do make sense and it is preferable to
>>>     have them
>>>     standardized.
>>>
>>>     With best regards,
>>>     Arman
>>>
>>>     -----Original Message-----
>>>     From: hybi-bounces@ietf.org <mailto:hybi-bounces@ietf.org>
>>>     [mailto:hybi-bounces@ietf.org <mailto:hybi-bounces@ietf.org>] On
>>>     Behalf Of
>>>     Alexey Melnikov
>>>     Sent: Wednesday, May 16, 2012 12:42 PM
>>>     To: Hybi
>>>     Subject: [hybi] Additional WebSocket Close Error Codes
>>>
>>>     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
>>>
>>>     _______________________________________________
>>>     hybi mailing list
>>>     hybi@ietf.org <mailto:hybi@ietf.org>
>>>     https://www.ietf.org/mailman/listinfo/hybi
>>>
>>>     _______________________________________________
>>>     hybi mailing list
>>>     hybi@ietf.org <mailto:hybi@ietf.org>
>>>     https://www.ietf.org/mailman/listinfo/hybi
>>>
>>>
>>
>>
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>
>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi