%% Last Updated: - [[2021-04-01]] %% With Gatling, network bandwidth can be simulated by throttling the number of requests per second. It’ll be a little more difficult to correlate requests per second to network bandwidth, but seeing historical data of real mobile users of your application should help here. Then you can multiply that by the number of users in your simulation and set up the throttling. ## `.throttle()` method > Throttling tries to ensure a targeted throughput with the given scenarios and their injection profiles (number of users and duration). It’s a bottleneck, ie an upper limit. If you don’t provide enough users, you won’t reach the throttle. If your injection lasts less than the throttle, your simulation will simply stop when all the users are done. If your injection lasts longer than the throttle, the simulation will stop at the end of the throttle. - [Gatling documentation](https://gatling.io/docs/current/general/simulation_setup/#throttling) The throttle is a the upper limit, an artificial bottleneck placed on a scenario to keep the rps fro ```scala setUp(scn.inject(constantUsersPerSec(100) during (30 minutes))).throttle( reachRps(100) in (10 seconds), holdFor(1 hour) ) ``` [Here’s Gatling’s documentation](https://gatling.io/docs/2.3/general/simulation_setup#simulation-setup-throttling) for more information on this.