From 0be00336f97a7ef3590ee803d4ad19e305aa1583 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 13 Apr 2021 16:41:26 +0200 Subject: [SERVER] Make prefetching synchronous There is a race condition where we process the next request from the same client faster than the OS will schedule the async prefetch job, rendering it a NOOP in the best case (request ranges match) or fetching redundant data from the upstream server (prefetch range is larger than actual request by client). Make prefetching synchronous to prevent this race condition. --- pkg/config/server.conf | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg') diff --git a/pkg/config/server.conf b/pkg/config/server.conf index 5f0b2a0..95a71db 100644 --- a/pkg/config/server.conf +++ b/pkg/config/server.conf @@ -48,6 +48,8 @@ maxClients=2000 maxImages=1000 maxPayload=9M maxReplicationSize=150G +; Maximum number of bytes to prefetch when relaying client request to upstream server +maxPrefetch=256k ; Log related config [logging] -- cgit v1.2.3-55-g7522