Skip to content

Commit

Permalink
Allow configuring Puma to set worker count to number of detected cores (
Browse files Browse the repository at this point in the history
  • Loading branch information
sethboyles authored Jan 9, 2025
1 parent b019849 commit 99cd3d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jobs/cloud_controller_ng/spec
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,10 @@ properties:
description: "Use co-deployed Valkey (Redis fork) for rate limiting and metrics. If the Puma webserver is enabled, Valkey will automatically be used."
default: false

cc.puma.automatic_worker_count:
description: "Sets the number of Puma workers to the number of detected cores. See https://github.com/puma/puma?tab=readme-ov-file#clustered-mode for information on how cores are detected. If set to 'true', the value set for `cc.puma.workers` will be ignored."
default: false

cc.puma.workers:
description: "Number of workers for Puma webserver."
default: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ tls_port: <%= p("cc.tls_port") %>
internal_service_hostname: <%= p("cc.internal_service_hostname") %>
webserver: <%= thin_webserver_enabled? ? 'thin' : 'puma' %>
puma:
automatic_worker_count: <%= p("cc.puma.automatic_worker_count") %>
workers: <%= p("cc.puma.workers") %>
max_threads: <%= p("cc.puma.max_threads") %>
<% if_p("cc.puma.max_db_connections_per_process") do |max_db_conn_per_process| %>
Expand Down

0 comments on commit 99cd3d5

Please sign in to comment.