# Receive concurrent http requests

**URL:** <https://discourse.nodered.org/t/receive-concurrent-http-requests/50555>\
**Category:** General\
**Created:** [2 September 2021 21:36 UTC](https://discourse.nodered.org/t/receive-concurrent-http-requests/50555 "2021-09-02T21:36:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmesino](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@rmesino](https://discourse.nodered.org/u/rmesino)\
**Post date:** [2 September 2021 21:36 UTC](https://discourse.nodered.org/t/receive-concurrent-http-requests/50555/1 "2021-09-02T21:36:04Z")

</div>

Hi,  
I'm trying to implement a microservices integrations with node-red, i have some custom nodes that makes http request to a microservices and functions nodes for message transformations and some subflows.

I builded a flow with all microservices integrated and i expose a URL for requests to flow using the http in node and http out for responses.

When i send two or more concurrent requests my flow sends the same response to all calls with the same message, like my flow only can process one request at time and doesn't log a different answer for each one, idk if i'm doing something wrong...

Node-Red supports process concurrent flows that come from "http in" node ?

---

<div class="post-metadata">

**Author:** ![rmesino](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@rmesino](https://discourse.nodered.org/u/rmesino)\
**Post date:** [3 September 2021 12:20 UTC](https://discourse.nodered.org/t/receive-concurrent-http-requests/50555/2 "2021-09-03T12:20:20Z")

</div>

Sorry, it was my mistake. I was using flow.get / flow.set in a bad way, I understood when I read the documentation that the information that is saved using flow.set / get lives in a "flow context" like a runtime context while the flow is running , but I was wrong, I reread it and realized my mistake.

When i sent concurrent requests, some executions were reading old values from vars stored in flow.get, so, now i'm using msg for save temporary variables in runtime context.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 September 2021 12:45 UTC](https://discourse.nodered.org/t/receive-concurrent-http-requests/50555/3 "2021-09-03T12:45:50Z")

</div>

It is a common pitfall for new users. Try to avoid context for flowing messages where possible. If you use content you should be prepared for concurrent changes.

Glad you're sorted.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 September 2021 12:46 UTC](https://discourse.nodered.org/t/receive-concurrent-http-requests/50555/4 "2021-09-17T12:46:44Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
