All Products
Search
Document Center

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

Last Updated:Jan 12, 2024

In most cases, a Network Load Balancer (NLB) 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 NLB instance is deployed may encounter issues such as high 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 NLB instance to enable access through the nearest access point. This improves user experience.image..png

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 NLB instance, the NLB 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 NLB instance when the NLB instance is switched from an internal-facing instance to an Internet-facing instance, take note of the following items:

  • The following table describes the regions where you can associate Anycast EIPs with NLB instances.

    Area

    Region

    China

    China (Hong Kong)

    Asia Pacific

    Singapore

    Europe & Americas

    UK (London) and Germany (Frankfurt)

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

  • A newly created Internet-facing NLB instance is associated with EIPs by default. To associate Anycast EIPs with the NLB instance, perform the following steps:

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

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

  • NLB 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 the IPv6 addresses of dual-stack NLB instances. You can associate Anycast EIPs only with the IPv4 addresses of dual-stack NLB instances.

  • An Anycast EIP can be associated with an Application Load Balancer (ALB) instance or an NLB instance in only one region. For more information, see Limits on Anycast EIPs.

Prerequisites

Associate Anycast EIPs with an NLB instance

Internal-facing NLB Instance

If you have an internal-facing NLB instance and need to associate Anycast EIPs with the NLB instance, perform the following steps:

  1. Log on to the NLB console.
  2. In the top navigation bar, select the region where the NLB instance is deployed.

  3. On the Instances page, click the ID of the internal-facing NLB instance that you want to manage.

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

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

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

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

      • When you switch an NLB instance from Internet-facing to internal-facing or release the NLB 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 instructions to activate CDT.

Internet-facing NLB instance

If you have an Internet-facing NLB instance that is associated with EIPs and need to associate Anycast EIPs with the NLB instance, perform the following steps:

Note

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

公网绑定Anycast步骤

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

  1. On the Instances page, find the Internet-facing NLB instance that you want to manage and click its ID.

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

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

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

Step 2: Change the internal-facing NLB instance to an Internet-facing NLB instance and associate Anycast EIPs

  1. On the Instances page, click the ID of the internal-facing NLB instance that you want to manage.

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

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

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

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

      • When you switch an NLB instance from Internet-facing to internal-facing or release the NLB 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 instructions to activate CDT.

Impact on billing

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

ALB计费组成图

Billable item

Fee calculation

References

Instance fee

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

Instance fee

LCU fee

LCU fee = max{Number of LCUs for new connections, Number of LCUs for concurrent connections, Number of LCUs for data transfer, Number of LCUs for rule evaluations} × LCU unit price × Duration of usage (hours)

LCU fee

Internet data transfer fee

You are not charged Internet data transfer fees for internal-facing NLB instances. You are charged Internet data transfer fees for Internet-facing NLB instances. Internet-facing NLB instances use EIPs or Anycast EIPs to provide services over the Internet.

  • By default, a newly created NLB 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 NLB instance, you are charged configuration fees, Internet data transfer fees, and internal data transfer fees for the Anycast EIPs. For more information, see Billing.

References