Shiny server with parallel processing

Background: Shiny server (open source) hosted on Linux.

Hypothetical situation #1:
A single app hosted in one instance of Shiny server, with 4 cores (single thread) available.

App runs code sequentially.

If 100 users on separate machines tries to the connect to this single app, how is the load handle by Shiny server?

My understanding is that each user connection equals one R session, thus requiring 1 core per connection. Is this correct?

Hypothetical situation #2:
A single app hosted in one instance of Shiny server, with 4 cores (single thread) available.

App runs code in parallel, using 10 cores per run.

If 2 users on separate machines tries to the connect to this single app, how is the load handle by Shiny server in this case?

I don't believe there's a way to detect remaining cores.

How does Shinyapps.io handle the above?

Thanks in advance!

1 Like

In Shiny open source all app sesions (users) run on the same R session, so there is no load management at all.

To overcome this using the open source version, you can deploy using docker images or solutions like shinyproxy, or you can consider using Shiny-server Pro.

1 Like

Thanks for the prompt and clear explanation, as well as suggestions @andresrcs!

1 Like

Also, we offer RStudio Connect, which is sort of having shinyapps.io in a server you own. Here is a link: https://www.rstudio.com/products/connect/

1 Like

Thanks for suggestion, @edgararuiz.

We're evaluating that option currently.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.