# Dash Scalability - Gunicorn and stateless app functionality

**URL:** <https://community.plotly.com/t/dash-scalability-gunicorn-and-stateless-app-functionality/86705>\
**Category:** Dash Python\
**Tags:** question\
**Created:** [August 21, 2024, 11:28am UTC](https://community.plotly.com/t/dash-scalability-gunicorn-and-stateless-app-functionality/86705 "2024-08-21T11:28:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmckeown](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@cmckeown](https://community.plotly.com/u/cmckeown)\
**Post date:** [August 21, 2024, 11:28am UTC](https://community.plotly.com/t/dash-scalability-gunicorn-and-stateless-app-functionality/86705/1 "2024-08-21T11:28:13Z")

</div>

Hi there,

I need some assistance in understanding exactly how Dash processes requests in a multi user environment and whether there are potential risks for race conditions/collisions.

I am running a dash app on an AWS ECS task with 8 gunicorn workers. This app can be accessed by multiple users from remote locations.

Our component IDs are fairly predictable (i.e dropdown button is _dropdown-button_). Does the callback map on the backend distinguish between the various worker processes? For instance, would it be possible for two callbacks in remote locations to become tied to a race condition, where the value of a given output become based on a first come-first served (or equivalent). If this is the case, would it not be possible for requests to become cross-contaminated?

We don’t currently have any session based management on the app which would be an obvious solution (to perhaps a non-existant problem).

Apologies if a silly question but we’re trying to process any potential issues in scaling our operation.

Thanks

---

<div class="post-metadata">

**Author:** ![davidharris](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@davidharris](https://community.plotly.com/u/davidharris)\
**Post date:** [August 22, 2024, 7:33am UTC](https://community.plotly.com/t/dash-scalability-gunicorn-and-stateless-app-functionality/86705/2 "2024-08-22T07:33:10Z")

</div>

If I understand the question, I think the answer is that if the app is stateless the issue doesn’t really arise (and the reason for writing stateless apps is just to avoid this kind of issue).

This is discussed at this link, which also gives a range of approaches to storing modifiable data that does need to be shared between user sessions - does it answer your question?

> **[Part 4. Sharing Data Between Callbacks | Dash for Python Documentation | Plotly](https://dash.plotly.com/sharing-data-between-callbacks#dash-is-stateless)**
>
> Global variables will break your Dash apps. However, there are other ways to share data between callbacks. This chapter is useful for callbacks that run expensive data processing tasks or process large data.
