All Products
Search
Document Center

Server Load Balancer:Associate Anycast EIPs with an ALB instance to enable access through the nearest access point

Last Updated:Apr 02, 2024

In most cases, an Application Load Balancer (ALB) instance is associated with elastic IP addresses (EIPs) to provide Internet-facing services. However, EIPs are region-specific public IP addresses. Users who are not located in the region where the ALB instance is deployed may encounter issues such as high network latency. Anycast EIPs can be announced from all access points in an access area and are not limited by regions. You can associate Anycast EIPs with an ALB instance to enable access through the nearest access point. This improves user experience.

image

Introduction to Anycast EIPs

Anycast EIPs can be shared by multiple access point locations around the world to improve the availability of Internet connections. You can use Anycast EIPs to improve Internet access quality based on the stable Border Gateway Protocol (BGP) lines and the global transmission network of Alibaba Cloud.

An Anycast EIP is a public IP address that you can purchase and use as an independent resource. After you purchase an Anycast EIP, the system allocates a public IP address to the Anycast EIP. The public IP address can be announced from all access point locations. After you associate the Anycast EIP with an endpoint, user traffic can be routed from the nearest access point to Alibaba Cloud. Network traffic is automatically routed to the associated endpoint through the optimal route. You do not need to configure routes. This provides a consistent user experience when users in different regions access endpoints on Alibaba Cloud.

Note

We recommend that you use Anycast EIPs only to provide Internet-facing services. Third parties may use Anycast or similar technologies to provide services. If you use Anycast EIPs to access these services, exceptions may occur.

Advantages of Anycast EIPs over EIPs:

  • Ease of use: Similar to EIPs, Anycast EIPs allow Internet access. After you associate Anycast EIPs with an ALB instance, the ALB instance can use the Anycast EIPs to provide services over the Internet. No further configurations are required. This improves the efficiency of workload deployment.

  • High security: Anycast EIPs use cloud-native security technologies to protect Internet-facing services from attacks. This enhances the security of backend servers.

  • Stability and reliability: Each Anycast EIP supports connections from multiple POPs. When one of the POPs is down, network traffic is routed to another POP. This ensures the reliability of your services.

  • Reduced network jitters: Anycast EIPs allow you to connect to Alibaba Cloud through the nearest POP. You can use the high-quality BGP bandwidth and the global transmission network of Alibaba Cloud to access backend servers. This reduces network jitters for Internet connections.

Limits

If you want to assign Anycast EIPs to an ALB instance when the network type of the ALB instance is changed from internal-facing to Internet-facing, take note of the following items:

  • By default, you cannot associate Anycast EIPs with an ALB instance. To use this feature, log on to the Quota Center console, go to the Privileges page, enter the quota ID slb_user_visible_gray_label/anycast_eip, and then click Apply. For more information, see Manage ALB quotas.

  • The following table describes the regions where you can associate Anycast EIPs to an ALB instance.

    Area

    Region

    China

    China (Hong Kong)

    Asia Pacific

    South Korea (Seoul), Japan (Tokyo), Indonesia (Jakarta), Philippines (Manila), Singapore, Malaysia (Kuala Lumpur), India (Mumbai), and Thailand (Bangkok)

    Europe & Americas

    UK (London), US (Virginia), US (Silicon Valley), and Germany (Frankfurt)

  • The first time that you activate an Anycast EIP, Cloud Data Transfer (CDT) manages the billing of Internet data transfer and internal data transfer for the Anycast EIP. Follow the on-screen instructions to activate CDT. For more information, see Purchase an Anycast EIP.

  • When you create an Internet-facing ALB instance, the instance is associated with EIPs by default. To associate Anycast EIPs with the ALB instance, perform the following steps:

    1. Change the ALB instance from Internet-facing to internal-facing.

    2. Change the ALB instance from internal-facing to Internet-facing and assign Anycast EIPs to the ALB instance.

  • ALB instances that are associated with Anycast EIPs cannot be associated with Internet Shared Bandwidth instances. The default maximum bandwidth of an Anycast EIP is 1,000 Mbit/s.

  • You cannot associate Anycast EIPs with IPv6 addresses of dual-stack ALB instances. You can associate Anycast EIPs only with IPv4 addresses of dual-stack ALB instances.

  • If an Anycast EIP is associated with an ALB instance or a Network Load Balancer (NLB) instance, the Anycast EIP is available only in one region. For more information, see Limits.

Prerequisites

  • An ALB instance is created. For more information, see Create an ALB instance.

  • After you associate Anycast EIPs with an ALB instance, you are charged for the Anycast EIPs. For more information, see Impact on billing.

Associate Anycast EIPs with an ALB instance

Internal-facing ALB instance

