# Non blocking requests

**URL:** <https://community.gatling.io/t/non-blocking-requests/2326>\
**Category:** Gatling (Open-Source)\
**Created:** [May 29, 2015, 9:45am UTC](https://community.gatling.io/t/non-blocking-requests/2326 "2015-05-29T09:45:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Janek\_Lasocki-Biczys](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@Janek\_Lasocki-Biczys](https://community.gatling.io/u/Janek_Lasocki-Biczys)\
**Post date:** [May 29, 2015, 9:45am UTC](https://community.gatling.io/t/non-blocking-requests/2326/1 "2015-05-29T09:45:34Z")

</div>

Hi folks,

First off, Gatling is a great tool - I’m really enjoying using it - thank you Gatling Team!

I was wondering if there’s a way to configure my scenario to fire off (some) http requests in a non blocking fashion. Meaning that if the following scenario is run:

`var scn = scenario("Test Blocking") .exec(http("1").get("/?b=1")) .execNonBlocking(http("2").get("/?b=1").check(jsonPath("$..message").exists)) .exec(http("3").get("/?b=2")) .exec(http("4").get("/?b=1")) .execNonBlocking(http("5").get("/?b=3")) .exec(http("6").get("/?b=4")) .exec(http("7").get("/?b=1")) .exec(http("8").get("/?b=5"))`

(using this imagined DSL “execNonBlocking” addition) when request “2” gets sent, request “3” gets sent immediately after, without waiting for a response from “2”, but “2” still gets a check (jsonPath) eventually.  
Is anything like this possible?

Thanks!

---

<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:** [May 29, 2015, 11:16am UTC](https://community.gatling.io/t/non-blocking-requests/2326/2 "2015-05-29T11:16:36Z")

</div>

Thanks for your kind words.

The thing was asynchronous flow, be it resources, websockets, sse and polling, is that they live in different state spaces, and you need to reconciliate state at some point, ie you have to define your “eventually”. And more than that, you probably want to be notified of when “eventually” happen.

So no, it’s not currently possible.

This is more of an API design issue. Ideas welcome.

---

<div class="post-metadata">

**Author:** ![Janek\_Lasocki-Biczys](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@Janek\_Lasocki-Biczys](https://community.gatling.io/u/Janek_Lasocki-Biczys)\
**Post date:** [May 29, 2015, 1:06pm UTC](https://community.gatling.io/t/non-blocking-requests/2326/3 "2015-05-29T13:06:58Z")

</div>

Thanks for the reply - I see what you mean by the “eventually” and how it becomes a non trivial problem.
