Configuring autoscaling for Data Services and Routes
Configure Horizontal Pod Autoscaling (HPA) for the resource allocated to Data Services and Routes in a Dynamic Engine environment, ensuring that Data Services and Routes are capable of handling large volumes of traffic or messages.
Before you begin
- The dynamic-engine-crd custom resource definitions must have been installed using the oci://ghcr.io/talend/helm/dynamic-engine-crd Helm chart. If not, run the following commands for the installation:
- Find the chart version to be used:
- Run the following Helm command:
helm show chart oci://ghcr.io/talend/helm/dynamic-engine-crd --version <engine_version> - See the version directly from Talend Management Console or check the Dynamic Engine changelog for the chart version included in your Dynamic Engine version.
- Use an API call to the Dynamic Engine version endpoint.
- Run the following Helm command:
- Run the following command to install the Helm
chart of a given version:Replace <helm_chart_version> with the chart version supported by your Dynamic Engine version.
helm install dynamic-engine-crd oci://ghcr.io/talend/helm/dynamic-engine-crd --version <helm_chart_version>Without specifying the version, you install the latest available dynamic-engine-crd chart version.
- Find the chart version to be used:
-
Your Dynamic Engine must have been deployed. If not, run this command to deploy it:This is the default deployment, because the current customization is only needed on the Dynamic Engine environment side. For this reason no customization is configured for the Dynamic Engine instance.
helm install dynamic-engine -f <engine-id>-helm-values/<engine-id>-values.yaml oci://ghcr.io/talend/helm/dynamic-engine -
The support for autoscaling relies on a Metrics server.
To verify if a Metrics server is installed, run:
kubectl top podIf you get an error such as error: Metrics API not available, you need to install a Metrics server.
About this task
To activate Pod autoscaling for Data Services and Routes, configure the dynamic-engine-environment chart. This configuration also allows setting the maximum number of replicas (Pod instances) that the HPA can scale up to.
Procedure
Results
After successful deployment, the Dynamic Engine environment can automatically increase Pod instances according to the workload variations when running Data Services and Routes, up to the configured maximum.
In Talend Management Console, the status of this environment becomes Ready, confirming that it is ready to run tasks or plans.
What to do next
The autoscaling settings configured at the environment level apply to all Data Service and Route tasks running on that environment by default. However, you can override these environment-level settings using run profile-level autoscaling parameters. This allows you to customize scaling behavior for specific tasks through the run profile-level autoscaling parameters, without changing environment-wide settings.
Run profile-level autoscaling parameters are notably useful when:
- A particular Data Services or Routes task has different performance characteristics and requires different scaling thresholds than the environment default.
- You want to limit scaling for resource-intensive tasks to prevent cluster overload.
- A task is critical and requires minimum replicas higher than the environment default.
To override environment-level autoscaling for a task, create or update a run profile with the desired autoscaling parameters as JVM arguments (for example: -K8S:AutoscalingMaxReplicas=5). Any task that uses that run profile will then inherit these customized settings, which override the corresponding environment-level configuration.
For a complete list of autoscaling parameters and their corresponding run profile arguments, see Configuring autoscaling parameters at the task level.