Skip to content

Scaling

Platformatic ICC supports autoscaling applications on both Kubernetes and AWS ECS. It adjusts the number of application instances based on Node.js runtime signals and configured safety limits.

An application instance is one independently scaled copy of a Watt application—for example, a Kubernetes pod or an AWS ECS task. Throughout this section, instance refers to this application copy, rather than an underlying compute host or a worker running inside Watt.

ICC provides two scaler versions, selected for the whole ICC deployment with PLT_SCALER_ALGORITHM_VERSION.

VersionAvailabilityBehavior
Reactive scaler (V1)Open Source and EnterpriseReacts to current Event Loop Utilization (ELU) and heap pressure.
Predictive scaler (V2)EnterpriseForecasts short-term ELU and heap load and provisions capacity before the forecast crosses a threshold.

The two versions are alternatives: ICC runs either V1 or V2. They do not run together.

Enterprise deployments using V2 also include the Planner. The Planner learns recurring capacity requirements and lets operators schedule minimum instance counts before expected demand. It complements the live V2 scaler; it is not a third live-scaling algorithm.

  1. @platformatic/watt-extra collects application-level runtime signals from each Watt instance.
  2. The selected scaler evaluates those signals and calculates a target instance count.
  3. ICC applies minimum and maximum instance limits.
  4. The Machinist service updates the application’s desired instance count through the infrastructure provider.
  5. ICC records scaling events and exposes their reasons and metrics in the dashboard.

The following diagram shows the high-level real-time scaling data flow on Kubernetes. Each Watt pod sends runtime metrics through Watt Extra, and ICC applies the resulting replica target to Kubernetes.

Watt applications send metrics through Watt Extra to ICC, which updates the target replica count through Kubernetes

V1 is the default:

Terminal window
PLT_SCALER_ALGORITHM_VERSION=v1

Enterprise deployments can select V2:

Terminal window
PLT_SCALER_ALGORITHM_VERSION=v2

Restart ICC after changing the algorithm version. Applications must meet the Watt Extra and Platformatic Runtime version requirements.