# Multiple Users

**URL:** <https://discuss.streamlit.io/t/multiple-users/44948>\
**Category:** Using Streamlit\
**Created:** [June 9, 2023, 2:37pm UTC](https://discuss.streamlit.io/t/multiple-users/44948 "2023-06-09T14:37:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pwright](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@pwright](https://discuss.streamlit.io/u/pwright)\
**Post date:** [June 9, 2023, 2:37pm UTC](https://discuss.streamlit.io/t/multiple-users/44948/1 "2023-06-09T14:37:41Z")

</div>

How exactly does streamlit handle multiple simultaneous users? Will it run compute for each additional user on a new thread or do requests get processed serially on the same thread?

---

<div class="post-metadata">

**Author:** ![mathcatsand](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/mathcatsand/32/48006_2.png) [@mathcatsand](https://discuss.streamlit.io/u/mathcatsand)\
**Post date:** [June 18, 2023, 11:37pm UTC](https://discuss.streamlit.io/t/multiple-users/44948/2 "2023-06-18T23:37:01Z")

</div>

When you deploy a Streamlit app, there is a single, Python backend (server). Different threads run to handle different users. If you write anything to `st.session_state`, that information is only going to be available to the session in which it was written. (If a person opens multiple tabs in their browser to the same app, then each tab is going to be its own session, by the way.)

Where it gets a little interesting is with caching. When you cache information for a function, that cached inform is available to all sessions. Whether your cached function returns a shared singleton or a copy depends the choice of caching function:

> **[Caching - Streamlit Docs](https://docs.streamlit.io/library/advanced-features/caching)**

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [December 24, 2023, 6:00pm UTC](https://discuss.streamlit.io/t/multiple-users/44948/4 "2023-12-24T18:00:47Z")

</div>

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