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:
PLT_SCALER_ALGORITHM_VERSION=v1V1 reacts to current Node.js application health. It uses Event Loop Utilization (ELU) and heap measurements instead of relying only on container CPU utilization.
Data flow
Section titled “Data flow”@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.
Scale-up decisions
Section titled “Scale-up decisions”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.
Scale-down decisions
Section titled “Scale-down decisions”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.
Cooldowns and history
Section titled “Cooldowns and history”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.
Important defaults
Section titled “Important defaults”| Setting | Default |
|---|---|
| ELU threshold | 0.8 (80%) |
| Heap threshold | 0.85 (85%) |
| Scale-up cooldown | 15 seconds |
| Post-scaling evaluation window | 300 seconds |
| Periodic evaluation | 60 seconds |
| Maximum history events | 10 |
| Maximum event clusters | 5 |
| Default instance range | 1–10 |
See Scaling Configuration for the corresponding environment variables.