Closed zhengqianhe0 closed 1 month ago
I found some relevant information regarding handling multiple concurrent users in Langflow.
Langflow has several configuration settings and parameters to optimize performance for multiple concurrent users:
Worker Processes: Adjust the number of worker processes using the --workers
option or the LANGFLOW_WORKERS
environment variable. The default is set to 1
.
langflow run --workers <number_of_workers>
Or set the environment variable:
export LANGFLOW_WORKERS=<number_of_workers>
Worker Timeout: Adjust the worker timeout using the --timeout
option or the LANGFLOW_TIMEOUT
environment variable.
langflow run --timeout <timeout_in_seconds>
Or set the environment variable:
export LANGFLOW_TIMEOUT=<timeout_in_seconds>
Load Balancing: Langflow supports load balancing by scaling the number of replicas for the backend and frontend services. This can be configured in the values.yaml
file.
langflow:
backend:
replicaCount: 3
frontend:
replicaCount: 3
Hardware Requirements: For high-concurrency environments, it is recommended to have at least 2Gi of memory and 1 CPU per backend replica, and at least 1Gi of memory and 1 CPU per frontend replica. Scale the number of replicas as needed [4].
Monitoring Tools: Langflow integrates with Langfuse and LangSmith for real-time monitoring and performance tracking. This helps in identifying and resolving concurrency issues [5][6][7].
By configuring these settings, you can optimize Langflow to support multiple concurrent users effectively.
To continue talking to Dosu, mention @dosu.
Hello! The Multi-User functionality is coming up in a few weeks. We're going to be able to support multiple users in the same flow, and, futurely, even cursor tracking. Thanks for the feedback!
Has Langflow considered the issue of multiple concurrent users? How many people can be supported to use it online simultaneously if I deploy it by custom?