# Long Polling in Gatling

**URL:** <https://community.gatling.io/t/long-polling-in-gatling/4587>\
**Category:** Gatling (Open-Source)\
**Created:** [October 22, 2018, 2:43am UTC](https://community.gatling.io/t/long-polling-in-gatling/4587 "2018-10-22T02:43:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navdit\_Sharma](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@Navdit\_Sharma](https://community.gatling.io/u/Navdit_Sharma)\
**Post date:** [October 22, 2018, 2:43am UTC](https://community.gatling.io/t/long-polling-in-gatling/4587/1 "2018-10-22T02:43:34Z")

</div>

Warning: Please bear with me and I am fairly new with Gatling. So, apologies in advance. 😛 🙂

I was going through the Loadrunner Asynchronous Calls Function - [wb\_reg\_async\_attributes](https://www.claudihome.com/html/LR/function_reference/Content/web/async/lrFr_web_reg_async_attributes.htm), and I found that there are four different [Asynchronous Conversation Patterns](https://www.claudihome.com/html/LR/function_reference/Content/web/async/lrFr_web_Asynchronous_Patterns.htm), which are:

1. Poll - The client polls the server periodically for information.

2. Long Poll - The client polls the server and waits for a response. When the response arrives, another poll request is initiated.

3. Push -The client sends a request. The server response is to send updates when there are changes to the requested information.

4. Cross-user - One user performs an activity that is reflected in another user’s client. For example, user1 sends an email and user2 receives notification.

Now, I have a requirement where I need to test Long-Polling using Gatling. As far as I know, there are two ways in Gatling:

1. [Poll](https://gatling.io/docs/2.2/http/polling/)
2. [SSE](https://gatling.io/docs/2.2/http/sse/)

Please feel free to let me know in case I am wrong. By using Polling function of Gatling, I am getting a Gateway Timeout Error.

My theory is:

Gatling sends the request → doesn’t get a response → Comes back with Gateway Timeout error.

Is there a way I can emulate Long Polling in Gatling? Please help me out in resolving this challenge.
