I was curious if there blogs, docs, etc on how well streammlit scales in general? I am looking for more just ball park number of simultaneous users can generally handle well (with assumption that incredible high CPU intensive tasks, eg dashboards generally using couple dataframes with perhaps 20-50 rows, not high CPU intensive transforms and such being done on dataframe).
For more specifics for our company we are thinking of using streamlit for internal tooling and with perhaps 100-200 users using, with perhaps highs of probably around 30-50 users at a time using app (these numbers are pretty rough but just give some idea of scale thinking of).
Donβt know if any one has experience on hitting load issues and where about were seeing these issues?
Streamlit uses the Tornado framework. It would be nice to read this discussion about some features that made Tornado more interested than Flask for this project. But the main point is that:
Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long polling, WebSockets, and other applications that require a long-lived connection to each user.
From: Tornado Web Server β Tornado 6.4 documentation
So, I would say that Tornado Framework scale very well and is excelent for the requirements and needs of Streamlit, but there is a lot of other points that can impact in the performance and scalability of Streamlit:
Deployment: If you use only a VM or local server, the application will never scale like Kubernetes and other Container Orchestration tools.
IO Operations: If the application needs a lot of IO operations, this can be the bottleneck depending if a cache is used, the network resources available, database configuration and limits⦠all this things can decrease the performance of the applicantion and are not related with the Streamlit server
Program Complexity: If the application is computation expensive, has many operations or/and has a lot of widgets, this could be the bottleneck of the application, because the request needs a lot of CPU resource/time to complete the client request. Large, Complex Streamlit Apps performance
So yes, as the last post, the most important thing for Streamlit App scaling is how you deploy your code (Consider that IO is not a limitation)
@Amanda_Kelly / @fhtsibuya so as of now we are deploying to single local server (so very simple). is a multi page streamlit dashboard with each dashboard being fairly low CPU/IO. I am thinking of trying to run some load tests via locust (will report back if do). just was wondering if there are general rules of thumb and expectations from peoples experiences?
You can have a few hundred connections retrieving database results without issues. The one call out is if you restart a server, every single tab open reconnects causing a delay for users. Best to have multiple access ports for improved experiences in those cases.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking βAccept allβ, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.