Scale and autoscale runtime services

You are currently viewing version 1.5 of the Apigee hybrid documentation.This version is end of life. You should upgrade to a newer version. For more information, seeSupported versions.

You can scale most services running in Kubernetes from the command line or in a configuration override. You can set scaling parameters for Apigee hybrid runtime services in theoverrides.yaml file.

ServiceImplemented AsScaling
CassandraApigeeDatastore (CRD)SeeScaling Cassandra.
Ingress/LoadBalancerDeploymentAnthos Service Mesh usesHorizontal Pod Autoscaling (HPAs).
LoggerDaemonSetDaemonSets manage replicas of a pod on all nodes, so they scale when you scale the pods themselves.
MART
Apigee Connect
Watcher
ApigeeOrganization (CRD)

To scale via configuration, increase the value of the Deployment'sreplicaCountMin configuration property for themart,watcher, and/orconnectAgent stanzas. For example:

mart: replicaCountMax: 2 replicaCountMin: 1watcher: replicaCountMax: 2 replicaCountMin: 1connectAgent: replicaCountMax: 2 replicaCountMin: 1

These Deployments use a Horizontal Pod Autoscaler for autoscaling. Set the Deployment object'stargetCPUUtilizationPercentage property to the threshold for scaling up; when this value is exceeded, Kubernetes adds pods up to the value ofreplicaCountMax.

For more information on setting configuration properties, seeManage runtime plane components.

Runtime
Synchronizer
UDCA
ApigeeEnvironment (CRD)To scale via configuration, increase the value of thereplicaCountMin property for theudca,synchronizer, and/orruntime stanzas in the overrides file. For example:
synchronizer: replicaCountMax: 10 replicaCountMin: 1runtime: replicaCountMax: 10 replicaCountMin: 1udca: replicaCountMax: 10 replicaCountMin: 1

Note:These changes apply to ALL environments in the overrides file. If you wish to customize scaling for each environment seeAdvanced configurations below.

These deployments use a Horizontal Pod Autoscaler for autoscaling. Set the Deployment object'stargetCPUUtilizationPercentage property to the threshold for scaling up; when this value is exceeded, Kubernetes adds pods up to the value ofreplicaCountMax.

For more information on setting configuration properties, seeManage runtime plane components.

Advanced configurations

In some scenarios, you may need to use advanced scaling options. Example scenarios include:

  • Setting different scaling options for each environment. For example, where env1 has aminReplica of 5 and env2 has aminReplica of 2.
  • Setting different scaling options for each component within an environment. For example, where theudca component has amaxReplica of 5 and thesynchronizer component has amaxReplica of 2.

The following example shows how to use thekubernetes patch command to change themaxReplicas property for theruntime component:

  1. Create environment variables to use with the command:
    export ENV=my-environment-nameexport NAMESPACE=apigee  #the namespace where apigee is deployedexport COMPONENT=runtime #can be udca or synchronizerexport MAX_REPLICAS=2export MIN_REPLICAS=1
  2. Apply the patch. Note that this example assumes thatkubectl is in yourPATH:
    kubectl patch apigeeenvironment -n $NAMESPACE \  $(kubectl get apigeeenvironments -n $NAMESPACE -o jsonpath='{.items[?(@.spec.name == "'$ENV'" )]..metadata.name}') \  --patch "$(echo -e "spec:\n  components:\n    $COMPONENT:\n      autoScaler:\n        maxReplicas: $MAX_REPLICAS\n        minReplicas: $MIN_REPLICAS")" \  --type merge
  3. Verify the change:
    kubectl get hpa -n $NAMESPACE

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.