Skip to main content
No Result Found
Connect and get help from 7,000+ developers on our Discord community. Ask the CommunityAsk the Community

Spike VUs

Model sudden traffic bursts to test how your system handles and recovers from spikes in BrowserStack Load Testing.

Use the Spike VUs load profile to model a sudden burst of traffic, hold it for a moment, and return to a steady baseline. This helps you check how your system handles events such as flash sales, breaking news alerts, or marketing pushes, and whether it recovers cleanly once the surge passes.

A spike follows a baseline, spike, and recovery pattern:

  • Baseline is the steady number of virtual users (VUs) that run before and after each spike.
  • Spike is the burst that ramps up to a peak VU count and ramps straight back down, with no hold in between.
  • Recovery is the gap between two spikes, during which the load returns to baseline so you can see whether your system clears its queues and frees up memory.

You can add up to 10 spikes in a single test to model repeated bursts.

The Spike VUs load profile is available only for protocol (API) load tests.

Depending on your preferred method, select any one of the following to configure spike virtual users:

Configure Spike VUs

Select Spike VUs from the dropdown menu, then set the baseline load, the total test duration, and one or more spikes.

Set the following:

  • Baseline VUs: The steady number of VUs that run before and after each spike. The default is 10.
  • Total Test Duration: How long the test runs at the baseline level, in minutes, seconds, or a combination of both. The default is 5m.

For each spike, set the following:

  • VUs: The peak number of VUs to reach during the spike. This must be higher than the baseline. The default is 100.
  • Duration: The length of the spike. BrowserStack splits this evenly, ramping up to the peak for the first half and ramping back down for the second half, with no hold in between. The default is 1m.
  • Recovery Time: The gap between two spikes, during which the load returns to the baseline. This field is optional. The default is 30s.

When you select Spike VUs, BrowserStack shows one spike at the midpoint of the total duration. To model repeated bursts, select Add Spike or Duplicate. You can add up to 10 spikes, and BrowserStack spaces them evenly around the midpoint. A preview chart and a short description update beside the fields as you adjust the values.

The Spike VUs load profile configured with a baseline, peak VUs, and recovery time, beside a preview chart showing the spike shape.

To keep results meaningful, add a recovery gap between consecutive spikes so your system has time to clear its queue, and keep each spike short. A short, sharp burst reflects a real spike more accurately than a long, gradual one.

Configure Spike VUs

Use the loadProfile config to model sudden traffic bursts. Define the baseline load and total duration, then list one or more spikes. Configure the following fields:

  • Set type to spike.
  • Set baseline-vus to the steady number of VUs that run before and after each spike.
  • Set total-duration to how long the test runs at the baseline level.
  • Under spikes, add one block per spike:
    • vus: The peak number of VUs to reach. This must be higher than the baseline and within your plan’s VU limit.
    • duration: The length of the spike. BrowserStack ramps up to the peak for the first half and ramps back down for the second half, with no hold in between.
    • recovery-duration: The gap between two spikes, during which the load returns to the baseline. This field is optional but recommended.

You can add up to 10 spikes in a single test.

Set duration values

Use the same format for total-duration, duration, and recovery-duration:

  • If less than 1 minute: use seconds (_s), for example, 45s.
  • If less than 1 hour: use minutes and seconds (_m_s), for example, 12m30s, 10m.
  • If 1 hour or more: use hours, minutes, and seconds (_h_m_s), for example, 1h5m20s, 1h17m, 1h.
browserstack-load.yml
loadProfile:
  type: spike
  baseline-vus: 10
  total-duration: 5m
  spikes:
  - vus: 50
    duration: 1m
    recovery-duration: 30s   # optional, but recommended between spikes
  - vus: 100
    duration: 1m
    recovery-duration: 30s   # optional, but recommended between spikes

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle