Reference

Reference: controller.yaml

autoscaling

Syntaxautoscaling: {...}
Defaultnone
Contextcontroller.yaml
Reloadapplies on reload

When the controller adds or removes instances (ADR-0034).

autoscaling.applications

Syntaxapplications: [{...}, ...]
Defaultnone
Contextautoscaling
Reloadapplies on reload

Application processes to watch (application-tier classification).

autoscaling.applications[].comm

Syntaxcomm: <string>
Defaultrequired
Contextautoscaling.applications[]
Reloadapplies on reload

Process name prefix (/proc/<pid>/comm), e.g. php-fpm8.3, node, uvicorn.

autoscaling.applications[].cpus

Syntaxcpus: <number>
Defaultrequired
Contextautoscaling.applications[]
Reloadapplies on reload

CPUs allotted to it (saturated at 90 %).

autoscaling.applications[].kind

Syntaxkind: <string>
Defaultrequired
Contextautoscaling.applications[]
Reloadapplies on reload

php, node or python.

autoscaling.applications[].name

Syntaxname: <string>
Defaultrequired
Contextautoscaling.applications[]
Reloadapplies on reload

Name of the application tier, for logs and status.

autoscaling.cooldown

Syntaxcooldown: <seconds>
Default30
Contextautoscaling
Reloadapplies on reload

Minimum time between two scaling actions.

autoscaling.inflight_per_loop

Syntaxinflight_per_loop: <integer>
Default256
Contextautoscaling
Reloadapplies on reload

Requests in flight per event loop that count as fully loaded.

autoscaling.lag_saturated

Syntaxlag_saturated: <milliseconds>
Default5
Contextautoscaling
Reloadapplies on reload

Loop lag that counts as fully saturated.

autoscaling.mode

Syntaxmode: off | observe | web-tier
Defaultoff
Contextautoscaling
Reloadapplies 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

Syntaxp99_target_ms: <integer>
Defaultnone
Contextautoscaling
Reloadapplies on reload

p99 latency (ms) that counts as fully loaded; absent: latency does not raise the pressure.

autoscaling.scale_in_below

Syntaxscale_in_below: <number>
Default0.3
Contextautoscaling
Reloadapplies on reload

PressureScore below which the pool counts as idle.

autoscaling.scale_in_window

Syntaxscale_in_window: <seconds>
Default60
Contextautoscaling
Reloadapplies on reload

How long the pressure must stay below scale_in_below before an instance is removed.

autoscaling.scale_out_above

Syntaxscale_out_above: <number>
Default0.75
Contextautoscaling
Reloadapplies on reload

PressureScore above which the web tier is saturated (ADR-0034).

autoscaling.scale_out_window

Syntaxscale_out_window: <seconds>
Default4
Contextautoscaling
Reloadapplies on reload

How long the pressure must stay above scale_out_above before an instance is added.

controller

Syntaxcontroller: {...}
Defaultrequired
Contextcontroller.yaml
Reloadapplies on reload

Where the controller keeps its state, its control socket, the scalwsd binary and the configuration it runs.

controller.config

Syntaxconfig: <string>
Defaultrequired
Contextcontroller
Reloadapplies on reload

Source of new configuration generations.

controller.listen

Syntaxlisten: inherited | reuseport
Defaultinherited
Contextcontroller
Reloadapplies 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

Syntaxsocket: <string>
Defaultrequired
Contextcontroller
Reloadapplies on reload

Local control API (created 0600).

controller.state_dir

Syntaxstate_dir: <string>
Defaultrequired
Contextcontroller
Reloadapplies on reload

Generations and instance records (created 0700).

controller.webd_binary

Syntaxwebd_binary: <string>
Defaultrequired
Contextcontroller
Reloadapplies on reload

The scalwsd binary the controller starts as instances.

instances

Syntaxinstances: {...}
Defaultrequired
Contextcontroller.yaml
Reloadapplies on reload

How many scalwsd instances run, on which CPUs, and how they start, drain and restart.

instances.allow_drain_without_migration

Syntaxallow_drain_without_migration: true | false
Defaultfalse
Contextinstances
Reloadapplies 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

Syntaxcpus: <string>
Defaultrequired
Contextinstances
Reloadapplies on reload

CPUs instances may use, e.g. "0-5" or "0,2,4".

instances.cpus_per_instance

Syntaxcpus_per_instance: <integer>
Defaultrequired
Contextinstances
Reloadapplies on reload

CPUs each instance is pinned to (one event loop each).

instances.drain_timeout

Syntaxdrain_timeout: <seconds>
Default30
Contextinstances
Reloadapplies on reload

Time a leaving instance gets to finish its connections.

instances.kill_grace

Syntaxkill_grace: <seconds>
Default5
Contextinstances
Reloadapplies on reload

Time after the drain timeout before a leaving instance is killed.

instances.max

Syntaxmax: <integer>
Defaultrequired
Contextinstances
Reloadapplies on reload

Instances started at most.

instances.max_restarts

Syntaxmax_restarts: <integer>
Default5
Contextinstances
Reloadapplies on reload

Crashes within restart_window after which an instance is not restarted again.

instances.metrics_base_port

Syntaxmetrics_base_port: <integer>
Default9910
Contextinstances
Reloadapplies on reload

Metrics/readiness port of instance i: metrics_base_port + i on 127.0.0.1.

instances.min

Syntaxmin: <integer>
Defaultrequired
Contextinstances
Reloadapplies on reload

Instances kept running at least.

instances.min_free_ram_mib

Syntaxmin_free_ram_mib: <integer>
Default512
Contextinstances
Reloadapplies on reload

Free host memory (MiB) required before a new instance starts.

instances.restart_window

Syntaxrestart_window: <seconds>
Default300
Contextinstances
Reloadapplies on reload

Window in which crashes are counted for max_restarts.

instances.roll_on_upgrade

Syntaxroll_on_upgrade: true | false
Defaulttrue
Contextinstances
Reloadapplies 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

Syntaxstart_timeout: <seconds>
Default20
Contextinstances
Reloadapplies on reload

Time a new instance gets to become ready; it is stopped otherwise.