The Shiny-app on open-source edition Shiny-server has only one concurrent, which means it can run only for one user at a time point. But it can host multiple Shiny-apps, which can run synchronously. So, if we create severl Shiny-apps with different names but same function, then we can let more users use our service at same time. But users don’t how to choose the Shiny-app with small user number. This post will show you how to create a Shiny-app to redirect user to the Shiny-app with lower load.

I have no knowledge about server load balancer, the following method is ONLY what I thought it can be.

First, we need to know the load information about Shiny apps on our server, like which apps are running, how many users for each app, etc.

Then, create a normal Shiny app to detect which app has little user number than others, and using JavaScript to redirect user to that app.

CPU information about Shiny-app

The following is the R code than generates a data frame containing which Shiny-app are running and the user number of each Shiny-app.