--- Begin Message ---
Subject: |
[PATCH 0/4] Add keep-alive support to guix publish. |
Date: |
Fri, 21 May 2021 10:23:58 +0200 |
Hello,
The default Guile web server implementation supports the keep alive
mechanism. However, in our custom http-write implementation, the connection
is unconditionally close after sending NAR files.
When the publish server is sitting behind an Nginx server, like on the Berlin
build farm, Nginx is taking care of keeping the client connections
alive. However, the keep alive mechanism is not supported between Nginx and
guix publish.
Likewise, when running an independant publish server, the connection will be
closed by the publish server each time a NAR file is sent.
To prevent that, extend the keep alive mechanism support to the publish server
when sending NAR files and to the substitute script when receiving them.
Thanks,
Mathieu
Mathieu Othacehe (4):
scripts: publish: Add keep-alive support when sending NAR.
scripts: publish: Forward the request connection header.
progress: Add a download-size argument to progress-report-port.
scripts: substitute: Add keep-alive support when reading NAR.
guix/progress.scm | 16 +++-
guix/scripts/publish.scm | 171 +++++++++++++++++++++++++-----------
guix/scripts/substitute.scm | 7 +-
3 files changed, 139 insertions(+), 55 deletions(-)
--
2.31.1
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#48556: [PATCH 0/4] Add keep-alive support to guix publish. |
Date: |
Tue, 01 Jun 2021 09:14:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hey Ludo!
Thanks for having a look :).
> Also, this is specifically about keep-alive support for nar requests,
> right? My understanding is that other requests (narinfo in particular)
> already benefit from keep-alive support in (web server).
Yes that's right.
> Maybe it would be clearer if this were done at the call site, in
> ‘http-write’, where we can see the ‘close-port’ call a few lines below.
I took your remarks into account, merged two patches and reorganized
them a bit before pushing.
> Did you have a chance to try out the whole patch series “in production”?
> It would be nice to try it out so we can catch any issues we might have
> overlooked (random I/O errors, FD leaks, etc.)
I only tested it locally, but I'll monitor closely the impact of this
patchset on Berlin.
Thanks,
Mathieu
--- End Message ---