Single Server - Robust

Posit Connect can be configured to run on a single server, utilizing an external database and a networked file system. Use of these external components are optional for a single server implementation, but they present a more robust architecture in line with many organization’s best practices and existing processes. This architecture also offers flexibility to more easily scale Connect horizontally in the future without the complexity of migrating the database and application files.

Architectural overview

This implementation of Posit Connect includes the following components:

Architecture diagram

Architecture Diagram

Architecture Diagram

Nodes

This architecture utilizes a single Azure Virtual Machine running Posit Connect. During our performance tests, we used a Dv5 series VM running Ubuntu 22.04.

Refer to the Posit Connect Admin Guide for detailed information on system requirements and installation steps.

Database

This architecture utilizes a Azure Database for PostgreSQL running on a Standard_D4ds_v4 instance, provisioned with a minimum of 64 GB of storage and running the latest minor version of PostgreSQL 16 (see supported versions). Both the instance type and the storage can be scaled up for more demanding workloads.

  • The database instance should be configured with an empty PostgreSQL database for the Connect metadata.

Storage

This architecture utilizes an encrypted Azure NetApp Files. NetApp Files is configured with a 2 TiB capacity pool and a 100 GiB volume.

Load balancer

This architecture utilizes an Azure Application Gateway in order to provide public ingress to the Connect instance.

Networking

The architecture is implemented in a virtual network, utilizing both public and private subnets. The database instance, NetApp Files, and the virtual machine are located within the private subnets and ingress to the VM is managed through the Application Gateway.

Configuration details

The required configuration details are outlined in single server installation steps. Additionally, the following configuration should be performed:

Performance

The Connect team conducts performance testing on this architecture using the Grafana k6 tool. The workload consists of one virtual user (VU) publishing an R-based Plumber application repeatedly, while other VUs are making API fetch requests to a Python-based Flask application (using jumpstart examples included in the product).

The first test is a scalability test, where the number of VUs fetching the Flask app is increased steadily until the throughput is maximized. After noting the number of VUs needed to saturate the server, a second “load” test is run with that same number of VUs for 30 minutes, to accurately measure request latency when the server is fully utilized.

Below are the results for the load test:

  • Average requests per second: 1307 rps
  • Average request latency (fetch): 173 ms
  • Number of VUs: 250
  • Error rate: 0%

(NOTE that k6 VUs are not equivalent to real-world users, as they were being run without sleeps, to maximize throughput. To approximate the number of real-world users, you could multiply the RPS by 10).

Please note that applications performing complex processing tasks will likely require nodes with larger amounts of CPU and RAM to perform that processing, in order to achieve the same throughput and latency results above. We suggest executing performance tests on your applications to accurately determine hardware requirements.

FAQ

See the Architecture FAQs page for the general FAQ.