Skip to content

Reactive Scaler (V1)

The Reactive scaler is the default scaler in ICC and is included in both the Open Source and Enterprise editions. Select it with:

Terminal window
PLT_SCALER_ALGORITHM_VERSION=v1

V1 reacts to current Node.js application health. It uses Event Loop Utilization (ELU) and heap measurements instead of relying only on container CPU utilization.

@platformatic/watt-extra monitors the applications running in each Watt instance. When an application exceeds its configured ELU or heap threshold, it sends an alert and recent health history to ICC.

ICC combines the alert with metrics for the other instances in the application. This lets it distinguish an isolated unhealthy instance from load affecting a larger part of the deployment.

V1 has two evaluation paths:

  • Alert-triggered evaluation can scale up. It runs when Watt-Extra reports unhealthy application signals.
  • Periodic evaluation can scale down. By default, ICC checks application metrics every 60 seconds.

An alert-triggered evaluation never scales down, and a periodic evaluation never scales up.

For each instance, V1 evaluates:

  • mean, maximum, trend, and variability of ELU;
  • mean, maximum, trend, and variability of heap usage;
  • whether either metric exceeds its threshold;
  • the similarity to recent successful scaling events.

The number of instances added depends on the proportion of instances reporting pressure and the severity of their signals. ICC always caps the result at the application’s maximum instance limit.

Very high ELU or heap pressure can trigger the immediate decision path. Otherwise, ICC uses the combined signal and performance-history scores to decide whether more capacity is required.

During a periodic evaluation, V1 considers scaling down when average utilization is well below the configured thresholds. It removes at least one instance and at most approximately 30% of the current replicas in one decision, without going below the application minimum.

Scale-down uses a longer cooldown than scale-up to reduce oscillation. The derived scale-down cooldown is six times the configured scale-up cooldown, bounded between 60 and 180 seconds.

V1 stores recent scaling state in Valkey:

  • the last scaling time for cooldown enforcement;
  • a bounded history of recent scaling events;
  • clusters representing similar successful events.

After a scale-up, ICC evaluates the result again after the post-scaling window. The observation updates the history used by later decisions.

SettingDefault
ELU threshold0.8 (80%)
Heap threshold0.85 (85%)
Scale-up cooldown15 seconds
Post-scaling evaluation window300 seconds
Periodic evaluation60 seconds
Maximum history events10
Maximum event clusters5
Default instance range1–10

See Scaling Configuration for the corresponding environment variables.