Documentation Index

Fetch the complete documentation index at: https://docs.zesty.co/llms.txt

Use this file to discover all available pages before exploring further.

Replica optimization

Prev Next

Replica optimization is a horizontal optimization solution that continuously manages the minimum replica counts configured in HPA and KEDA.

Horizontal autoscalers such as HPA and KEDA automatically scale workloads in response to demand. However, teams often configure higher minimum replica values to reduce operational risk.

As workload behavior evolves, those settings typically require manual review and adjustment, which can be overlooked over time. As a result, workloads can continue running more replicas than necessary, increasing infrastructure costs and reducing potential savings opportunities.

The Replica optimization solution continuously evaluates workloads and automatically adjusts the minimum replica values defined in HPA and KEDA. By optimizing minimum replica counts over time, the solution helps reduce unnecessary compute consumption while maintaining the optimization behavior defined by the selected policy.

The Replica optimization solution manages only the minimum replica value and does not directly control the current number of running replicas.

The Replica optimization solution uses the minimum replica value defined in HPA or KEDA as the source of truth and adjusts that value within policy-defined limits. Depending on workload behavior and the selected policy, the solution can increase or decrease the configured minimum replica count.

Benefits of Replica optimization include:

  • Reducing infrastructure costs by lowering unnecessary minimum replica counts.

  • Maintaining workload stability as application demand changes over time.

  • Eliminating the need to manually review and tune HPA and KEDA minimum replica settings.

  • Continuously adapting minimum replica values as workload behavior evolves.

How Replica optimization works with Pod rightsizing

The Replica optimization solution complements Pod rightsizing by optimizing a different aspect of workload resource allocation.

Pod rightsizing optimizes the CPU and memory resources allocated to each replica. Replica optimization optimizes the minimum number of replicas required for the workload. Together, these solutions help align workload resources with actual demand.

Replica optimization requires Pod rightsizing. If a Replica optimization policy is applied before Pod rightsizing becomes active, Replica optimization automatically becomes active when Pod rightsizing is applied to the workload.

Replica optimization policies

The Replica optimization solution uses policies to define how minimum replica counts are managed for workloads. You can use built-in policies or custom policies.

The following built-in policies are available:

  • Balanced: Provides a balance between cost reduction and workload stability for most workloads.

  • Stability-focused: Prioritizes availability by maintaining more conservative minimum replica settings.

  • Cost-focused: Prioritizes cost reduction by allowing more aggressive minimum replica optimization.

  • Custom: Allows you to define your own Replica optimization policy settings.

For information about policy parameters and built-in policy values, see Resource optimization policies.

Prerequisites

Replica optimization relies on these components in the cluster:

  • The Insights agent is installed.
    This agent provides visibility into the workloads running in the cluster.
    It can take up to 24 hours after installing the agent for Kompass to deliver recommendations.

  • The Pod rightsizing solution is enabled.
    When the solution is enabled, you can apply Replica optimization to workloads.
    It can take up to 1 hour after enabling the solution before you can apply it to workloads.

For more information, see Deploy Kubernetes resource optimization solutions.

For information about supported environments and workload types, see the Support section.

© 2026 Zesty. All Rights Reserved

info@zesty.co