Below are tables of recommended instance types and the recommended maximum connected clients. For best performance Pritunl servers should be replicated across as many instances as possible handling as few clients as possible. Prices below are estimated costs for AWS and Google Cloud deployments.
For large deployments the Max Clients option should be set as low as possible (maximum concurrent clients/nodes in cluster). OpenVPN clients will choose a random server when connecting. Setting the max clients will prevent clients from flooding one node by dropping additional clients to trigger the clients to attempt to connect to a different node.
When a user downloads the VPN profile it will contain a list of the hosts in a random order. Unless the official Pritunl client is used and clients have access to the web console port the configuration sync will not be available to update the configuration. For large deployments DNS names should always be used by setting the Public Address field in the host settings. In addition it is best to over estimate the number of hosts needed for the deployment so that client configurations will already contain the DNS names for hosts that will potentially be added in the future. This can be done by adding then removing multiple hosts to the cluster leaving the host entry in the hosts tab. To quickly create hosts with one server remove the /var/lib/pritunl.uuid
file then restart the Pritunl service. After the empty hosts have been added fill in the Public Address field and attach the hosts to a server. Attaching empty hosts to a server will not causes issues as Pritunl will not attempt to run a server on an offline host.
To replace the empty hosts with real hosts when scaling delete the empty host and copy the Public Address field. Then attach the real host to the server and adjust the Replication Count.
When a VPN client attempts to connect to an empty or offline host it will fail and move on to the next host this increases the connection time. This can be avoided by adjusting the DNS entries for the empty hosts to the IP address of a running host until the DNS entry is used for a real host. Having multiple DNS entries pointing to the same host will not cause any issues.
remote server3.pritunl.net 16105 udp
remote server5.pritunl.net 16105 udp
remote server2.pritunl.net 16105 udp
remote server0.pritunl.net 16105 udp
remote server4.pritunl.net 16105 udp
remote server1.pritunl.net 16105 udp
For Pritunl nodes instances with high CPU and high network bandwidth are recommend. On AWS c5 instance types have the best network performance. Google Cloud doesn't provide information on instance network performance. The max clients represents the maximum concurrent connections.
t2.medium
250
2 vCPU
Low to Moderate Network
$33/month
c5.large
1000
2 vCPU
Up to 10 Gigabit
$62/month
c5.xlarge
2000
4 vCPU
Up to 10 Gigabit
$124/month
c5.2xlarge
2000
8 vCPU
Up to 10 Gigabit
$248/month
c5.4xlarge
4000
16 vCPU
Up to 10 Gigabit
$496/month
c5.9xlarge
4000
36 vCPU
10 Gigabit
$1116/month
n1-highcpu-2
250
2 vCPU
$36/month
n1-highcpu-4
1000
4 vCPU
$72/month
n1-highcpu-8
2000
8 vCPU
$144/month
n1-highcpu-16
4000
16 vCPU
$289/month
n1-highcpu-32
4000
32 vCPU
$579/month
For MongoDB instances with high memory are recommended. The max users represents the maximum number of users that can exists in Pritunl.
r3.large
20000
15 GB
$121/month
r3.xlarge
40000
30.5 GB
$243/month
n1-highmem-2
20000
13 GB
$60/month
n1-highmem-4
40000
26 GB
$121/month
r3.large x2 (MongoDB)
c5.large x10 (Pritunl)
Moderate Bandwidth
Best Performance: 2500
Recommended: 5000
Max: 20000
Best Performance: $0.44/user
Recommended: $0.22/user
Max: $0.05/user
$1,100/month
r3.large x2 (MongoDB)
c5.xlarge x10 (Pritunl)
High Bandwidth
Best Performance: 2500
Recommended: 5000
Max: 20000
Best Performance: $0.80/user
Recommended: $0.40/user
Max: $0.10/user
$2,000/month
r3.xlarge x2 (MongoDB)
c5.xlarge x20 (Pritunl)
High Bandwidth
Best Performance: 5000
Recommended: 10000
Max: 40000
Best Performance: $0.80/user
Recommended: $0.40/user
Max: $0.10/user
$4,000/month
r3.xlarge x2 (MongoDB)
c5.xlarge x40 (Pritunl)
High Bandwidth
Best Performance: 10000
Recommended: 20000
Max: 80000
Best Performance: $0.80/user
Recommended: $0.40/user
Max: $0.10/user
$8,000/month
r3.2xlarge x2 (MongoDB)
c5.xlarge x60 (Pritunl)
High Bandwidth
Best Performance: 15000
Recommended: 30000
Max: 120000
Best Performance: $0.76/user
Recommended: $0.38/user
Max: $0.09/user
$11,400/month