We have developed a nice Panel app and would now like to improve our deployment to support multiple users.
Currently we are running single-thread in K8S with 1 CPU core in AKS (Azure Kubernetes Service), and the problem we have is that the main thread and app blocks for all users every time we do a database query (typically takes a second, but sometimes takes up to a minute for us) or a CPU-intensive computation (typically takes a second, but sometimes takes up to a minute).
We are currently investigating using the existing threading / async / multi-processing / caching options in the hope that we can easily scale up or out without too much effort. To scale up we ran into Multiprocessing crashes on macOS when a page makes an HTTP request · Issue #5780 · holoviz/panel · GitHub with multiprocessing on MacOS which is annoying for devs, it might work on Linux.
However, I was wondering if anyone has experience or advice or working examples how to scale Panel to a performant deployment? What architecture or tools (FastAPI, Litestar, DuckDB, Prefect, Celery) have you used or would try with Panel?