If you have an internal-facing ALB instance, and you want to associate Anycast EIPs with the ALB instance, perform the following operations:

  1. Log on to the ALB console.
  2. In the top navigation bar, select the region in which the ALB instance is deployed.

  3. On the Instances page, find the internal-facing ALB instance that you want to manage and click the instance ID.

  4. On the Instance Details tab, find Network Type in the Basic Information section, and click Change Network Type on the right side of the private IPv4 address.

  5. In the Change Network Type dialog box, set IP Address Type to Anycast EIP, select Purchase Anycast EIP or specify an existing Anycast EIP from the Assign EIP drop-down list, and then click OK.

    Note
    • You must assign Anycast EIPs to all zones in the list.

    • If you select Purchase Anycast EIP, take note of the following items:

      • When you change an ALB instance from Internet-facing to internal-facing or release the ALB instance, the associated Anycast EIPs are automatically disassociated and released.

      • You can view the parameters of an Anycast EIP in the Anycast EIP console.

  6. The first time that you activate an Anycast EIP, a Note message appears. Confirm the information, select the Terms of Service, and then click Activate Now to activate CDT.

    The billing of Internet data transfer and internal data transfer of Anycast EIPs is managed by CDT. When you purchase an Anycast EIP, you must follow the on-screen instructions to activate CDT.

Internet-facing ALB instance

If you have an Internet-facing ALB instance that is associated with EIPs, and you want to associate Anycast EIPs with the ALB instance, perform the following operations on the ALB instance:

Note

By default, a new Internet-facing ALB instance is associated with EIPs and uses the EIPs to provide services over the Internet.

image

Step 1: Change the Internet-facing ALB instance that is associated with EIPs to an internal-facing ALB instance

  1. On the Instances page, find the Internet-facing ALB instance, and then click the instance ID.

  2. On the Instance Details tab, find Network Type in the Basic Information section, and click Change Network Type on the right side of the public IPv4 address.

  3. In the Change Network Type message, confirm the impacts of the change and click OK.

    It takes about 1 minute for the change to take effect. When Network Type on the Instance Details tab displays Private, the network type is changed.

Step 2: Change the ALB instance from internal-facing to Internet-facing and associate Anycast EIPs

  1. On the Instances page, find the internal-facing ALB instance that you want to manage and click the instance ID.

  2. On the Instance Details tab, find Network Type in the Basic Information section, and click Change Network Type on the right side of the private IPv4 address.

  3. In the Change Network Type dialog box, set IP Address Type to Anycast EIP, select Purchase Anycast EIP or specify an existing Anycast EIP from the Assign EIP drop-down list, and then click OK.

    Note
    • You must assign Anycast EIPs to all zones in the list.

    • If you select Purchase Anycast EIP, take note of the following items:

      • When you change an ALB instance from Internet-facing to internal-facing or release the ALB instance, the associated Anycast EIPs are automatically disassociated and released.

      • You can view the parameters of an Anycast EIP in the Anycast EIP console.

  4. The first time that you activate an Anycast EIP, a Note message appears. Confirm the information, select the Terms of Service, and then click Activate Now to activate CDT.

    The billing of Internet data transfer and internal data transfer of Anycast EIPs is managed by CDT. When you purchase an Anycast EIP, you must follow the on-screen instructions to activate CDT.

Impacts on billing

After you associate Anycast EIPs with an ALB instance, you are charged for the Anycast EIPs.

image

Billable item

Fee calculation

References

Instance fee

Instance fee = Instance unit price (USD per hour) × Duration of usage (hours)

Instance fee

Load Balancer Capacity Unit (LCU) fee

LCU fee = max{Number of LCUs consumed by new connections, Number of LCUs consumed by concurrent connections, Number of LCUs consumed by data scrubbing, Number of LCUs consumed by rule evaluations} × Duration of usage (hours)

LCU fee

Internet data transfer fee

You are not charged Internet data transfer fees if you use internal-facing ALB instances. You are charged Internet data transfer fees only if you use Internet-facing ALB instances. Internet-facing ALB instances use EIPs or Anycast EIPs to provide services over the Internet.

  • By default, a newly created ALB instance is associated with EIPs. You are charged instance fees and data transfer fees for the EIPs. For more information, see Pay-as-you-go.

  • After you associate Anycast EIPs with an ALB instance, you are charged configuration fees, Internet data transfer fees, and internal data transfers for the Anycast EIPs. For more information, see Billing.

Web Application Firewall (WAF) protection fee (optional)

After WAF protection is enabled for an ALB instance, you are charged a WAF protection fee. WAF 3.0 supports the subscription and pay-as-you-go billing methods. For more information, see Subscription and Pay-as-you-go. If you do not have a WAF instance in your Alibaba Cloud account, you can purchase a WAF-enabled ALB instance and activate a pay-as-you-go WAF 3.0 instance.

References