[peerdist] Limit number of concurrent raw block downloads
authorMichael Brown <mcb30@ipxe.org>
Fri, 16 Aug 2019 20:42:49 +0000 (21:42 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 16 Aug 2019 21:19:50 +0000 (22:19 +0100)
commitd8a1958ba5e83fcd0eabbf2c4f95231b02af33d7
tree6eefeb77623e6e9d5286607a5b3160f648a90c43
parent02b26de9634dcf793f4edef0b33ea71e34fceee6
[peerdist] Limit number of concurrent raw block downloads

Raw block downloads are expensive if the origin server uses HTTPS,
since each concurrent download will require local TLS resources
(including potentially large received encrypted data buffers).

Raw block downloads may also be prohibitively slow to initiate when
the origin server is using HTTPS and client certificates.  Origin
servers for PeerDist downloads are likely to be running IIS, which has
a bug that breaks session resumption and requires each connection to
go through the full client certificate verification.

Limit the total number of concurrent raw block downloads to ameliorate
these problems.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/peerblk.h
src/net/peerblk.c