Skip to content

Commit 11dbdd7

Browse files
committed
Database requirements
1 parent 67c4604 commit 11dbdd7

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

docs/admin/architectures/index.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,36 @@ onboard, the autoscaling configuration should account for ongoing workspaces.
300300
Scaling down workspace nodes to zero is not recommended, as it will result in
301301
longer wait times for workspace provisioning by users.
302302

303-
### Database
303+
### External database
304304

305-
TODO
305+
While running in production, Coder deployment requires an access to an external
306+
PostgreSQL database. Depending on the scale of the user-base, workspace
307+
activity, and High Availability requirements, the amount of CPU and memory
308+
resources may differ.
306309

307-
PostgreSQL database
310+
#### Scaling formula
311+
312+
When determining scaling requirements, take into account the following
313+
considerations:
314+
315+
- `2 vCPU x 8 GB RAM x 512 GB storage`: A baseline for database requirements for
316+
Coder deployment with less than 1000 users, and low activity level (30% active
317+
users). This capacity should be sufficient to support 100 external
318+
provisioners.
319+
- Allocate an additional CPU core to the database instance for every 1000 active
320+
users.
321+
- Enable _High Availability_ mode for database engine for large scale
322+
deployments.
323+
324+
With enabled database encryption feature in Coder, consider allocating an
325+
additional CPU core to every `coderd` replica.
326+
327+
#### Performance optimization guidelines
308328

309-
measure and document the impact of dbcrypt
329+
We provide the following general recommendations for PostgreSQL settings:
310330

311-
###
331+
- Increase number of vCPU if CPU utilization or database latency is high.
332+
- Allocate extra GB memory if database performance is poor and CPU utilization
333+
is low.
334+
- Utilize faster disk options such as SSDs or NVMe drives for optimal
335+
performance enhancement.

0 commit comments

Comments
 (0)