(via mark sellors, thank you!)

````
---
title: "Posit Connect Scheduled Jobs Runner Architecture"
Author: "Mark Sellors"
Date: 2022-09-09
format:
  html:
    mermaid-format: png
---

## Architecture

In this architecture, Connect is configured as a cluster. However, one or more instances of Connect are left clear of user traffic, freeing them from running resource intensive interactive workloads.

```{mermaid}
graph LR
  u1([User 1])
  u2([User 2])
  un([User n])
  lb{{Load Balancer}}
  con1(Connect node 1)
  con2(Connect node 2)
  consched("Connect node<br />(Scheduled jobs only)")
  stor[Shared Storage]
  db[(Shared database)]
  u1 --> lb
  u2 --> lb
  un --> lb
  lb --> con1
  lb --> con2
  con1 -.- stor
  con1 -.- db
  con2 -.- stor
  con2 -.- db
  consched -.- stor
  consched -.- db
  style lb fill:#9A4665,stroke:#333,stroke-width:2px,color:#fff;
  classDef users fill:#72994E,stroke:#333,stroke-width:2px,color:#fff;
  class u1,u2,un users;
  classDef Connect fill:#419599,stroke:#EE6331,stroke-width:2px,color:#fff;
  class con1,con2,consched Connect;
  classDef shared fill:#fff,stroke:#333,stroke-width:2px;
  class stor,db shared;
```

In the diagram above, users arrive at Connect via a load balancer and are directed to one of two Connect nodes. These Connect nodes are configured with the `Applications.ScheduleConcurrency=0` so that scheduled content will not be run on them.
```
cscheid
2022-09-09T16:52:25Z
cscheid
bug mermaid
v1.2
closed
mermaid diagrams rendered as PNG in HTML format have bad aspect ratio
https://github.com/quarto-dev/quarto-cli/issues/2383