11.5 Scale up or down
Scale up the Kubernetes cluster on which you have installed MicroTx to handle a large amount of requests. When the number of requests is low, scale down to use the resources efficiently.
The replica count is the number of replicas of the MicroTx instance that you want to run at a time.
Perform the following steps to scale the Kubernetes cluster on which you have installed MicroTx:
- In any text editor, create a YAML file with updated
replicaCount
value. In the following example, thereplicaCount
value is mentioned as 3.tmmReplicaCount: 3
- Validate and save the YAML file.
- Run the following command to upgrade the Kubernetes cluster on which you have installed MicroTx based on the
replicaCount
value provided in thescale.yaml
file.
Syntax
helm upgrade <release name> --namespace <namespace> --reuse-values --values scale.yaml <chart directory>
For information about the general command parameter and command options, see General Syntax of Commands.
Example
The following command scales the Kubernetes cluster in the otmm
namespace with the details mentioned in the scale.yaml
file.
helm upgrade otmm --namespace otmm --reuse-values --values scale.yaml otmm-RELEASE\otmm\helmcharts
\
Usage Notes
When you run this command, the Kubernetes cluster is not recreated. Based on the replica count that you specify, Kubernetes starts new replicas or stops existing replicas to match the specified replica count.
Helm performs rolling upgrade. Old replicas are gradually removed, while new replicas are started. Traffic is gradually shifted to the new replicas from old replicas and the old replicas are terminated only when all the traffic has been shifted to the new replicas. This ensures that there is no loss of in flight transactions.
Parent topic: Manage the Transaction Coordinator