Skip to content

RStudio Workbench Architectures#

Using RStudio Workbench on a single server#

In this configuration, RStudio Workbench is installed on a single Linux server and enables:

  • Access to RStudio, Jupyter Notebook, JupyterLab and VS Code development IDEs
  • Multiple concurrent sessions per user
  • Use of multiple versions of R and Python
graph LR
u1(User)
u2(User)
u3(User)
b1(Browser)
b2(Browser)
b3(Browser)
workbench(RStudio Workbench)
session(RStudio Session)
jupyter(Jupyter Session)
vscode(VS Code Session)
job(Workbench Job)

u1---b1
u2---b2
u3---b3
b1---workbench
b2---workbench
b3---workbench

subgraph Linux Server
    workbench---session
    workbench---jupyter
    workbench---vscode
    workbench---job
end

Using RStudio Workbench as a cluster#

In this configuration, RStudio Workbench is installed on two or more Linux servers and enables:

  • Load balancing to provide additional computational resources to end users
  • High availability to provide redundancy

Requirements to support this architecture:

  • Users' home directories must be stored on an external shared file server (typically an NFS server)
  • Session metadata must be stored on an external PostgreSQL database server

The example diagrams below show cluster architectures with and without an external load balancer.

External Load Balancer#

flowchart LR
u1(User)
u2(User)
u3(User)
b1(Browser)
b2(Browser)
b3(Browser)
workbench1(RStudio Workbench)
workbench2(RStudio Workbench)
session(RStudio Session)
jupyter(Jupyter Session)
vscode(VS Code Session)
job(Workbench Job)
lb(Load Balancer)
nfs(Shared Storage)
pg(Postgres)

u1---b1
u2---b2
u3---b3
b1---lb
b2---lb
b3---lb
lb---workbench1
lb---workbench2
server1-.-nfs
server2-.-nfs
server1-.-pg
server2-.-pg


subgraph server1 [Linux Server]
    workbench1---jupyter
    workbench1---job
end

subgraph server2 [Linux Server]
    workbench2---session
    workbench2---vscode
end

workbench1-.-workbench2

Built-in Load Balancer#

flowchart LR
u1(User)
u2(User)
u3(User)
b1(Browser)
b2(Browser)
b3(Browser)
workbench1(RStudio Workbench)
workbench2(RStudio Workbench)
session(RStudio Session)
jupyter(Jupyter Session)
vscode(VS Code Session)
job(Workbench Job)
nfs(Shared Storage)
pg(Postgres)

subgraph server1 [Linux Server]
    workbench1---session
    workbench1---job
end

subgraph server2 [Linux Server]
    workbench2---jupyter
    workbench2---vscode
end

u1---b1
u2---b2
u3---b3
b1---workbench1
b2---workbench1
b3---workbench1
server1-.-nfs
server2-.-nfs
server1-.-pg
server2-.-pg
workbench1-.-workbench2

Using RStudio Workbench with an external resource manager#

In this configuration, RStudio Workbench is installed on one or more Linux servers, is configured with Launcher and a Kubernetes or Slurm cluster backend, and enables:

  • Users to run sessions and jobs on an external compute cluster

Requirements to support this architecture:

  • Users' home directories must be stored on an external shared file server (typically an NFS server)
  • It is strongly recommended that session metadata be stored on an external PostgreSQL database server
flowchart LR
u1(User)
u2(User)
u3(User)
b1(Browser)
b2(Browser)
b3(Browser)
workbench(RStudio Workbench)
rsession(RStudio Session)
jupyter(Jupyter Session)
vscode(VS Code Session)
job(Workbench Job)
launcher(Launcher)
nfs(Shared Storage)
pg(Postgres)

u1---b1
u2---b2
u3---b3
b1---workbench
b2---workbench
b3---workbench

subgraph server
    workbench---launcher
end

subgraph cluster [Resource Manager]
    launcher---rsession
    launcher---jupyter
    launcher---vscode
    launcher---job
end

server-.-pg
server-.-nfs
cluster-.-nfs

Using RStudio Workbench entirely in Kubernetes#

In this configuration, RStudio Workbench is installed entirely inside a Kubernetes cluster and enables:

  • User sessions and jobs run in isolated pods, potentially from different base images
  • The entire installation is managed in Kubernetes with tools like Helm
  • Optional replicas for high availability

Requirements to support this architecture:

  • Users' home directories must be stored on an external shared file server (typically an NFS server)
  • Session metadata must be stored on an external PostgreSQL database server
flowchart LR
u1(User)
u2(User)
u3(User)
b1(Browser)
b2(Browser)
b3(Browser)
ingress(Ingress Controller <br/> nginx/nginx-ingress)
workbench(RStudio Workbench <br/> Launcher <br/> ghcr.io/rstudio/rstudio-workbench)
rsession(RStudio Session <br/> docker.io/rstudio/r-session-complete)
jupyter(Jupyter Session <br/> ghcr.io/rstudio/py-session-complete)
vscode(VS Code Session <br/> ghcr.io/rstudio/py-session-complete)
job(Workbench Job <br/> docker.io/rstudio/r-session-complete)
nfs(Shared Storage)
pg(Postgres)


u1---b1
u2---b2
u3---b3
b1---ingress
b2---ingress
b3---ingress

subgraph k8s [Kubernetes cluster]
    ingress---workbench
    workbench---rsession
    workbench---jupyter
    workbench---vscode
    workbench---job
end

k8s-..-pg
k8s-..-nfs