Open alexisjons opened 2 years ago
This depends on the contents of the notebook itself, I have successfully deployed voila-based applications to hundreds of users when sharded into several instances and only interaction-based work occurring in the notebook. If you have heavy workloads in your notebooks, or heavy background processes, you're going to be limited in your scalability.
Thanks! How did you do it? Does load balancing work? Or did each server have it's own url?
@alexisjons Did you have any luck attempting to scale your applications? I'm trying to increase the number of instances the app is running on but I keep getting 404s.
to my knowledge the out-the-box config of voila is 1server / 1user which doesn't scale that well to 100's of users. there are ways customise the config and your app to make it work, others know more -
active developments happening:
My team is working on a platform to (among other things) scale Voila applications. A few thoughts:
The main challenge when scaling Voila apps is that each app requires an IPython kernel (i.e. a Python process); this makes Voila a lot more resource-intensive than typical web apps (e.g. flask, fastAPI).
One thing you can do to alleviate this is to shut down idle kernels as soon as the user disconnects (Voila has options to do this), you can also use a load balancer to spin up new instances when scale increases.
Also, if you're doing health checks on your services, you can hit a static file in the Voila app, this will prevent kernel creation on each health check.
Happy to share more details, feel free to contact me.
The main challenge when scaling Voila apps is that each app requires an IPython kernel (i.e. a Python process); this makes Voila a lot more resource-intensive than typical web apps (e.g. flask, fastAPI).
Indeed this is the point we want to improve in the future. On the other hand, using a kernel allows Voila
to handle properly the resource-intensive task, which is complicated in typical web apps.
Thanks! How did you do it? Does load balancing work? Or did each server have it's own url?
load balancer in front, sharded to maybe 5-10 instances. Preheated kernels is helpful as well, keeping whatever is done via interactivity to have minimal load was also important. Then heavy compute was also farmed out to a cluster.
Does voila scale up to support 500+ users on 3-6 servers? Or is it more of an individual user application for rendering jupyter notebooks?