Stagger advisory scanning over time

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

There is an issue in resource consumption with the current advisory scanning being susceptible to a thundering herd problem. This is a result of there being no restriction on the number of scans that can occur after ingestion. Package Metadata ingestion immediately publishes a scan event after ingesting an advisory.

Proposal

Update advisory ingestion to stagger the scan events with a delay for each subsequent advisory. For example if 10 advisories are ingested and there is a scan delay of a minute, then the 1st advisory scan will be started immediately and the last one will be started 10 minutes later.

Implementation plan

Edited by 🤖 GitLab Bot 🤖