|
| 1 | +#Reference Architecture: up to 10,000 users |
| 2 | + |
| 3 | +>[!CAUTION] |
| 4 | +>This page is a work in progress. |
| 5 | +> |
| 6 | +>We are actively testing different load profiles for this user target and will be updating |
| 7 | +>recommendations. Use these recommendations as a starting point, but monitor your cluster resource |
| 8 | +>utilization and adjust. |
| 9 | +
|
| 10 | +The 10,000 users architecture targets large-scale enterprises with development |
| 11 | +teams in multiple geographic regions. |
| 12 | + |
| 13 | +**Geographic Distribution**: For these tests we deploy on 3 cloud-managed Kubernetes clusters in |
| 14 | +the following regions: |
| 15 | + |
| 16 | +1. USA - Primary - Coderd collocated with the PostgreSQL database deployment. |
| 17 | +2. Europe - Workspace Proxies |
| 18 | +3. Asia - Workspace Proxies |
| 19 | + |
| 20 | +**High Availability**: Typically, such scale requires a fully-managed HA |
| 21 | +PostgreSQL service, and all Coder observability features enabled for operational |
| 22 | +purposes. |
| 23 | + |
| 24 | +**Observability**: Deploy monitoring solutions to gather Prometheus metrics and |
| 25 | +visualize them with Grafana to gain detailed insights into infrastructure and |
| 26 | +application behavior. This allows operators to respond quickly to incidents and |
| 27 | +continuously improve the reliability and performance of the platform. |
| 28 | + |
| 29 | +##Testing Methodology |
| 30 | + |
| 31 | +###Workspace Network Traffic |
| 32 | + |
| 33 | +6000 concurrent workspaces (2000 per region), each sending 10 kB/s application traffic. |
| 34 | + |
| 35 | +Test procedure: |
| 36 | + |
| 37 | +1. Create workspaces. This happens simultaneously in each region with 200 provisioners (and thus 600 concurrent builds). |
| 38 | +2. Wait 5 minutes to establish baselines for metrics. |
| 39 | +3. Generate 10 kB/s traffic to each workspace (originating within the same region & cluster). |
| 40 | + |
| 41 | +After, we examine the Coderd, Workspace Proxy, and Database metrics to look for issues. |
| 42 | + |
| 43 | +###API Request Traffic |
| 44 | + |
| 45 | +To be determined. |
| 46 | + |
| 47 | +##Hardware recommendations |
| 48 | + |
| 49 | +###Coderd |
| 50 | + |
| 51 | +These are deployed in the Primary region only. |
| 52 | + |
| 53 | +| vCPU Limit| Memory Limit| Replicas| GCP Node Pool Machine Type| |
| 54 | +|----------------|--------------|----------|----------------------------| |
| 55 | +| 4 vCPU (4000m)| 12 GiB| 10|`c2d-standard-16`| |
| 56 | + |
| 57 | +###Provisioners |
| 58 | + |
| 59 | +These are deployed in each of the 3 regions. |
| 60 | + |
| 61 | +| vCPU Limit| Memory Limit| Replicas| GCP Node Pool Machine Type| |
| 62 | +|-----------------|--------------|----------|----------------------------| |
| 63 | +| 0.1 vCPU (100m)| 1 GiB| 200|`c2d-standard-16`| |
| 64 | + |
| 65 | +**Footnotes**: |
| 66 | + |
| 67 | +- Each provisioner handles a single concurrent build, so this configuration implies 200 concurrent |
| 68 | + workspace builds per region. |
| 69 | +- Provisioners are run as a separate Kubernetes Deployment from Coderd, although they may |
| 70 | + share the same node pool. |
| 71 | +- Separate provisioners into different namespaces in favor of zero-trust or |
| 72 | + multi-cloud deployments. |
| 73 | + |
| 74 | +###Workspace Proxies |
| 75 | + |
| 76 | +These are deployed in the non-Primary regions only. |
| 77 | + |
| 78 | +| vCPU Limit| Memory Limit| Replicas| GCP Node Pool Machine Type| |
| 79 | +|----------------|--------------|----------|----------------------------| |
| 80 | +| 4 vCPU (4000m)| 12 GiB| 10|`c2d-standard-16`| |
| 81 | + |
| 82 | +**Footnotes**: |
| 83 | + |
| 84 | +- Our testing implies this is somewhat overspecced for the loads we have tried. We are in process of revising these numbers. |
| 85 | + |
| 86 | +###Workspaces |
| 87 | + |
| 88 | +These numbers are for each of the 3 regions. We recommend that you use a separate node pool for user Workspaces. |
| 89 | + |
| 90 | +| Users| Node capacity| Replicas| GCP| AWS| Azure| |
| 91 | +|-------------|----------------------|-------------------------------|------------------|--------------|-------------------| |
| 92 | +| Up to 3,000| 8 vCPU, 32 GB memory| 256 nodes, 12 workspaces each|`t2d-standard-8`|`m5.2xlarge`|`Standard_D8s_v3`| |
| 93 | + |
| 94 | +**Footnotes**: |
| 95 | + |
| 96 | +- Assumed that a workspace user needs 2 GB memory to perform |
| 97 | +- Maximum number of Kubernetes workspace pods per node: 256 |
| 98 | +- As workspace nodes can be distributed between regions, on-premises networks |
| 99 | + and cloud areas, consider different namespaces in favor of zero-trust or |
| 100 | + multi-cloud deployments. |
| 101 | + |
| 102 | +###Database nodes |
| 103 | + |
| 104 | +We conducted our test using the`db-custom-16-61440` tier on Google Cloud SQL. |
| 105 | + |
| 106 | +**Footnotes**: |
| 107 | + |
| 108 | +- This database tier was only just able to keep up with 600 concurrent builds in our tests. |