The cross-zone high availability feature can effectively prevent service interruptions caused by faults in a single zone and ensure service stability. This feature is used to support high availability in different zones of the same region. Realtime Compute for Apache Flink allows you to enable cross-zone high availability for subscription workspaces. This way, you can implement cross-zone high availability for namespaces that use cross-zone compute units (CUs). This topic describes how to enable cross-zone high availability, use cross-zone CUs, and stop the billing for cross-zone high availability.
Feature overview
You can configure two types of CUs for a workspace: single-zone CUs and cross-zone CUs. If you do not enable cross-zone high availability for a workspace, you can create and use only namespaces for which single-zone CUs are configured in the workspace. If the zone to which the workspace belongs fails, deployments in the workspace cannot run as expected. After you add cross-zone CUs to enable cross-zone high availability for a workspace, you can create a namespace that uses single-zone or cross-zone CUs in the workspace. Deployments in the namespace that uses cross-zone CUs are resumed in the secondary zone that you select if the zone in which the deployments are run fails. This effectively prevents service interruptions caused by the faults in a single zone and ensures the continuity and high availability of deployments.
Limits
Only subscription workspaces that use the Intel x86 architecture processor support the cross-zone high availability feature. After this feature is enabled, you cannot switch the billing method of the workspaces to pay-as-you-go.
You can select only one primary zone and one secondary zone for each workspace.
Cross-zone high availability is supported only in specific regions. For more information, see the "Unit prices in different regions" section of the Subscription topic. If you have questions about or requirements on regions and zones, contact technical support. For more information, see Technical support.
Usage notes
To implement full-link high availability, you must ensure that your upstream and downstream systems are highly available.
You must purchase cross-zone CUs in a workspace. You can create different namespaces in the workspace and assign single-zone CUs or cross-zone CUs for the namespaces. Take note that only deployments that are created and started in the namespaces whose CU type is cross-zone CUs support cross-zone high availability. The following figure shows the namespace whose CU type is cross-zone CUs.
After cross-zone high availability is enabled for a workspace, the workspace is automatically upgraded to use the new network architecture. For more information about the new network architecture and the impact of using the new network architecture, see Network architecture upgrade.
ImportantAfter cross-zone high availability is enabled for your workspace, the network architecture of your workspace is changed even if the deployments in the workspace do not immediately start from the secondary zone. Before you enable cross-zone high availability, make sure that the CIDR blocks of the vSwitch to which the secondary zone belongs are added to the whitelists of the upstream and downstream storage systems. This helps prevent network access failures.
To implement cross-zone high availability for a Realtime Compute for Apache Flink workspace whose data storage type is Object Storage Service (OSS) bucket, make sure that the associated bucket is of the zone-redundant storage type. For more information about how to configure the storage type of OSS buckets, see Change the storage redundancy type of a bucket. If the OSS bucket is not of the zone-redundant storage type, the state data cannot be accessed when a zone to which the workspace belongs becomes unavailable. As a result, Realtime Compute for Apache Flink deployments may not be started with states.
NoteIn the scenario where a workspace contains a namespace in which the cross-zone high availability feature is enabled and a namespace that uses single-zone CUs, if you change the type of the OSS bucket associated with the workspace to the zone-redundant storage type, the storage costs may increase. You can create a Realtime Compute for Apache Flink workspace for the namespace in which the cross-zone high availability feature is enabled and associate the workspace with the OSS bucket of the zone-redundant storage type. This helps achieve the highest availability at the lowest cost. For more information about OSS storage fees, see Storage fees.
After the cross-zone high availability feature is enabled, a latency of milliseconds may occur when Realtime Compute for Apache Flink accesses external upstream and downstream resources across zones. To determine whether to enable cross-zone high availability, we recommend that you evaluate the acceptance of latency based on your business requirements.
The unit price of CUs in a cross-zone namespace is slightly higher than the unit price of CUs in a single-zone namespace. For more information, see Subscription.
Enable and use the cross-zone high availability feature
Method 1: Enable the cross-zone high availability feature when you purchase a workspace
If you enable the cross-zone high availability feature when you purchase a Realtime Compute for Apache Flink workspace, a namespace that uses single-zone CUs and a namespace that uses cross-zone CUs are automatically generated in the workspace. The name of the single-zone namespace is in the Workspace name-default format. The name of the cross-zone namespace is in the Workspace name-default-ha format.
Enable cross-zone high availability when you purchase a Realtime Compute for Apache Flink workspace.
On the page on which you purchase a Realtime Compute for Apache Flink workspace, select Whether to enable cross zones, configure the Resource Quota parameter, and then select the primary and secondary zones and vSwitches. For more information, see Activate Realtime Compute for Apache Flink.
Click the name of the desired cross-zone namespace in your workspace. Create a draft and run the deployment for the draft in the cross-zone namespace.
Method 2: Add cross-zone CUs and create a namespace that uses the cross-zone CUs
If you do not purchase cross-zone CUs when you purchase a Realtime Compute for Apache Flink workspace, you can add cross-zone CUs and create a namespace that uses the cross-zone CUs.
Add cross-zone CUs.
Find the desired workspace and choose
in the Actions column.In the Reconfigure Workspace Resources dialog box, click Add CU Type.
Enter a value in the Target CU column for the cross-zone CU type, specify a secondary zone, and then select a vSwitch for the secondary zone.
Read the terms of service, select Terms of Service, and then click OK to complete the payment.
Create a namespace that uses cross-zone CUs. For more information, see the "Create a namespace" section of the Manage namespaces topic.
Create and run a deployment in the namespace that uses cross-zone CUs. For more information about how to go to the namespace, see the "Go to a namespace" section of the Manage namespaces topic.
Method 3: Enable the cross-zone high availability feature for a namespace that uses single-zone CUs
Log on to the Realtime Compute for Apache Flink console.
Make sure that the number of unallocated cross-zone CUs in the current workspace is greater than or equal to the number of allocated CUs in the namespace for which you want to enable cross-zone high availability.
If the number of unallocated cross-zone CUs in the workspace is less than the number of allocated CUs in the namespace, you can add cross-zone CUs for the workspace. You can also click Reconfigure Resources in the Actions column of a cross-zone namespace and change the value in the Resource Reconfiguration (CUs) column to release cross-zone CUs. For more information about how to reconfigure resources, see Reconfigure resources.
Find the desired namespace and click Turn on high availability in the Actions column. In the dialog box that appears, click OK.
After you click OK, Realtime Compute for Apache Flink automatically allocates cross-zone CUs to the namespace and returns the original single-zone CUs to the workspace as unallocated CUs. The number of allocated cross-zone CUs is equal to the number of the original single-zone CUs. Example:
Before you enable the cross-zone high availability feature: In a workspace, the number of purchased single-zone CUs is 5, the number of allocated single-zone CUs is 2, the number of purchased cross-zone CUs is 5, and the number of allocated cross-zone CUs is 0.
After you enable the cross-zone high availability feature: In the workspace, the number of purchased single-zone CUs is 5, the number of allocated single-zone CUs is 0, the number of purchased cross-zone CUs is 5, and the number of allocated cross-zone CUs is 2.
Create and run a deployment in the namespace. For more information, see the "Go to a namespace" section of the Manage namespaces topic.
Disable the cross-zone high availability feature for a namespace
You can perform the following operations to disable the cross-zone high availability feature for a namespace that you create by using one of the preceding methods. After you disable the cross-zone high availability feature, billing for cross-zone CUs does not stop. For more information about how to stop billing for cross-zone CUs, see the Unsubscribe from cross-zone CUs section of this topic.
Log on to the Realtime Compute for Apache Flink console.
Check whether all deployments in the namespace that you want to manage are canceled.
Check whether the number of unallocated single-zone CUs in the current workspace is greater than or equal to the number of allocated CUs in the current namespace that uses cross-zone CUs.
If the number of unallocated single-zone CUs in the workspace is less than the number of allocated CUs in the namespace, you can add single-zone CUs for the workspace. You can also click Reconfigure Resources in the Actions column of a single-zone namespace and change the value in the Resource Reconfiguration (CUs) column to release single-zone CUs. For more information about how to reconfigure resources, see Reconfigure resources.
Find the desired namespace and click Turn off high availability in the Actions column. In the dialog box that appears, click OK.
After you disable the cross-zone high availability feature, the resource change policies are the same as those when you enable the cross-zone high availability feature. After the feature is completely disabled, you can use the namespace as expected.
Unsubscribe from cross-zone CUs
If the number of allocated cross-zone CUs in a workspace is 0, you are not charged for cross-zone CUs. To unsubscribe from cross-zone CUs, perform the following steps:
Log on to the Realtime Compute for Apache Flink console.
Find the desired workspace and click Delete in the Actions column for all namespaces that use cross-zone CUs in the workspace. Then, click OK.
ImportantYou cannot delete a namespace in which a deployment is running.
After you delete a namespace, deployments and data in the namespace cannot be restored. Proceed with caution.
Change the value in the Target CU column for the cross-zone CU type of the workspace to 0.
Find the desired workspace and choose
in the Actions column.In the Reconfigure Workspace Resources dialog box, change the value in the Target CU column for the cross-zone CU type of the workspace to 0.
Read the terms of service, select Terms of Service, and then click OK to complete the payment.
References
You can reconfigure resources of namespaces. For more information, see Reconfigure resources.
After cross-zone high availability is enabled for a workspace, you can modify the vSwitches of the zones to which the workspace belongs. For more information, see Modify a vSwitch.