Skip to content

Commit

Permalink
feat: stagger startup of containers on Azure
Browse files Browse the repository at this point in the history
Seeing some cases where starting up large (80+ workers) load tests
on ACI seems to exceed some underlying Azure Blob Storage limits
with multiple containers all accessing the same blob container
concurrently.

With this change Artillery will pause for up to 10 seconds after
launching every batch of 10 workers.
  • Loading branch information
hassy committed Oct 17, 2024
1 parent 7336fdf commit fa43653
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 fa43653

Please sign in to comment.