@@ -205,27 +205,60 @@ this option enabled unless there are compelling reasons to disable it.
205
205
206
206
Inactive users do not consume Coder resources.
207
207
208
- #### HTTP API latency
208
+ #### Scaling formula
209
209
210
- API latency/response time average number of HTTP requests
210
+ When determining scaling requirements, consider the following factors:
211
211
212
- depending on database perf
212
+ - 1 vCPU x 2 GB memory x 250 users: A reasonable formula to determine resource
213
+ allocation based on the number of users and their expected usage patterns.
214
+ - API latency/response time: Monitor API latency and response times to ensure
215
+ optimal performance under varying loads.
216
+ - Average number of HTTP requests: Track the average number of HTTP requests to
217
+ gauge system usage and identify potential bottlenecks.
213
218
214
- TODO
219
+ ** Node Autoscaling **
215
220
216
- #### Scaling formula
221
+ We recommend to disable autoscaling for ` coderd ` nodes. Autoscaling can cause
222
+ interruptions for user connections, see [ Autoscaling] ( ../scale.md#autoscaling )
223
+ for more details.
224
+
225
+ ### Workspaces
217
226
218
- reasonable ratio/formula: CPU x memory x users reasonable ratio/formula:
219
- provisionerd x users API latency/response time average number of HTTP requests
227
+ Assumptions:
220
228
221
- TODO
229
+ workspaces also run on the same Kubernetes cluster (recommend a different
230
+ namespace/node pool)
222
231
223
- ### Workspaces
232
+ developers can pick between 4-8 CPU and 4-16 GB RAM workspaces (limits)
233
+
234
+ developers have a resource quota of 16 GPU 32 GB RAM (2-maxed out workspaces).
224
235
225
- TODO
236
+ However, the Coder agent itself requires at minimum 0.1 CPU cores and 256 MB to
237
+ run inside a workspace.
238
+
239
+ web microservice development use case: resources are mostly underutilized but
240
+ spike during builds
241
+
242
+ Case study:
243
+
244
+ Developers for up to 2000+ users architecture are in 2 regions (a different
245
+ cluster) and are evenly split. In practice, this doesn’t change much besides the
246
+ diagram and workspaces node pool autoscaling config as it still uses the central
247
+ provisioner. Recommend multiple provisioner groups for zero-trust and
248
+ multi-cloud use cases. Developers for up to 3000+ users architecture are also in
249
+ an on-premises network. Document a provisioner running in a different cloud
250
+ environment, and the zero-trust benefits of that.
251
+
252
+ scaling formula
253
+
254
+ provisionerd x users: Another formula to consider, focusing on the capacity of
255
+ provisioner nodes relative to the number of workspace builds, triggered by
256
+ users.
226
257
227
258
### Database
228
259
229
- TODO
260
+ PostgreSQL database
261
+
262
+ measure and document the impact of dbcrypt
230
263
231
264
###
0 commit comments