Reference
Reference: controller.yaml
autoscaling
| Syntax | autoscaling: {...} |
| Default | none |
| Context | controller.yaml |
| Reload | applies on reload |
When the controller adds or removes instances (ADR-0034).
autoscaling.applications
| Syntax | applications: [{...}, ...] |
| Default | none |
| Context | autoscaling |
| Reload | applies on reload |
Application processes to watch (application-tier classification).
autoscaling.applications[].comm
| Syntax | comm: <string> |
| Default | required |
| Context | autoscaling.applications[] |
| Reload | applies on reload |
Process name prefix (/proc/<pid>/comm), e.g. php-fpm8.3, node, uvicorn.
autoscaling.applications[].cpus
| Syntax | cpus: <number> |
| Default | required |
| Context | autoscaling.applications[] |
| Reload | applies on reload |
CPUs allotted to it (saturated at 90 %).
autoscaling.applications[].kind
| Syntax | kind: <string> |
| Default | required |
| Context | autoscaling.applications[] |
| Reload | applies on reload |
php, node or python.
autoscaling.applications[].name
| Syntax | name: <string> |
| Default | required |
| Context | autoscaling.applications[] |
| Reload | applies on reload |
Name of the application tier, for logs and status.
autoscaling.cooldown
| Syntax | cooldown: <seconds> |
| Default | 30 |
| Context | autoscaling |
| Reload | applies on reload |
Minimum time between two scaling actions.
autoscaling.inflight_per_loop
| Syntax | inflight_per_loop: <integer> |
| Default | 256 |
| Context | autoscaling |
| Reload | applies on reload |
Requests in flight per event loop that count as fully loaded.
autoscaling.lag_saturated
| Syntax | lag_saturated: <milliseconds> |
| Default | 5 |
| Context | autoscaling |
| Reload | applies on reload |
Loop lag that counts as fully saturated.
autoscaling.mode
| Syntax | mode: off | observe | web-tier |
| Default | off |
| Context | autoscaling |
| Reload | applies on reload |
off: never scale; observe: classify and log only; web-tier: add and remove instances when the web tier is saturated or idle.
autoscaling.p99_target_ms
| Syntax | p99_target_ms: <integer> |
| Default | none |
| Context | autoscaling |
| Reload | applies on reload |
p99 latency (ms) that counts as fully loaded; absent: latency does not raise the pressure.
autoscaling.scale_in_below
| Syntax | scale_in_below: <number> |
| Default | 0.3 |
| Context | autoscaling |
| Reload | applies on reload |
PressureScore below which the pool counts as idle.
autoscaling.scale_in_window
| Syntax | scale_in_window: <seconds> |
| Default | 60 |
| Context | autoscaling |
| Reload | applies on reload |
How long the pressure must stay below scale_in_below before an instance is removed.
autoscaling.scale_out_above
| Syntax | scale_out_above: <number> |
| Default | 0.75 |
| Context | autoscaling |
| Reload | applies on reload |
PressureScore above which the web tier is saturated (ADR-0034).
autoscaling.scale_out_window
| Syntax | scale_out_window: <seconds> |
| Default | 4 |
| Context | autoscaling |
| Reload | applies on reload |
How long the pressure must stay above scale_out_above before an instance is added.
controller
| Syntax | controller: {...} |
| Default | required |
| Context | controller.yaml |
| Reload | applies on reload |
Where the controller keeps its state, its control socket, the scalwsd binary and the configuration it runs.
controller.config
| Syntax | config: <string> |
| Default | required |
| Context | controller |
| Reload | applies on reload |
Source of new configuration generations.
controller.listen
| Syntax | listen: inherited | reuseport |
| Default | inherited |
| Context | controller |
| Reload | applies on reload |
How instances share the listeners (ADR-0033): inherited (default), the controller opens them and hands every instance the same sockets (one accept queue: balanced, nothing to migrate on scale-in); reuseport: each instance binds its own SO_REUSEPORT socket (needs net.ipv4.tcp_migrate_req=1 for scale-in).
controller.socket
| Syntax | socket: <string> |
| Default | required |
| Context | controller |
| Reload | applies on reload |
Local control API (created 0600).
controller.state_dir
| Syntax | state_dir: <string> |
| Default | required |
| Context | controller |
| Reload | applies on reload |
Generations and instance records (created 0700).
controller.webd_binary
| Syntax | webd_binary: <string> |
| Default | required |
| Context | controller |
| Reload | applies on reload |
The scalwsd binary the controller starts as instances.
instances
| Syntax | instances: {...} |
| Default | required |
| Context | controller.yaml |
| Reload | applies on reload |
How many scalwsd instances run, on which CPUs, and how they start, drain and restart.
instances.allow_drain_without_migration
| Syntax | allow_drain_without_migration: true | false |
| Default | false |
| Context | instances |
| Reload | applies on reload |
Allow scale-in without net.ipv4.tcp_migrate_req=1 (queued connections of a leaving instance are then reset). Default false.
instances.cpus
| Syntax | cpus: <string> |
| Default | required |
| Context | instances |
| Reload | applies on reload |
CPUs instances may use, e.g. "0-5" or "0,2,4".
instances.cpus_per_instance
| Syntax | cpus_per_instance: <integer> |
| Default | required |
| Context | instances |
| Reload | applies on reload |
CPUs each instance is pinned to (one event loop each).
instances.drain_timeout
| Syntax | drain_timeout: <seconds> |
| Default | 30 |
| Context | instances |
| Reload | applies on reload |
Time a leaving instance gets to finish its connections.
instances.kill_grace
| Syntax | kill_grace: <seconds> |
| Default | 5 |
| Context | instances |
| Reload | applies on reload |
Time after the drain timeout before a leaving instance is killed.
instances.max
| Syntax | max: <integer> |
| Default | required |
| Context | instances |
| Reload | applies on reload |
Instances started at most.
instances.max_restarts
| Syntax | max_restarts: <integer> |
| Default | 5 |
| Context | instances |
| Reload | applies on reload |
Crashes within restart_window after which an instance is not restarted again.
instances.metrics_base_port
| Syntax | metrics_base_port: <integer> |
| Default | 9910 |
| Context | instances |
| Reload | applies on reload |
Metrics/readiness port of instance i: metrics_base_port + i on 127.0.0.1.
instances.min
| Syntax | min: <integer> |
| Default | required |
| Context | instances |
| Reload | applies on reload |
Instances kept running at least.
instances.min_free_ram_mib
| Syntax | min_free_ram_mib: <integer> |
| Default | 512 |
| Context | instances |
| Reload | applies on reload |
Free host memory (MiB) required before a new instance starts.
instances.restart_window
| Syntax | restart_window: <seconds> |
| Default | 300 |
| Context | instances |
| Reload | applies on reload |
Window in which crashes are counted for max_restarts.
instances.roll_on_upgrade
| Syntax | roll_on_upgrade: true | false |
| Default | true |
| Context | instances |
| Reload | applies on reload |
Roll instances onto a replaced scalwsd binary when the controller starts (a package upgrade): a copy of the current generation, without reading config. Default true; false only logs which instances run the old binary.
instances.start_timeout
| Syntax | start_timeout: <seconds> |
| Default | 20 |
| Context | instances |
| Reload | applies on reload |
Time a new instance gets to become ready; it is stopped otherwise.