What would be the best way to implement a way to have multiple users use the bokeh app at the same time without significant effect on speed. I know you could run it through a flask embed and then gunicorn, but I was wondering if there is a way to do it through the bokeh server?
If you want to support multiple users on a single Bokeh server, the main consideration is to avoid blocking work in any Bokeh callbacks. Tornado is single threaded but asynchronous, so you want to make sure that callbacks return very quickly. One way to do this is to offload any blocking tasks to threads. You can see see docs and examples of doing that here:
Of course, you can offload blocking work to threads even if you are running multiple Bokeh server processes too, so if you do eventually scale by using gunicorn or a load balancer then there’s no problems mixing approaches.
What would be the best way to implement a way to have multiple users use the bokeh app at the same time without significant effect on speed. I know you could run it through a flask embed and then gunicorn, but I was wondering if there is a way to do it through the bokeh server?
Thanks.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
This is pretty good. Currently, my solution is Flask + Bokeh server + IIS. The biggest issue is that launching web application is so slow. And also, the response is tremendously slowly if I select item from combBox to update plots’ ColumnDataSource.
any comments? thanks
···
On Wednesday, July 11, 2018 at 10:16:23 AM UTC-6, Bryan Van de ven wrote:
Hi,
If you want to support multiple users on a single Bokeh server, the main consideration is to avoid blocking work in any Bokeh callbacks. Tornado is single threaded but asynchronous, so you want to make sure that callbacks return very quickly. One way to do this is to offload any blocking tasks to threads. You can see see docs and examples of doing that here:
Of course, you can offload blocking work to threads even if you are running multiple Bokeh server processes too, so if you do eventually scale by using gunicorn or a load balancer then there’s no problems mixing approaches.
What would be the best way to implement a way to have multiple users use the bokeh app at the same time without significant effect on speed. I know you could run it through a flask embed and then gunicorn, but I was wondering if there is a way to do it through the bokeh server?
Thanks.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].