Re: Idempotency-Key for resuming requests (TUS Resumable Uploads Protocol)
Marius Kleidl <marius@transloadit.com> Fri, 07 October 2022 15:06 UTC
Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 39BC9C1524CE for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 7 Oct 2022 08:06:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.76
X-Spam-Level:
X-Spam-Status: No, score=-7.76 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=transloadit.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0EOEqCpy59HL for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 7 Oct 2022 08:06:06 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4E354C1524B5 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 7 Oct 2022 08:06:05 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ogosS-004VA6-7K for ietf-http-wg-dist@listhub.w3.org; Fri, 07 Oct 2022 15:03:04 +0000
Resent-Date: Fri, 07 Oct 2022 15:03:04 +0000
Resent-Message-Id: <E1ogosS-004VA6-7K@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <marius@transloadit.com>) id 1ogosR-004V8X-6m for ietf-http-wg@listhub.w3.org; Fri, 07 Oct 2022 15:03:03 +0000
Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]) by mimas.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from <marius@transloadit.com>) id 1ogosP-009IA9-JK for ietf-http-wg@w3.org; Fri, 07 Oct 2022 15:03:02 +0000
Received: by mail-qk1-x72d.google.com with SMTP id t7so3023489qkt.10 for <ietf-http-wg@w3.org>; Fri, 07 Oct 2022 08:03:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=transloadit.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=O4bVSGcCs9Qgav+xXtji54LOC3Gst7e8Yh8lf+/BrKE=; b=c0puEcJq3CCzH+CrFh4ntLPb3n5IR6vPr15XlbPMdRR901HDX1cHDaO2tXV7yGyISG dUU3zqg8vPaq8D7E3hua/CrPw/YqKmon8GBIunOR2w+fNnp+DzcHn6LMZsrBopzxUpyg L3XBohxTT7L5PpOBtx24vGPVI3HRuvlKgF78A=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=O4bVSGcCs9Qgav+xXtji54LOC3Gst7e8Yh8lf+/BrKE=; b=KkbA09pyO3PoAiTNbHjYuFZ5em2i/XUA+v/fqfzuQGjKGR7wla+tBmCaQgqAhiFslA 9dncHntStFoSPOJoRs+vHq6ZiOqpPIrcHeScuup3F5nvY+dfDXMCQgkCNJjqHmRssKFE dug8D1IqOcDjmC+/cX87btDlulQR7NfGBvbXiBvV6o4VFa9WGBtaRI6NyFKQWmXbkYoH i1VF7MFgPZA4vLvwdJmk2g6M19kGOXZXDPK8dlKKidrbze6ykoV1sYZQxLrSD0YYlkFL BgVMFIjchpc95TOR1m2bGSV/hYH6QlzAKb1uRkBkZAqBylDvzAt7ypNgQAMzAKtLaYGr sAvw==
X-Gm-Message-State: ACrzQf02dvjp/NnW4SM5qhtrUhH3iao/RDegoj8yb8ziCEPHhZviVoL9 LfKmvS2li8mU4CUihqBq1lLLoBe5hhQgQYTr/M/BhA==
X-Google-Smtp-Source: AMsMyM6EvJSUEmr8yBCWvpKK0Xq7qxnO3nbQQfBky0IRyAUTc7Xf85RMu4AUSrEIghpgPos3xHDa7ODKBDUQwZpc6aY=
X-Received: by 2002:ae9:f117:0:b0:6cf:3b2:5f6d with SMTP id k23-20020ae9f117000000b006cf03b25f6dmr4077841qkg.706.1665154969594; Fri, 07 Oct 2022 08:02:49 -0700 (PDT)
MIME-Version: 1.0
References: <9CB21DA8-9DBD-429B-930A-E67774652B06@bzfx.net>
In-Reply-To: <9CB21DA8-9DBD-429B-930A-E67774652B06@bzfx.net>
From: Marius Kleidl <marius@transloadit.com>
Date: Fri, 07 Oct 2022 17:02:36 +0200
Message-ID: <CANY19NsytBEjDWDv6bqSVB3cTMYEka9d5fp3DQ=6YuFqRGvhFw@mail.gmail.com>
To: Austin William Wright <aaa@bzfx.net>
Cc: ietf-http-wg <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="000000000000757de305ea731a7d"
Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=marius@transloadit.com; helo=mail-qk1-x72d.google.com
X-W3C-Hub-DKIM-Status: validation passed: (address=marius@transloadit.com domain=transloadit.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-4.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1ogosP-009IA9-JK f4e7ec9c04f05afd97704c0c9db40251
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Idempotency-Key for resuming requests (TUS Resumable Uploads Protocol)
Archived-At: <https://www.w3.org/mid/CANY19NsytBEjDWDv6bqSVB3cTMYEka9d5fp3DQ=6YuFqRGvhFw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40425
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>
Dear Austin, you brought up a good point by throwing Idempotency-Key into the recent Interim meeting. Idempotency and resumability are related but not the same, because when resuming an upload you want to start the data transfer at a different offset to avoid transmitting the same data again. I am missing this part from your proposal. How does the client obtain the information which data the server has already received and which part it must still transmit? Or did I just miss that piece? That being said, I think that an idempotency key could play an important role in resumable uploads, especially considering the creation of uploads resources. Best regards, Marius El jue., 6 oct. 2022 1:11, Austin William Wright <aaa@bzfx.net> escribió: > Hello HTTP WG, > > It occurred to me that, in general, where a client wants resumable > requests, it also wants those requests be idempotent. I noted the HTTP APIs > WG is considering an Idempotency-Key header, and it seems to me these > should be part of the same mechanism. Let me explain how that might work: > > If the client sends an Idempotency-Key, then the server can respond with a > 1xx (Resumption Supported) confirming that the key will be honored for > resuming the request. > > Clients that want resumption SHOULD send Idempotency-Key, but they don’t > have to (for example, to minimize UA fingerprinting). If the client does > not send Idempotency-Key, the server should still send 1xx (Resumption > Supported) to assign the request an Idempotency-Key. But it doesn’t have to > (for example, 1xx is filtered by gateways). > > Then when the request is interrupted, the client may resume the request > with the same URI and Idempotency-Key of the request being resumed. By > defining a RESUME method, a client could attempt to send a RESUME request > in the hopes the server supports resumption, even if it didn’t receive a > 1xx response. (Using the same URI allows the server to partition incomplete > requests/uploads by the resource URI. There should be little need to > re-send the method, since the server must store the details of the original > request anyways, but a header could be defined if such a need is found.) > > I see few downsides with this technique. There’s some builtin redundancy > so resumption will work even if one party is buggy, and if a new method is > used, there’s no possibility that a server could misinterpret the request. > Idempotency-Key would replace "Upload-Token” entirely. > > Thoughts? > > Thanks, > > Austin. >
- Idempotency-Key for resuming requests (TUS Resuma… Austin William Wright
- Re: Idempotency-Key for resuming requests (TUS Re… Marius Kleidl
- Re: Idempotency-Key for resuming requests (TUS Re… Austin William Wright