# Distribute Requests Against Set Probabilities

**URL:** <https://community.gatling.io/t/distribute-requests-against-set-probabilities/3815>\
**Category:** Gatling (Open-Source)\
**Created:** [July 7, 2017, 10:43pm UTC](https://community.gatling.io/t/distribute-requests-against-set-probabilities/3815 "2017-07-07T22:43:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mh20](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mh20](https://community.gatling.io/u/mh20)\
**Post date:** [July 7, 2017, 10:43pm UTC](https://community.gatling.io/t/distribute-requests-against-set-probabilities/3815/1 "2017-07-07T22:43:38Z")

</div>

Hi!

I’m trying to make random requests to my API based on the relative throughput of each endpoint, as follows: if Endpoint A gets 40% of the total throughput, and Endpoint B gets 60% of the total throughput, I want my simulation to send requests to Endpoint A with probability 4/10 and Endpoint B with probability 6/10. I’m new to Gatling but have been through much of the documentation, both tutorials, and have built several simple simulations, but I’m wondering if this is a common usage for Gatling, and, if so, if there is an elegant way to implement it.

Any advice would be much appreciated.

Thanks!  
-Mitch

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [July 8, 2017, 6:49pm UTC](https://community.gatling.io/t/distribute-requests-against-set-probabilities/3815/2 "2017-07-08T18:49:32Z")

</div>

> but have been through much of the documentation

Still, you've missed randomSwitch 🙂

\*Stéphane Landelle\*  
\*GatlingCorp CEO\*  
slandelle@gatling.io
