In R shiny server, any thing outside of the shiny server function gets loaded only once (global.R for common data load etc…) and only the server function gets instantiated for each additional user. In shiny server pro, a new app instance get created for each user above the threshold count, so that page response time for end user can be controlled to be within acceptable limits.
Does ShinyProxy have any similar load balancing options. Have browsed through the ShinyProxy.io website. Could not find any reference to this topic.
In ShinyProxy every user has his or her private Docker container which serves the Shiny app, so the number of users you can serve is predominantly determined by the dimension of the machine needed to run your Docker containers.
In order to scale this, one could use e.g. Docker Swarm
which implements the same Docker API that is used by ShinyProxy (typically to communicate with a plain Docker).
How would go about the swarm implementation? I’ve tried it with azure container services (swarm orchestratation), but I couldn’t get it to work. I used this guide to setup the swarm with the slight modification of having
did not allow the swarm container to start (check docker ps on the swarm agent vm before and after changing the /etc/default/docker file and restaring docker). This approach did start the shinyproxy-demo container on the swarm, but I got this error
Failed to start container: Request error: POST http://localhost:2375/containers/create: 500
on the client side. It could be that the java application needs to be running on the swarm agent vm? Any suggestions are welcome.