Rescaling your Flink job
Rescaling
A running Job can be rescaled by changing the resources assigned to it. Immerok Cloud will restart the Job automatically with a new parallelism based on the resources provided. A rescaling operation does incur downtime. The length of this downtime depends primarily on the size of the application state. Rescaling can happen as quickly as a second for Jobs with small state.
Rescaling with scale
Rescaling via rok scale
is the easiest way to rescale a running Job.
_13$ rok get job my-job -o yaml_13apiVersion: core/v1alpha1_13kind: Job_13zone: shared-aws-eu-west-1_13metadata:_13 name: my-job_13 project: default_13spec:_13 flinkVersion: 1.16_13 artifactRef:_13 name: my-job-artifact_13 resources:_13 rpus: 5
_3$ rok scale job my-job --rpus 7_3_3✔ Triggered rescaling for Job "my-job" to 7 RPUs.
_13$ rok get job my-job -o yaml_13apiVersion: core/v1alpha1_13kind: Job_13zone: shared-aws-eu-west-1_13metadata:_13 name: my-job_13 project: default_13spec:_13 flinkVersion: 1.16_13 artifactRef:_13 name: my-job-artifact_13 resources:_13 rpus: 7
Rescaling with apply
If you manage your Jobs with rok apply
in a declarative way rescaling just translates to editing your Job and applying the configuration with rok apply
.
_3$ rok apply -f job.yaml_3_3✔ Job "my-job" has been updated.