Skip to content

Commit

Permalink
feat: stagger startup of containers on Azure (#3371)
Browse files Browse the repository at this point in the history
  • Loading branch information
hassy authored Oct 17, 2024
1 parent 7336fdf commit 40e0ffb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/artillery/lib/platform/az/aci.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,15 @@ class PlatformAzureACI {
const { workerId } = await this.createWorker();
this.workers[workerId] = { workerId };
await this.runWorker(workerId);

if (i > 0 && i % 10 === 0) {
const delayMs =
Math.floor(
Math.random() *
parseInt(process.env.AZURE_LAUNCH_STAGGER_SEC || '10', 10)
) * 1000;
await sleep(delayMs);
}
}

let instancesCreated = false;
Expand Down

0 comments on commit 40e0ffb

Please sign in to comment.