Hi @Bofedojo! This is a very interesting question with a nuanced answer:
- RStudio Connect does scale the number of processes associated with content in response to increased demand. This is very important for multi-tenancy as there is a point for any application where the number of concurrent users cannot be served by a single R thread. On the other hand, in order to efficiently use resources, every user should not have their own process. Connect uses the below configuration (load factor, max connections per process, etc.) to decide when to spawn new processes for an application
- However, this direction of scaling is mostly to handle many concurrent users and the problems that come from many users on the same R process (even doing minuscule operations). It is not meant to offload heavy computations onto separate threads. For this pattern, which I believe is your primary aim, you are looking for "async programming." There is a good (but a bit dated) talk with a demo on the subject here:
It is also discussed in this article:
https://shiny.rstudio.com/articles/async.html
For a talk on general practices for "Shiny in Production"
And for a fun experiment on how to deploy a Shiny application to 10,000 concurrent users
I hope those resources are helpful!!