Re: [core] Stateless proxy and 5.04 (Gateway Timeout)

Christian Amsüss <christian@amsuess.com> Sun, 03 November 2019 14:47 UTC

Return-Path: <christian@amsuess.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 257F012010F for <core@ietfa.amsl.com>; Sun, 3 Nov 2019 06:47:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SoFxm-rijCeU for <core@ietfa.amsl.com>; Sun, 3 Nov 2019 06:47:05 -0800 (PST)
Received: from prometheus.amsuess.com (prometheus.amsuess.com [5.9.147.112]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0E3A41200F5 for <core@ietf.org>; Sun, 3 Nov 2019 06:47:04 -0800 (PST)
Received: from poseidon-mailhub.amsuess.com (095129206250.cust.akis.net [95.129.206.250]) by prometheus.amsuess.com (Postfix) with ESMTPS id 1386546D7F; Sun, 3 Nov 2019 15:47:03 +0100 (CET)
Received: from poseidon-mailbox.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bf]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id 8F82B36; Sun, 3 Nov 2019 15:47:01 +0100 (CET)
Received: from hephaistos.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:6d78:bd47:b07:7e5c]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id 1B1F57A; Sun, 3 Nov 2019 15:46:58 +0100 (CET)
Received: (nullmailer pid 29181 invoked by uid 1000); Sun, 03 Nov 2019 14:46:53 -0000
Date: Sun, 03 Nov 2019 15:46:53 +0100
From: Christian Amsüss <christian@amsuess.com>
To: Christer Holmberg <christer.holmberg=40ericsson.com@dmarc.ietf.org>
Cc: "core@ietf.org" <core@ietf.org>
Message-ID: <20191103144653.GB11679@hephaistos.amsuess.com>
References: <998D003E-7C31-44A7-8FFE-C4E88F678CA3@ericsson.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="1UWUbFP1cBYEclgG"
Content-Disposition: inline
In-Reply-To: <998D003E-7C31-44A7-8FFE-C4E88F678CA3@ericsson.com>
User-Agent: Mutt/1.12.2 (2019-09-21)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/ySZFMQ-IRzyNg-HMFoUHSBTRa18>
Subject: Re: [core] Stateless proxy and 5.04 (Gateway Timeout)
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 03 Nov 2019 14:47:07 -0000

Hello Christer,

On Sun, Nov 03, 2019 at 08:32:55AM +0000, Christer Holmberg wrote:
> Q1: If the intermediary does *not* receive a response to the request
> sent towards the origin server, how can it send the 5.04 (Gateway
> Timeout) response?
>
> Q2: If the intermediary does not maintain request state, how can it
> even associate a request a timeout timer (that would trigger the 5.04
> response) with the request sent towards the origin server?

I would not expect a stateless proxy to generate 5.04 errors after a
timeout after sending a request.

What the stateless proxy does need to do is to keep some state about the
server it is talking to (in order to satisfy flow control requirements).
If that state indicates unavailability of the server, it could return
some 5.xx error (possibly even 5.04, don't know their precise
definitions off my head) immediately to a new incoming request for that
server.

Best regards
Christian

-- 
This may seem a bit weird, but that's okay, because it is weird.
  -- perldata(1) about perl variables