Title
App becomes very slow with multiple users (backend via systemd + frontend via reflex export)
Description
Hi,
I am new to Reflex and frontend development. I have deployed my Reflex app with this setup:
Deployment Setup
- Backend running as a Linux service:
reflex run --env prod --backend-only
_event websocket served from this backend
- Frontend deployed using:
- Exported frontend hosted through nginx
- App uses Reflex state files
Issue
Performance is good with a single user.
But when multiple users use the app at the same time, it becomes very slow:
- 1 user → works fine
- 3–5 users → noticeable lag
- More users → UI becomes very slow / unresponsive
It seems like the single backend websocket process is getting overloaded with multiple sessions.
Questions
- Is this the correct way to deploy Reflex apps for multi-user usage?
- Should the backend be run with multiple workers instead of one process?
- What is the recommended production setup for handling many concurrent users?
Any guidance on how to scale Reflex properly for multiple users would be very helpful.
Thanks!
Title
App becomes very slow with multiple users (backend via systemd + frontend via reflex export)
Description
Hi,
I am new to Reflex and frontend development. I have deployed my Reflex app with this setup:
Deployment Setup
reflex run --env prod --backend-only
_eventwebsocket served from this backendIssue
Performance is good with a single user.
But when multiple users use the app at the same time, it becomes very slow:
It seems like the single backend websocket process is getting overloaded with multiple sessions.
Questions
Any guidance on how to scale Reflex properly for multiple users would be very helpful.
Thanks!