Load Testing Guidelines
Last updated December 03, 2024
Table of Contents
During the course of running production apps on the Heroku Platform, you likely run into the need to perform load tests. This document establishes some guidelines around what testing is permissible on Heroku.
For guidance on running a load test and interpreting results, see Application Load Testing.
Common Runtime Limits
There are varying limits depending upon the scale of load test you want to perform. This section outlines the limits that apply at various testing volumes.
Low-Medium Scale Tests
You can conduct low-medium scale tests without any need for approval from Heroku, as long as you limit them to 10,000 requests/second for any given app. This applies to all regions for the Common Runtime. You may run these tests at any point without notice, but limit this to one test at a time – do not run multiple 10,000 requests/second tests concurrently. You can perform tests at this scale on all dyno sizes.
- RPS Limit: < 10,000 reqs/sec
- Allowed Dyno Size: Any (Recommended: Performance-tier or higher)
- Approval Required: No
Large Scale Tests
You can conduct tests involving traffic volumes greater than 10,000 requests/second after getting approval from Heroku. Contact Heroku Support at least two business days before you perform the test.
We designed Heroku’s architecture to scale with organic traffic growth. In the case of benchmarks, especially those with heavy burst traffic, our systems can’t react fast enough to accommodate the sudden influx of traffic. Giving us notice allows us to pre-warm our systems and ensure that your benchmark provides accurate, reliable results.
Limit tests at this scale to Performance-tier dynos.
- RPS Limit: > 10,000 reqs/sec
- Allowed Dyno Sizes: Performance-tier only
- Approval Required: Yes
Possible Ramifications of Not Getting Approval
Without proper preparation, load tests over 10,000 requests/second most likely give inaccurate results. Also, in the worst case, we can misinterpret your load testing as an abusive app and inadvertently suspend your application while investigating.
Private Spaces Limits
You can conduct tests involving any traffic volume in Private Spaces, for both Heroku generations without any prior approval. They have completely isolated environments and routing, so there’s no potential impact on other customers when conducting load tests from here. The only limits you run into directly correlate to the available throughput of your environment. Note that every application in a space is behind an ELB. If you have an initial request rate greater than 150 requests/second, or double the existing requests/second within a 5-minute period, request an ELB pre-warm prior to your test by contacting Heroku support. Contact us with at least two business days’ notice for these types of requests.
- RPS Limit: None
- Allowed Dyno Sizes: Any
- Approval Required: No
You must run a minimum of three web dynos to do pre-warming.
Other Considerations
In addition to the scale of the test and getting approval where required, there are some other items that are worth considering before conducting a load test.
Datastore Connection Limits
Most datastores have connection limits that you can run into while scaling your application for a load test. Note what connection limits your datastores have and ensure you don’t surpass them when scaling up for your test. You can find a good discussion here. It’s specific to Ruby and ActiveRecord, but many of the concepts have parallels in other languages and ORMs.