Hi Lukas,
On Wed, Mar 22, 2017 at 08:40:53PM +0100, Lukas Tribus wrote:
> > It's not
> > a timeout but a grace time. We do already have "grace" in frontends for
> > a similar purpose. In fact in my opinion a timeout is very different in
> > that it's a maximum time waiting for an event to appear. Here we're not
> > waiting for an event, we offer a grace time after the event (the reload
> > signal). So in my opinion your choice of "grace" is perfectly suited here.
>
> I don't disagree with the use of the word grace in general (as opposed
> timeout), but isn't it misleading to have a global grace option (this one
> here, closing active, long-running sessions) and grace option in defaults/
> frontend/listen/backend [1], which does something different (keeping the
> listening socket open).
Well we already have this with maxconn (global vs frontend). I don't really
see it as a timeout because the purpose (for users) is to ensure the old
process will stay in place for some time before dying.
> This sounds highly confusing to me and could become a source of
> misunderstandings ("try setting grace to 5000", "ok, done", "which one?").
>
> nginx calls this (also brandnew) feature worker_shutdown_timeout [2].
Ah interesting :-)
> Maybe something like shutdown-maxgrace or shutdown-grace? I'm not sure,
> but I'd definitely avoid a name clash with the existing grace option,
> even if it's configured in a different section.
I'm not much worried for the clash but I think that something like
"shutdown-grace" or something like this is probably a good idea.
> I understand this is for both TCP and HTTP mode? Maybe we can mention
> this in the doc (" will remain alive *in both TCP and HTTP mode* when
> a soft-stop ").
Probably yes. That just makes me think that we could involve the word
"delay" or "after" in the option name to remove any possible ambiguity
with grace or timeout. For example I think that "hard-stop-after 60s"
makes it clear that it will terminate a soft-stop period. What do you
(and others) think ?
> Otherwise, thumbs up, this is very useful!
Yes I totally agree.
Thanks,
Willy