Proper deployment of dash app without data leakage

I have created a dash app that is instantiated from a class that I have defined. I can then write

if __name__ == '__main__':
     dashboard = AppClass()
     dashboard.app.run_server(debug=True,use_reloader=True)

and thus access my app at a local server. However, when I open up another browser window and navigate to the app, although I get the initial dashboard view, if I perform some actions that trigger callbacks, then there seems to be a data leakage between the two sessions. I suspect that this is due to the fact that a single app instance has been created. Is there a way to create a separate instance every time that i access the server url?

Are you using global variables to store the state? I’m afraid this can’t be done, for exactly the reason you’ve given. Dash is designed to be stateless, and one server instance can server many browser sessions.

This documentation page explains it in more detail, and gives strategies for how to store state without using global variables

So, if I want to store some variables in order to access them via different callbacks, I should use a Store component?

Yes, exactly.