Skip to main content

Automatic Scaling of Deployed Applications

When you deploy an image through the CAIP Apps API, the platform automatically manages how many instances of your application are running at any given time. This is done through Horizontal Pod Autoscaling (HPA) — a Kubernetes feature that adjusts the number of running replicas of your application based on real-time resource usage.

You do not need to configure or enable this — it is active for every deployment created through the Apps API.

Why This Matters

Without autoscaling, your application runs with a fixed number of instances regardless of how much traffic it receives. This can lead to two problems:

  • Over-provisioning: Running more instances than needed during quiet periods wastes compute resources.
  • Under-provisioning: Not having enough instances during traffic spikes degrades performance or causes failures.

Automatic scaling solves both problems. Your application scales out when it needs more capacity and scales back in when demand drops — without any manual intervention.

How It Works

The platform continuously monitors the CPU and memory usage of your running instances. When usage exceeds defined thresholds, new instances are started automatically. When usage drops and remains low for a period of time, excess instances are removed.

ParameterValue
Minimum running instances1
Maximum running instances5
Scale-out trigger (CPU)Above 50% average utilization
Scale-out trigger (Memory)Above 80% average utilization

Scaling Out (More Instances)

The platform reacts quickly to sudden increases in load. When CPU or memory usage exceeds the thresholds above, additional instances can be added within seconds, up to the maximum of 5.

Scaling In (Fewer Instances)

To avoid unnecessary restarts, the platform is conservative when removing instances. It waits 5 minutes after load drops before beginning to scale in, and removes instances gradually — one per minute — until the minimum of 1 is reached.

tip

If your application has just handled a traffic spike, do not be surprised if the extra instances remain active for a few minutes after load drops. This is by design to prevent the system from scaling in too aggressively.

What You Should Expect

  • Your application will always have at least 1 instance running.
  • During high load, the platform can run up to 5 instances simultaneously to distribute the work.
  • Scaling happens automatically — no action is required on your part.
  • You may observe brief periods where multiple instances are active even after load has decreased. This is the scale-in stabilization window at work.
note

If your workload consistently requires more than 5 instances, or if you have specific scaling requirements, please reach out to the platform team to discuss your use case.