# Help understanding reachRps

**URL:** <https://community.gatling.io/t/help-understanding-reachrps/5740>\
**Category:** Gatling (Open-Source)\
**Created:** [July 30, 2020, 8:39am UTC](https://community.gatling.io/t/help-understanding-reachrps/5740 "2020-07-30T08:39:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Colin\_Bean](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@Colin\_Bean](https://community.gatling.io/u/Colin_Bean)\
**Post date:** [July 30, 2020, 8:39am UTC](https://community.gatling.io/t/help-understanding-reachrps/5740/1 "2020-07-30T08:39:35Z")

</div>

Hi, I need help in how to implement a throttle correclty. I’m trying to reach a flat ~4K RPM.

My simulation (v 3.3.1) is set up as

setUp(  
runOne.inject(  
constantConcurrentUsers(10000) during (55 minutes)  
)  
.throttle(  
reachRps(67) in (5 minute),  
holdFor(50 minutes)  
)  
).protocols(httpProtocol)  
.maxDuration(55 minutes)

and runOne includes 2 exec blocks

_val runOne = scenario(“1”).exec(request1, request2)_

However when I run this only the first request gets executed constantly without the second one being run straight after the first.

What request does the throttle work on?

---

<div class="post-metadata">

**Author:** ![sujin\_sam](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@sujin\_sam](https://community.gatling.io/u/sujin_sam)\
**Post date:** [July 30, 2020, 10:45am UTC](https://community.gatling.io/t/help-understanding-reachrps/5740/2 "2020-07-30T10:45:40Z")

</div>

Hello  
Throttling doesnt affect the requests, it just controls the RPS.  
regarding the request2 not executing, I tried with the similar way as you did, it works fine for me.

can you pls share the **val** of request1 and request2 ? so that it will be much easier to identify

Thanks  
Sujin Sam

---

<div class="post-metadata">

**Author:** ![Colin\_Bean](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@Colin\_Bean](https://community.gatling.io/u/Colin_Bean)\
**Post date:** [July 30, 2020, 11:03am UTC](https://community.gatling.io/t/help-understanding-reachrps/5740/3 "2020-07-30T11:03:56Z")

</div>

The RPS on what request though? All of them combined? Here are the extra details

val request1: ChainBuilder =  
exec(\_.set(“ob\_authorization”, obAuthorization))  
.exec(  
http(“OB buildSlip”)  
.post(backofficeHost + buildSlipUrl)  
.headers(buildSlipHeaders)  
.body(ElFileBody(“openbet/buildSlip.json”)).asJson  
.check(status.is(200))  
.check(jsonPath("$.betslipUid").saveAs(“betslipUid”))  
.check(jmesPath(legsJmesPath).saveAs(“legs”))  
.check(jmesPath(selectionsJmesPath).saveAs(“selections”))  
)  
.exec(  
session =\> {  
val selections = regex.replaceAllIn(session(“selections”).as[String], “$1”)  
session.set(“new\_selections”, selections)  
}  
).pause(1)

val request2: ChainBuilder =  
exec(_.set(“ob\_authorization”, obAuthorization))  
.exec(_.set(“betType”, “ACC5”))  
.exec(  
http(“OB PlaceBet”)  
.post(backofficeHost + placeBetUrl)  
.headers(buildSlipHeaders)  
.body(ElFileBody(“openbet/placeBet.json”)).asJson  
.check(status.is(200))  
.check(jsonPath("$.status").in(“confirmed”, “delay”))  
).pause(2)

---

<div class="post-metadata">

**Author:** ![sujin\_sam](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@sujin\_sam](https://community.gatling.io/u/sujin_sam)\
**Post date:** [July 30, 2020, 1:05pm UTC](https://community.gatling.io/t/help-understanding-reachrps/5740/4 "2020-07-30T13:05:43Z")

</div>

Throttle controls based on overall requests, not specific  
I couldnt find the issue on your code  
Hope someone else can help

Thanks  
Sujin Sam

---

<div class="post-metadata">

**Author:** ![Colin\_Bean](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@Colin\_Bean](https://community.gatling.io/u/Colin_Bean)\
**Post date:** [July 30, 2020, 3:26pm UTC](https://community.gatling.io/t/help-understanding-reachrps/5740/5 "2020-07-30T15:26:24Z")

</div>

Thanks for your help. I’ll continue to play around with this
