The cross-zone high availability (HA) feature protects your services from interruptions caused by a single-zone failure within a region, ensuring business stability. Realtime Compute for Apache Flink supports this feature in cross-zone namespaces within subscription workspaces. This topic describes how to use cross-zone HA and stop billing for cross-zone CUs.
How it works
A Realtime Compute for Apache Flink workspace supports two types of compute resources based on CU type: single-zone and cross-zone. These correspond to two types of namespaces, with the following differences:
For a single-zone namespace, Realtime Compute for Apache Flink assigns the optimal compute zone within your selected region. Zones within the same region are interconnected through an internal network. The compute layer transparently schedules jobs across zones and pools inventory to improve resource elasticity.
A cross-zone namespace provides cross-zone HA. If the zone where a job is running fails, the job is automatically rescheduled to a healthy zone in the same region. This failover prevents service interruptions caused by a single-zone failure and ensures job continuity and high availability.
Usage notes
End-to-end high availability requires your upstream and downstream systems to also be highly available.
When Realtime Compute for Apache Flink accesses external resources across zones, it can introduce millisecond-level latency. The network latency service-level agreement (SLA) between zones in the same region is under 3 ms. For details, see Average network latency between zones in a region. This latency is usually not an issue for upstream and downstream services, except for Tair (Redis-compatible). We recommend that you evaluate your business requirements to determine if this latency is acceptable before you enable cross-zone HA.
For workspaces with hybrid billing that have cross-zone HA enabled, the system prioritizes the recovery of jobs on fixed compute resources during a failure. Jobs on elastic compute resources are recovered on a best-effort basis, with no additional charges incurred.
Regions and billing
Currently, only Intel X86 subscription workspaces (including those with hybrid billing) support the purchase of cross-zone compute resources. These resources are priced higher than single-zone resources. For a list of supported regions and pricing details, see Subscription.
If your workspace uses the pay-as-you-go billing method, you can first convert it to a subscription plan and then see Method 2 and Method 3.
Workspaces with the Cross-zone deployment model do not support conversion to the pay-as-you-go mode.
Enable and use cross-zone HA
Method 1: Purchase a cross-zone workspace
When you purchase a workspace on the Intel X86 architecture with the Billing Method set to Subscription, set the Deployment Model to Cross-zone. Then, specify the Resource Quota for the cross-zone CU type and select vSwitches from two different zones. For more information, see Purchase a workspace.
After the workspace is created, a cross-zone namespace named
workspace-name-default-hais automatically created.Click the name of the target cross-zone namespace to open it. You can then create and run jobs within the namespace.

Method 2: Add cross-zone CUs and a namespace
If you did not select Cross-zone as the Deployment Model when you created the workspace, you can add cross-zone CUs later and create a cross-zone namespace.
Add cross-zone CUs.
In the Actions column of the target workspace, choose .
Click Add CU Type.
Enter the target number of CUs for the other zone and select a vSwitch.
Only vSwitches created in the target VPC and in zones supported by Flink are displayed. If no vSwitches are available for selection, you can create a vSwitch.
ImportantAfter adding a cross-zone CU to a workspace, ensure that the switch CIDR block for the new zone is added to the whitelists of upstream and downstream systems to avoid network access issues.

After you accept the agreement, click OK to complete the payment.
Add a cross-zone namespace. For more information, see Add a namespace.
Create and run a job in a cross-zone namespace. For more information, see Enter the destination namespace.
Method 3: Enable cross-zone HA for a single-zone namespace
Log on to the Realtime Compute for Apache Flink console.
Ensure that the number of unallocated cross-zone CUs in the workspace is greater than the number of CUs allocated to the target namespace.
If the workspace does not have enough unallocated cross-zone CUs, add more cross-zone CUs to the workspace. You can also click Resource Allocation for another cross-zone namespace to release its excess cross-zone CUs. For more information, see Adjust resources.
Click Enable Cross-zone HA in the Actions column for the target namespace, and then click OK.

After clicking OK, the single-zone CUs in the namespace are replaced with an equal number of cross-zone CUs. The original single-zone CUs are returned to the workspace. You can then reallocate these CUs or scale down resources to reduce costs.
For example, assume workspace A has 5 single-zone CUs and 5 cross-zone CUs. Namespace A is allocated 2 of the single-zone CUs. When cross-zone HA is enabled for namespace A, the 2 allocated single-zone CUs are returned to the unallocated single-zone resource pool in workspace A. At the same time, 2 cross-zone CUs are reallocated to namespace A. The following table compares the workspace resources before and after this change.
Status
Single-zone (Allocated/Purchased)
Cross-zone (Allocated/Purchased)
Before
2/5
0/5
After
0/5
2/5
Create and run jobs in the converted cross-zone namespace. For more information, see Go to the target namespace.
Disable the cross-zone high availability feature for a namespace
You can follow these steps to disable the cross-zone high availability (HA) feature for a namespace, regardless of how the namespace was created. Disabling the cross-zone HA feature does not stop billing. For information about how to stop billing, see Unsubscribe from cross-zone CUs.
Log on to the Realtime Compute for Apache Flink console.
Make sure the number of unallocated single-zone CUs in the workspace is greater than or equal to the number of CUs allocated to the cross-zone namespace.
If the workspace does not have enough unallocated single-zone CUs, add single-zone CUs to the workspace, or click Resource Allocation for another single-zone namespace to release excess single-zone CUs. For more information, see Adjust resources.
In the Actions column of the target namespace, click Disable Cross-zone HA, and then click OK.
The resource changes that occur when you disable the cross-zone HA feature are the same as when you enable it. The namespace becomes available for use after the feature is completely disabled.
Release cross-zone CUs
No cross-zone fees are incurred when a workspace has 0 Assigned cross-zone CUs. Release cross-zone CUs as follows:
Log on to the Real-time Compute console.
Confirm that the cross-zone HA feature is disabled for all namespaces in the workspace.
For more information, see Disable the cross-zone HA feature for a namespace.
Set the target number of cross-zone CUs for the workspace to 0.
In the Actions column of the target workspace, choose .
Change the number of Target CUs for cross-zone to 0.
Select the agreement, click OK, and complete the payment.
Related documents
To learn how to adjust namespace resources, see Scale resources.
For details about how to change a vSwitch, see Change a vSwitch.