From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4LjFBSaCmmB2gwAAgWs5BA (envelope-from ) for ; Tue, 11 May 2021 15:09:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id +G1XASaCmmCAIAAAB5/wlQ (envelope-from ) for ; Tue, 11 May 2021 13:09:58 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AE1789094 for ; Tue, 11 May 2021 15:09:57 +0200 (CEST) Received: from localhost ([::1]:59734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgS96-00051W-Si for larch@yhetil.org; Tue, 11 May 2021 09:09:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgS8i-0004qC-Qc for guix-devel@gnu.org; Tue, 11 May 2021 09:09:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48422) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgS8i-0006Zb-1z; Tue, 11 May 2021 09:09:32 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57488 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgS8a-0000pp-Rs; Tue, 11 May 2021 09:09:29 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: bug#47897: [PATCH] substitutes: Don't cache negative lookups or transient errors. References: <87mtvhnsn6.fsf@cbaines.net> <874kfyufzg.fsf@gnu.org> <87wnsthpyn.fsf@cbaines.net> Date: Tue, 11 May 2021 15:09:23 +0200 In-Reply-To: <87wnsthpyn.fsf@cbaines.net> (Christopher Baines's message of "Fri, 23 Apr 2021 00:14:24 +0100") Message-ID: <87tun9zabg.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org, 47897@debbugs.gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620738597; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=RUDx/cvyDGbdZR5wUEimH5+p5ehb7Vcy16QiXw9656E=; b=ioMltiWUmm66yZqUhypN8yFk6nBjrfSLgIJr0fDnSc/Mv7maizZXJRaUmQdQevVHOU5F1B SzMY4ZVkg0MlI5ALNxz8eQovBfbevoHQJYTJxWnrUkCsqJEy6WrKH7MBqlhn/ak6QaGUOk 0jBnVHIUR/T2i8JYzCk0ybo780zpmu9cTAOiplIvqNgR3yOHpc0g1uT/pvEYjwL8bv56eA yyq94iycyMcwEo5LRCjK6Ulj9+WK8EoPVyGheWTPRD/IBp8Vewc5sGXgzMSnm6tFX2JfOO jZaLa89nrQtmr9LNrRwom7RHHuyldO+8ey3wvxK2KKtcTo1dC2AsKEcwzZ/5Wg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620738597; a=rsa-sha256; cv=none; b=FW5OHAxhIAziK7901HwcboxOcDSa8pZCNM6Lx9y8zDSo5CIrchLhisLwCSQP0za4lj2Fii SYcdMXtfEl73KU7Pf2yBQAMoT0eIDpSaEprgQ0h68PSD2Yo0lkhoDYRM0OpZS2FhTXdVoo vHGPa7TJX6/nVbIpK4tlaIIkgFEXhhSmMdo2XykCFFT9Y0LbY8G5uj22h+I0tlzzhe/MXK me4sekeliIltDcuZd2T+SA61dYRCfWsD/LPXMeRr+XIFhzGeeiQ+kAStK9qaRQAfLkzjSn GcxIbt3hFY3U4PrRYhNqgSrFOBUptzdm2w5gydTzwX5nPNubMH15I0Eonnl1Pw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: AE1789094 X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: dfmfkKCVIrHD Hi, Christopher Baines skribis: >> Now, the penalty it imposes is annoying. I=E2=80=99ve sometimes found m= yself >> working around it, too (because I knew the server was going to have the >> store item sooner than 1h). >> >> Rather than removing it entirely, I can think of these options: >> >> 1. Reduce the default negative timeouts. > > I think reducing it is good, as you say, it's possible to override the > default from the server side. Just in case someone wants caching > behaviour, it might be worth keeping that functionality at least. OK, let=E2=80=99s do that. >> 2. Add an option to =E2=80=98guix publish=E2=80=99 (and to the Coordin= ator?) so they >> send a =E2=80=98Cache-Control=E2=80=99 header with the chosen TTL o= n 404. That >> way, if the server operator doesn=E2=80=99t mind extra load, they c= an run >> =E2=80=9Cguix publish --negative-ttl=3D0=E2=80=9D. > > That sounds sensible. The Guix Build Coordinator doesn't do any serving, > that's left to something else like nginx. For the deployments I maintain > though, I don't think I'm setting the relevant headers, but I'll look at > changing that. Cool. > Going back to the %narinfo-transient-error-ttl, if I'm correct in saying > that it's not possible to override that, maybe that should also use the > relevant header value if set? Correct, =E2=80=98%narinfo-transient-error-ttl=E2=80=99 cannot be overridde= n. We can halve it if you think that=E2=80=99s useful, thought when that happens, it = means something=E2=80=99s wrong with the server (returning 500 or similar). I=E2=80=99ve sent patches to address this, lemme know what you think! Thanks, Ludo=E2=80=99.