How to run Dash App on Azure web services asynchronously for multiple users?

Hi, I have two questions:

I created a Dash chatbot that takes a query from users and returns the most relevant documents from the database using SentenceTransformers, FAISS, DistilBert, etc. I deployed the app using Azure Container Registry and App Services. When different users reach at the website, one can see others interaction with the chatbot and I cannot figure out if this is an issue with Dash App or the App Services.

Currently, I am running the app on a single container on Azure that takes the code/data from Azure Container registry instance I’ve created.

I tried to add threaded=True or processes > 1 within app.run_server( ) function but they didn’t help either.

  1. How can I make this app available to different users asynchronously?

  2. I am also trying to get user feedback after each conversation and store that data to Azure / GitHub somehow, and each time a new conversation starts it will need to load the data and append the new feedback data & write it to Azure storage / GitHub. Is this achievable with Plotly Dash?

Thanks in advance!

Are you using global variables?

Yes, some of them are global. Is that the issue?

Yes. If you remove the global variables, your app should work as intended.

1 Like

Let me try. Thank you very much!

Another question: If I want to use a variable within multiple callbacks is there any other way than declaring them global? I think that was the main reason why we used global variables in the first place.

If the data are not too large, you can use a Store component.

See Part 4. Sharing Data Between Callbacks | Dash for Python Documentation | Plotly

Thank you! Let me look.