From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GCNJElCwQmD0QwAA0tVLHw (envelope-from ) for ; Fri, 05 Mar 2021 22:27:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id AHkADlCwQmDMBQAAB5/wlQ (envelope-from ) for ; Fri, 05 Mar 2021 22:27:28 +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 AF1CC23B20 for ; Fri, 5 Mar 2021 23:27:27 +0100 (CET) Received: from localhost ([::1]:32890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIIus-00088F-Rg for larch@yhetil.org; Fri, 05 Mar 2021 17:27:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIIuj-00087v-Gp for guix-devel@gnu.org; Fri, 05 Mar 2021 17:27:17 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:36923) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIIuh-0002Of-SV for guix-devel@gnu.org; Fri, 05 Mar 2021 17:27:17 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 1419F27BC50 for ; Fri, 5 Mar 2021 22:27:13 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 8971708b for ; Fri, 5 Mar 2021 22:27:12 +0000 (UTC) User-agent: mu4e 1.4.15; emacs 27.1 From: Christopher Baines To: guix-devel@gnu.org Subject: Narinfo negative and transient error caching Date: Fri, 05 Mar 2021 22:27:09 +0000 Message-ID: <87mtvhnsn6.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.46 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: AF1CC23B20 X-Spam-Score: -4.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: S+QIHV7IKnd1 --=-=-= Content-Type: text/plain Hey, This has been on my mind for a while, as I wonder what effect it has on users fetching substitues. The narinfo caching as I understand it works as follows: Default success TTL => 36 hours Negative TTL => 1 hour Transient error TTL => 10 minutes I'm ignoring the success TTL, I'm just interested in the negative and transient error values. Negative means that when a server says it doesn't have an output, that response will be cached for an hour. Transient errors are for other HTTP response codes, like 504. I had a look through the Git history, caching negative lookups has been a thing for a while. Caching transient errors was added, but I couldn't see why. Personally I don't see a reason to keep either behaviours? In an extreme case, the Guix Build Coordinator has to work hard to work around this caching. Asking the guix-daemon if a substitute exists is dangerous, as it literally costs an hour if that substitute isn't available yet, but will be shortly (which happens all the time when building a bunch of things). Currently it checks itself, and only continues to ask the guix-daemon to fetch the item if it knows it to exist. The transient error caching is also problematic, as that imposes a 10 minute penalty if there's a server issue. Any thoughts? Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmBCsD1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XftIw//Qon81HlxUGQyd/2oC0yxG1dccuq99m1A aBZyNbOmv5j/UpLTP2CVrW4m/1H4yDAEJgFLsxvpmXgps2ZYiZQaRV9SRltSD4iv 6c2qDE5AAnG21jDp3Zqio4ZFVcv6NsOZBWqsJz34co7nFIk4dkPzGePAFjNSOiTC v8shMvLvoWtPswDqmzXItN9ucaunHylPZf4PTWuTfMOG69nGtSNBbk8c6qTDwhLL EQ0FTVD2slP/orbhXFZgxfwpwvjnZ5Vo4M7aNLKpY6Nes9W0q3JVkoYytpEAQlZq 4PR0vH4339iM1SfgU5x/5EXMkLSDMSRFy/ZUZv2D7A6w3OufNxZbbViwrh/Pwk9f Lr9yryT5VGSB2qXxyomG3iO4OgZwIkDkUeL2gMQFQJo+yYo5b1r4I9FYPcvBVNTK cYKJKo9yn1gQjzkb1T1WLq0cDANKjAsxqfUWPHyKpBsXkHW4OFGfX+sclzKVT7dp XeilX2Pwvb28OwnKCJEfSDCiHqMBLnQh/C/YDL+vvZ7zhnSi7Qphlprn0e51MfCD xJ8w4KEBOSpKp4H+ride9i8S+rTy/lrjhDw56vP9bENlbTjqH6z2UJDP+0lcHWqv Zl67Q9nHB/dxymdLD4ULom42BRDUC8L3RKCkEKzpWSAYotLc8tGPorsPLNdWGuQG rQtr405rzAU= =n4qn -----END PGP SIGNATURE----- --=-=-=--