On 2020-06-17, Jeremy O'Brien <[email protected]> wrote:
> On Wed, Jun 17, 2020, at 13:45, Janne Johansson wrote:
>>
>> Now if someone invents a decent piece of code to use http connection
>> pooling, quic/http3/rsync or whatever to speed up getting the required info,
>> I'm sure we mirror admins would be happy to add/edit our server programs to
>> serve it.
>>
>
> Welp, I got a nice taste of what taking advantage of http-keepalives can do,
> and it is indeed quite a bit faster. Here's all I did (a bit overkill, but a
> neat proof-of-concept):
>
> # pkg_add squid
> # rcctl start squid
> # export http_server=http://localhost:3128/
> # pkg_add -u
>
> squid by default uses keepalives on both the client and server connections.
> It seems that the server closes our connections several times during the
> transfers anyway (I assume either a max request limit or keepalive timeout),
> but it's much better than starting a new connection every time. I'd be really
> interested to see what something like quic can do.
>
Or a bit lighter than squid, you can do something like this in nginx as a
reverse-proxy:
upstream live_pkgcdn {
server cdn.openbsd.org:80;
keepalive 2;
}
server {
server_name xxx;
listen 80;
location ~ /pub/OpenBSD {
proxy_pass http://live_pkgcdn;
proxy_set_header Host "cdn.openbsd.org";
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}