From f76e655ca84d9f001434b8ee96b4951df2cd5156 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 18 Feb 2020 13:17:00 +0000 Subject: [Minor] Maps: Jitter HTTP maps load to get better chances of SSL caching --- src/libserver/maps/map.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libserver/maps/map.c b/src/libserver/maps/map.c index a837b11ac..a832adc4f 100644 --- a/src/libserver/maps/map.c +++ b/src/libserver/maps/map.c @@ -1063,7 +1063,14 @@ rspamd_map_schedule_periodic (struct rspamd_map *map, int how) timeout = map->poll_timeout; if (how & RSPAMD_MAP_SCHEDULE_INIT) { - timeout = 0.0; + if (map->active_http) { + /* Spill maps load to get better chances to hit ssl cache */ + timeout = rspamd_time_jitter (0.0, 2.0); + } + else { + timeout = 0.0; + } + reason = "init scheduled check"; } else { -- cgit v1.2.3