All Products
Search
Document Center

Realtime Compute for Apache Flink:Cross-zone high availability

Last Updated:Mar 27, 2024

The cross-zone high availability feature can effectively prevent service interruptions caused by faults in a single zone and ensure service stability. Realtime Compute for Apache Flink allows you to enable cross-zone high availability for subscription workspaces. This topic describes how to enable cross-zone high availability, use cross-zone compute units (CUs), and stop the billing for cross-zone high availability.

Features

You can configure the following two types of CUs for a subscription workspace that is deployed in the Intel X86 architecture: 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. If you enable cross-zone high availability for a workspace, you can create namespaces that use single-zone CUs or cross-zone CUs based on your business requirements. For a namespace that uses cross-zone CUs, deployments in the namespace are resumed in the secondary zone that you select if the primary zone fails. This effectively prevents service interruptions caused by the failure of a single zone and ensures the continuity and high availability of deployments.

image

Limits

  • Only subscription workspaces that use the Intel X86 architecture processor support cross-zone high availability.

  • Cross-zone high availability is supported only in the following regions: China (Beijing), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Hong Kong), and China (Zhangjiakou).

  • You can select only one primary zone and one secondary zone for each workspace.

  • You cannot change a namespace that uses cross-zone CUs to a namespace that uses single-zone CUs.

  • You cannot switch the billing method of a subscription workspace for which cross-zone high availability is enabled to pay-as-you-go.

Precautions

  • 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.

    Important

    After 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, make sure that the Object Storage Service (OSS) bucket selected for the workspace is of the zone-redundant storage type. 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, Flink deployments may not be started with states. For more information about how to configure the storage redundancy type of OSS buckets, see Change the storage redundancy type of a bucket.

    Note

    If your OSS capacity usage is high and you are concerned about the additional costs caused by conversion of the storage redundancy type, you can create another Realtime Compute for Apache Flink workspace and associate the workspace with an independent OSS bucket of the zone-redundant storage type to build an independent high-availability architecture. 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 cross-zone high availability and use cross-zone CUs

After you add the cross-zone CU type for a workspace and allocate sufficient CUs, you can create a cross-zone namespace in the workspace and go to the cross-zone namespace to develop drafts.

Method 1: Enable cross-zone high availability when you purchase a workspace

If you enable cross-zone high availability when you purchase a Realtime Compute for Apache Flink workspace, a single-zone namespace and a cross-zone namespace 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.

  1. Enable cross-zone high availability when you purchase a Realtime Compute for Apache Flink workspace.

    When 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.

  2. Create a draft and run the deployment for the draft in the cross-zone namespace. For more information, see Go to a namespace.

Method 2: Enable cross-zone high availability for an existing workspace

If you do not enable cross-zone high availability when you purchase a Realtime Compute for Apache Flink workspace, you can perform the following steps to enable this feature for the workspace. If you enable cross-zone high availability for an existing workspace, a cross-zone namespace is automatically generated in the workspace. The name of the namespace is in the Workspace name-default-ha format.

  1. Enable cross-zone high availability during resource reconfiguration.

    1. Log on to the Realtime Compute for Apache Flink console.

    2. Find the desired workspace and choose More > Reconfigure Workspace Resources in the Actions column.

    3. In the Reconfigure Workspace Resources dialog box, click Add CU Type.

    4. Enter values in the Target CU column for the single-zone and cross-zone CU types, specify a secondary zone, and then select a vSwitch for the secondary zone.

      image

    5. Read the terms of service, select Terms of Service, and then click OK to complete the payment.

  2. Create a draft and run the deployment for the draft in the cross-zone namespace. For more information, see Go to a namespace.

Stop billing for cross-zone high availability

  1. Log on to the Realtime Compute for Apache Flink console.

  2. Find the desired workspace and click Delete in the Actions column for all cross-zone namespaces in the workspace. Then, click OK.

    Important
    • You 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.

  3. Change the value in the Target CU column for the cross-zone CU type of the workspace to 0.

    1. Find the desired workspace and choose More > Reconfigure Workspace Resources in the Actions column.

    2. 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.

    3. 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.