all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org, 47897@debbugs.gnu.org
Subject: Re: bug#47897: [PATCH] substitutes: Don't cache negative lookups or transient errors.
Date: Fri, 14 May 2021 08:31:09 +0100	[thread overview]
Message-ID: <874kf5epqa.fsf@cbaines.net> (raw)
In-Reply-To: <87tun9zabg.fsf_-_@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]


Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>>> Now, the penalty it imposes is annoying.  I’ve sometimes found myself
>>> 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’s do that.
>
>>>   2. Add an option to ‘guix publish’ (and to the Coordinator?) so they
>>>      send a ‘Cache-Control’ header with the chosen TTL on 404.  That
>>>      way, if the server operator doesn’t mind extra load, they can run
>>>      “guix publish --negative-ttl=0”.
>>
>> 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, ‘%narinfo-transient-error-ttl’ cannot be overridden.  We can
> halve it if you think that’s useful, thought when that happens, it means
> something’s wrong with the server (returning 500 or similar).
>
> I’ve sent patches to address this, lemme know what you think!

The patches you've sent look good.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

  reply	other threads:[~2021-05-14  7:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 22:27 Narinfo negative and transient error caching Christopher Baines
2021-04-19 20:55 ` Christopher Baines
2021-04-22 22:11 ` Ludovic Courtès
2021-04-22 23:14   ` Christopher Baines
2021-05-11 13:08     ` [bug#47897] [PATCH 1/2] publish: Add '--negative-ttl' Ludovic Courtès
2021-05-11 13:08       ` [bug#47897] [PATCH 2/2] substitutes: Reduce negative TTLs Ludovic Courtès
2021-05-11 13:09     ` bug#47897: [PATCH] substitutes: Don't cache negative lookups or transient errors Ludovic Courtès
2021-05-14  7:31       ` Christopher Baines [this message]
2021-05-16 21:31         ` Ludovic Courtès
2021-04-22 22:14 ` Narinfo negative and transient error caching Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kf5epqa.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=47897@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.