You can associate an Anycast Elastic IP Address (Anycast EIP) with an Application Load Balancer (ALB) instance and use Anycast EIPs to provide services over the Internet. This topic describes how to associate an Anycast EIP with an ALB instance.
Benefits of Anycast EIP
- Ease of use
Anycast EIPs allow Internet access, which is similar to EIPs. Therefore, after you associate an Anycast EIP with an ALB instance, the ALB instance can use the Anycast EIP 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 your Internet-facing services from attacks. This provides an additional layer of security hardening for your backend servers.
- Stability and reliability
Each Anycast EIP supports connections from multiple PoPs. When one of the access points is down, network traffic is routed to another access point. This ensures the reliability of your services.
- Reduced network jitter
Anycast EIP helps your customers to connect to the nearest Alibaba Cloud PoP. Requests are delivered over the high-quality BGP bandwidth and global network provided by Alibaba Cloud to access the backend server with which the Anycast EIP is associated. This reduces network jitter over Internet connections.
Limits
- By default, you cannot associate an Anycast EIP with an ALB instance. To use this feature, log on to the Quota Center console, go to the Whitelist Quotas page, enter the quota ID
slb_user_visible_gray_label/anycast_eip
, and then apply for the privilege to use the feature. For more information, see Manage ALB quotas. - The following table describes the regions where you can associate Anycast EIPs with ALB instances.
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 and 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 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 an EIP by default. To associate an Anycast EIP, perform the following steps:
- Switch the ALB instance from Internet-facing to internal-facing.
- Switch the ALB instance from internal-facing to Internet-facing and associate an Anycast EIP with the ALB instance.
- ALB instances that are associated with Anycast EIPs cannot be associated with EIP bandwidth plans. 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. Note By default, the dual-stack feature of ALB is unavailable. To use this feature, log on to the Quota Center console. On the Whitelist Quotas page, enter the quota ID
slb_user_visible_gray_label/support_ipv6
and apply for the privilege to use the feature. For more information, see Manage ALB quotas.
Impacts on billing
Alibaba Cloud begins charging for an Anycast EIP after you associate the Anycast EIP with an ALB instance.

Billable item | Calculation formula | References |
---|---|---|
Instance fee | Instance fee = Instance unit price (USD/hour) × Duration of usage (hours) | Instance fees |
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 in hours | LCU fees |
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 to provide services over the Internet.
| |
Web Application Firewall (WAF) fee (optional) | After WAF protection is enabled for an ALB instance, you are charged WAF protection fees. 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 directly purchase a WAF-enabled ALB instance and activate a pay-as-you-go WAF 3.0 instance. |
Prerequisites
You have created an ALB instance. For more information, see Create an ALB instance.
Associate an Anycast EIP with an ALB instance
Internal-facing ALB instance
If you have an internal-facing ALB instance, and you want to associate an Anycast EIP with the ALB instance, perform the following operations:
- Log on to the ALB console.
- In the top navigation bar, select the region where the ALB instance is deployed.
- On the Instances page, find the internal-facing ALB instance, and then click the instance ID.
- On the Instance Details tab, find the Basic Information section, and click Change Network Type next to the Network Type parameter.
- In the Change Network Type dialog box, set IP Address Type to Anycast EIP. Select Purchase Anycast EIP from the Assign Anycast EIP drop-down list, or specify an available Anycast EIP, 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 ALB instance from Internet-facing to internal-facing or release the ALB instance, the associated Anycast EIP is automatically disassociated and released.
- You can view the parameters of an Anycast EIP in the Anycast EIP console.
- 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 ALB instance

Step 1: Change the Internet-facing ALB instance that is associated with an EIP to an internal-facing ALB instance
- On the Instances page, find the Internet-facing ALB instance, and then click the instance ID.
- On the Instance Details tab, find the Basic Information section, and click Change Network Type next to the Network Type parameter.
- In the Change Network Type message, confirm the impacts and click OK. It takes about 1 minute for the change to take effect. When the Network Type parameter 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 an Anycast EIP
- On the Instances page, find the internal-facing ALB instance, and then click the instance ID.
- On the Instance Details tab, find the Basic Information section, and click Change Network Type next to the Network Type parameter.
- In the Change Network Type dialog box, set IP Address Type to Anycast EIP. Select Purchase Anycast EIP from the Assign Anycast EIP drop-down list, or specify an available Anycast EIP, 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 ALB instance from Internet-facing to internal-facing or release the ALB instance, the associated Anycast EIP is automatically disassociated and released.
- You can view the parameters of an Anycast EIP in the Anycast EIP console.
- 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.