To enable autoscaling for Temporal services, you need to update the values/temporal-values.yaml configuration. This step-by-step guide shows how to configure autoscaling parameters for various Temporal components, including frontend, history, matching, and worker.
Update the Autoscaling Configuration in temporal-values.yaml for Each Temporal Service
Frontend Configuration:
Modify the replicaCount, autoscaling, and resources sections as follows:
frontend:
replicaCount: 1 # recommended minimum config 2
autoscaling:
enabled: true # Set to 'true' to enable autoscaling(by default false)
minReplicas: "1"
maxReplicas: "5" # Adjust this based on your requirements
targetCPU: "75" # Target CPU utilization percentage
targetMemory: "75" # Target Memory utilization percentage
resources:
requests:
cpu: 250m
memory: 512Mi
Setting autoscaling.enabled to true activates autoscaling for the frontend service. Adjust minReplicas and maxReplicas according to your expected load and resource availability.
History Configuration:
Update the history service settings:
history:
replicaCount: 1 # Should be set to value of numHistoryShards / 512
autoscaling:
enabled: false # autoscaling for history not recommended
resources:
requests:
cpu: 500m # recommended 1000m
memory: 1048Mi # recommended 2048
This configuration ensures the history service can scale within the specified limits based on CPU and memory usage.
Matching Configuration:
Configure the matching service:
matching:
replicaCount: 1 # Recommended min config 2
autoscaling:
enabled: true # Enable autoscaling for matching
minReplicas: "1" # Same as replicaCount
maxReplicas: "5" # Adjust this based on your requirements
targetCPU: "75" # Target CPU utilization percentage
targetMemory: "75" # Target Memory utilization percentage
resources:
requests:
cpu: 250m
memory: 512Mi
Autoscaling is controlled by the resource thresholds specified. You can adjust these thresholds based on the demand expected on the matching service.
Worker Configuration:
Configure the worker service:
worker:
replicaCount: 1 # Recommended min config 2
autoscaling:
enabled: false # Enable autoscaling for worker
minReplicas: "1" # Same as replicaCount
maxReplicas: "1" # Adjust this based on your requirements
targetCPU: "75" # Target CPU utilization percentage
targetMemory: "75" # Target Memory utilization percentage
resources:
requests:
cpu: 200m
memory: 512Mi
Autoscaling is controlled by the resource thresholds specified. You can adjust these thresholds based on the demand expected on the worker service.
Update the Autoscaling Configuration in nected-values.yaml for Each Nected Service like vidhaan-executer and vidhaan-router.