From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#26201: No notification of cache misses when downloading substitutes Date: Wed, 22 Mar 2017 23:06:11 +0100 Message-ID: <87fui50xws.fsf@gnu.org> References: <20170320184449.5ac06051@khaalida> <144e9ba8-af93-fb18-d2b9-f198ae7c11e9@tobias.gr> <20170320195247.05f72fc9@khaalida> <8e7e07d1-563f-666f-2c32-2a772757c86f@tobias.gr> <8760j2wpfy.fsf@gnu.org> <9889a4b5-c300-cd03-1095-1115428067fb@tobias.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqoPK-0006Je-Lv for bug-guix@gnu.org; Wed, 22 Mar 2017 18:07:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqoPG-0006I0-Js for bug-guix@gnu.org; Wed, 22 Mar 2017 18:07:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:41667) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cqoPG-0006Hw-GS for bug-guix@gnu.org; Wed, 22 Mar 2017 18:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cqoPG-0004vc-83 for bug-guix@gnu.org; Wed, 22 Mar 2017 18:07:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <9889a4b5-c300-cd03-1095-1115428067fb@tobias.gr> (Tobias Geerinckx-Rice's message of "Tue, 21 Mar 2017 18:08:02 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Tobias Geerinckx-Rice Cc: 26201@debbugs.gnu.org Hey Tobias, Tobias Geerinckx-Rice skribis: > On 21/03/17 17:43, Ludovic Court=C3=A8s wrote: >> I think there=E2=80=99s room for improvement in our nginx config at >> . >>=20 >> For instance, I just discovered =E2=80=98proxy_cache_lock=E2=80=99 while= looking at >> ; looks useful >> in reducing load on hydra.gnu.org. Surely there are other ways to tweak >> caching. > > Indeed! For reference, here's my cache configuration. > > That's right. Now you can all=C2=B9 steal some criminally overpriced Belg= ian > bandwidth! Heheh. :-) > limit_except GET { deny all; } > proxy_pass SUPER_SEKRIT_BACKEND; > > # https://www.nginx.com/blog/nginx-caching-guide > add_header X-Cache-Status $upstream_cache_status; > > proxy_cache default; > # We allow only GET requests, so don't waste key space: > proxy_cache_key "$request_uri"; > proxy_cache_lock on; > proxy_cache_lock_timeout 3h; #yolo > proxy_cache_use_stale error timeout > http_500 http_502 http_503 http_504; I didn=E2=80=99t fully understand the docs for the last 3 directives here. = For instance, what happens when 10 clients do GET /nar/xyz-texlive? Do the 9 unlucky clients wait for 3 hours and then get 404? Anyway, thanks for sharing your tips. :-) > Entirely off-topic, but this 'tude is a part of what drew me to Guix in > the first place. So, like, thanks, in general :-) :-) Ludo=E2=80=99.