After you create an Anycast EIP, you can associate it with endpoints. The endpoints must be Classic Load Balancer (CLB) instances that are deployed in virtual private clouds (VPCs) or elastic network interfaces (ENIs). CLB is formerly known as Server Load Balancer (SLB). Then, clients can use the Anycast EIP to access resources on Alibaba Cloud over the Internet.

Background information

Endpoints that support Anycast EIPs

Endpoint Description Scenario
CLB instances
  • A CLB instance that is associated with an Anycast EIP can distribute requests to backend Elastic Compute Service (ECS) instances based on forwarding rules.
  • Clients can access a CLB instance that is associated with an Anycast EIP over the Internet.
You can associate an Anycast EIP with a CLB instance if your application needs to handle a large amount of user traffic and you want to ensure the high availability of the application. After you associate an Anycast EIP with a CLB instance, the applications that are attached to the CLB instance can provide stable and reliable Internet-facing services. For more information about CLB, see What is CLB?.
ENIs
  • An ENI that is associated with an Anycast EIP can be used to access the Internet or receive requests from the Internet. The same path is used for inbound and outbound traffic.
  • An ENI that is associated with an Anycast EIP cannot distribute network traffic to specific backend servers or perform load balancing.
Note Before you associate an Anycast EIP with an ENI, make sure that the ENI is associated with an ECS instance.
You can associate an Anycast EIP with an ENI if the application that uses the ENI needs to access the Internet or receive requests from the Internet.

Map access points to endpoints in different regions

Mappings
You can associate an Anycast EIP with multiple endpoints in different regions, and then map access points to the endpoints. When you create mappings, take note of the following items:
  • You can select an endpoint that is associated with your Anycast EIP and specify the endpoint as the default endpoint. After you specify the default endpoint, requests from access points that are not mapped to endpoints are automatically routed to the default endpoint.
  • If you do not specify the default endpoint, the system selects the first endpoint that is associated with the Anycast EIP as the default endpoint. Requests from access points that are not mapped to endpoints are automatically routed to the default endpoint.
  • After you disassociate the default endpoint from the Anycast EIP, the system randomly selects an endpoint as the default endpoint.
  • After you associate an Anycast EIP with multiple endpoints in different regions, you can map access points to the endpoints.
  • Anycast EIPs do not support automatic failovers. When an endpoint is down, the Anycast EIP cannot fail over to another endpoint.

Prerequisites

  • A CLB instance that is deployed in a VPC or an ENI is created. For more information, see Create a CLB instance or Create an ENI.
  • If you want to associate an Anycast EIP with an ENI, make sure that the ENI is associated with an ECS instance.

Associate an Anycast EIP with an endpoint

  1. Log on to the Anycast EIP console.
  2. On the Anycast Elastic IP Addresses page, find the Anycast EIP that you want to associate and click Manage in the Actions column.
  3. On the Bound Instances tab of the Anycast EIP details page, click Associate with Resource.
  4. In the Associate Anycast EIP with Resource dialog box, set the following parameters and click OK.
    Parameter Description
    Instance Type Select the type of endpoint with which you want to associate the Anycast EIP.
    • CLB Instance (default)
    • ENI
    Notice
    • If you select CLB Instance, you can associate the Anycast EIP only with a CLB instance that is deployed in a VPC.
    • When you associate an Anycast EIP with a CLB instance that is deployed in a VPC, the CLB instance is unable to distribute internal traffic. As a result, service interruptions may occur. We recommend that you associate an Anycast EIP with a CLB instance during off-peak hours or switch the workloads to another CLB instance before you perform this operation.
    Resource Group Select the resource group to which the endpoint belongs.
    Set as Default Specify whether to set the endpoint as the default endpoint. Requests from access points that are not mapped to endpoints are routed to the default endpoint.
    • Yes (default): specifies the endpoint as the default endpoint.
    • No: does not specify the endpoint as the default endpoint.
    Region Select the region where the endpoint is deployed.

    The following regions are supported: China (Hong Kong), Singapore (Singapore), US (Silicon Valley), US (Virginia), or Germany (Frankfurt) region..

    Areas Select access points. You can map access points to endpoints.

    You can select access points only if you set Set as Default to No.

    Select an instance to associate. Select the endpoint with which you want to associate the Anycast EIP.

More operations

Section Description
Change access points If an Anycast EIP is associated with endpoints in different regions, you can change the access points that are mapped to an endpoint. You can add or remove access points based on your business requirements.
  1. On the Bound Instances tab of the Anycast EIP details page, find the endpoint that you want to manage and click Areas in the Actions column.
  2. In the Areas dialog box, add or remove access points based on your business requirements and click OK.
    • To add access points, select access points from the Access Points list and click Add access points.
    • To remove access points, select access points from the Selected Access Points list and click Remove access points.
Disassociate an Anycast EIP from an endpoint If your endpoint no longer needs to communicate with the Internet, you can disassociate the Anycast EIP from the endpoint. After you disassociate an Anycast EIP from an endpoint, you are still charged a configuration fee for the Anycast EIP.
  1. On the Bound Instances tab of the Anycast EIP details page, find the endpoint from which you want to disassociate the Anycast EIP and click Unbind in the Actions column.
  2. In the message that appears, confirm the information and click OK.

References