7.5 Scale up or down
Scale up the Kubernetes cluster on which you have installed MicroTx Distributed Transactions 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 Distributed Transactions instance that you want to run at a time.
Perform the following steps to scale the Kubernetes cluster on which you have installed MicroTx Distributed Transactions:
- In any text editor, create a YAML file with updated
replicaCountvalue. In the following example, thereplicaCountvalue 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 Distributed Transactions based on the
replicaCountvalue provided in thescale.yamlfile.
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 MicroTx namespace with the details mentioned in the scale.yaml file.
helm upgrade MicroTx --namespace MicroTx --reuse-values --values scale.yaml MicroTx-RELEASE\MicroTx\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