Function Autoscaling

View as Markdown

The NVCF Function Autoscaler reads function metrics, calculates a desired instance count, and sends that count to the NVCF API. It runs in the self-hosted control-plane cluster.

Function Autoscaler vs Horizontal Pod Autoscaler

Function autoscaling is distinct from Kubernetes horizontal pod autoscaling (HPA). HPA scales a Kubernetes workload in one cluster. The Function Autoscaler sets the desired instance count for an NVCF function version, which can run across NVCF compute clusters.

Key Functionality

  • Discovers active functions from control-plane request metrics in the timeseries database and persists the active set in Cassandra.
  • Periodically computes a desired instance count per function from recent utilization and the function’s scaling policy.
  • Applies the desired count by calling the NVCF API’s predictions endpoint.
  • Coordinates work across replicas using hash-based bucket assignment and Cassandra lightweight transaction (LWT) locks.

Self-hosted deployment

The self-managed control-plane stack defaults to the control observability profile. The control and all profiles install the Function Autoscaler. The compute and disabled profiles do not.

State Metrics must be enabled for control and all. With the default component modes, the control-plane stack also installs the shared collector and VictoriaMetrics. See Observability Configuration for profile and backend settings.

Architecture Overview

See Architecture for the end-to-end sequence and bucket model.

See Also