This topic describes how to use Global Accelerator (GA) to accelerate an IPv4 service for IPv6 clients.

Limits

Only IPv6 clients in the following regions can connect to GA: China (Qingdao), China (Beijing), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), China (Hong Kong), Singapore (Singapore), US (Virginia), and Germany (Frankfurt). Make sure that your IPv6 clients belong to the preceding regions.

Scenarios

The following scenario is used in this topic. The headquarters of Company A is located in the US (Silicon Valley) region. The headquarters deploys an IPv4 web service on a self-managed server in the US (Silicon Valley) region. The employees in the China (Hong Kong) region all use IPv6 clients. Due to business development, the employees in the China (Hong Kong) region want to use IPv6 clients to access the IPv4 web service in the US (Silicon Valley) region. In addition, they want to reduce network latency, network jitters, and packet loss that are caused by unstable Internet connections. Scenarios

You can use GA to resolve these problems and accelerate content delivery. The IPv6 clients in the China (Hong Kong) region can connect to the access point in the same region through an accelerated IP address. Then, client requests are forwarded to the global network of Alibaba Cloud, converted to IPv4 requests, and then distributed to endpoints based on intelligent routing.

Procedure

Procedure

Step 1: Purchase a GA service bundle

You can enter the information about the web service in the GA console. After you enter the information, the system generates a list of recommended services. The list includes a GA instance and a basic bandwidth plan.

  1. Log on to the Global Accelerator console.
  2. In the upper-right corner of the Instances page, click Purchase Guide.
    Note If this is the first time that you use the GA service, skip this step.
    Purchase Guide
  3. In the Enter the required information to generate a list of recommended services section, enter the required information and click Generate Service List.
    Parameter Description
    Acceleration Area Select the region that requires acceleration.

    In this example, China (Hong Kong) is selected.

    Service Region Select the region where the backend servers are deployed.

    In this example, US (Silicon Valley) is selected.

    ICP Filing Specify whether you have applied for an Internet Content Provider (ICP) number for the domain name of the web service.

    In this example, No is selected.

    Note All websites must obtain an ICP number before they are allowed to provide services to users in mainland China. For more information, see What is an ICP filing?.
    Server Area Specify whether the web service is deployed on Alibaba Cloud.

    In this example, Off Alibaba Cloud is selected.

    Peak Bandwidth Range Enter the bandwidth required during peak hours. Unit: Mbit/s.

    In this example, 2 is entered.

    Maximum Concurrent Connections The maximum number of concurrent connections that a GA instance supports. When the number of existing concurrent connections reaches the upper limit, new connection requests are dropped.

    In this example, 5 Thousand is selected.

  4. In the Recommended Service List section, click Generate Service List after you confirm the information.
    Generate Service List
  5. On the buy page, set the following parameters and click Buy Now to complete the payment.
    Parameter Description
    Term Select the subscription duration.
    Specification Select a specification for the GA instance.

    In this example, Small I (Specification Unit) is selected.

    Bandwidth Type Select a bandwidth type for the basic bandwidth plan.

    In this example, Premium is selected.

    Peak Bandwidth Select the bandwidth limit of the basic bandwidth plan.

    In this example, 2 Mbit/s is selected.

Step 2: Add an acceleration area

After you purchase a GA instance, you can add an acceleration area, specify the region where users are located, and then allocate bandwidth resources to the region.

  1. On the Instances page, find the GA instance that you purchased in Step 1 and click the instance ID.
  2. On the instance details page, click the Acceleration Areas tab. Then, click the Asia Pacific tab and click Add Region.
  3. In the Add Acceleration Area dialog box, specify the following acceleration area information and click OK.
    Parameter Description
    Region Select the region where the users who want to use the acceleration service are located.

    In this example, China (Hong Kong) is selected.

    Bandwidth Allocate bandwidth to the region.

    In this example, 2 Mbit/s of bandwidth is allocated.

    Internet Protocol Select the Internet protocol that is used by the users to connect to GA.

    In this example, IPv6 is selected.

    After the acceleration area is added, GA assigns an IPv6 address that serves as an accelerated IP address to each region in the acceleration area. The IPv6 address is used for service acceleration. Accelerated IP address

Step 3: Add a listener and an endpoint group

A listener checks for connection requests and then distributes the requests to backend servers based on the specified protocol and ports. Each listener is associated with an endpoint group. You can associate an endpoint group with a listener by specifying the region to which you want to distribute network traffic. After you associate an endpoint group with a listener, traffic is distributed to the optimal endpoint in the associated endpoint group.

  1. On the instance details page, click the Listeners tab and then click Add Listener.
  2. On the Configure Listener & Protocol wizard page, specify the following listener information and click Next.
    Listener
    Parameter Description
    Listener Name Enter a name for the listener.

    The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

    Protocol Select the protocol of the listener.

    In this example, TCP is selected.

    Port Number Specify a listener port. The port is used to receive and forward requests to endpoints. Valid values: 1 to 65499.

    In this example, the value is set to 80.

    Client Affinity Specify whether to enable client affinity. If client affinity is enabled, requests from the same client are forwarded to the same endpoint when the client connects to a stateful application.

    In this example, Source IP Address is selected.

  3. On the Configure Endpoint Group wizard page, specify the following endpoint group information and click Next.
    Parameter Description
    Endpoint Group Name Enter a name for the endpoint group.

    The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

    Region Select the region where you want to create the endpoint group. The servers that the IPv6 clients want to access must be deployed in the specified region.

    In this example, US (Silicon Valley) is selected.

    Backend Service Specify whether the backend service is deployed on Alibaba Cloud or outside Alibaba Cloud.

    In this example, Off Alibaba Cloud is selected.

    Preserve Client IP Specify whether to preserve client IP addresses. After you enable this feature, backend servers can retrieve client IP addresses.

    In this example, client IP address preservation is disabled.

    Endpoint Endpoints are destinations of client requests. To add an endpoint, specify the following parameters:
    • Backend Service Type: In this example, Custom IP Address is selected.
    • Backend Service: Enter the IP address of the backend service that you want to accelerate.
    • Weight: Enter the weight of the endpoint. Valid values: 0 to 255. GA distributes network traffic to endpoints based on their weights.
    Notice If the weight of an endpoint is set to 0, GA stops distributing network traffic to the endpoint. Proceed with caution.
  4. On the Confirm wizard page, confirm the configurations of the listener and endpoint, and then click Submit.

Step 4: Configure DNS

You must configure DNS to route requests destined for the IPv4 service to GA. Select one of the following methods to configure DNS:
  • Add an AAAA record that maps the domain name for the IPv4 service to the IPv6 address allocated by GA.
  • Add a CNAME record that maps the domain name for the IPv4 service to the CNAME allocated by GA.
  1. Log on to the Alibaba Cloud DNS console.
  2. On the Manage DNS page, find the domain name and click Configure in the Actions column to go to the DNS Settings page.
  3. Click Add Record, set the following parameters, and then click Confirm.
    • Add an AAAA record
      Parameter Description
      Type Select AAAA.

      The AAAA record is used to map the domain name for the IPv4 service to the IPv6 address allocated by GA.

      Host Enter the prefix of the accelerated domain name.
      • If the domain name is www.aliyun.com, set the prefix to www.
      • If the domain name is aliyun.com, set the prefix to @.
      • If the domain name is *.aliyun.com, set the prefix to *.
      • If the domain name is mail.aliyun.com, set the prefix to mail.
      ISP Line Select Default from the drop-down list.
      Value Enter the accelerated IPv6 address that is allocated by GA.
      TTL Select 10 minute(s) from the drop-down list.

      The time-to-live (TTL) period of the DNS record on the DNS server.

    • Add a CNAME record
      Parameter Description
      Type Select CNAME from the drop-down list.

      The CNAME record is used to map the domain name for the IPv4 service to the CNAME allocated by GA.

      Host Enter the prefix of the accelerated domain name.
      • If the domain name is www.aliyun.com, set the prefix to www.
      • If the domain name is aliyun.com, set the prefix to @.
      • If the domain name is *.aliyun.com, set the prefix to *.
      • If the domain name is mail.aliyun.com, set the prefix to mail.
      ISP Line Select Default from the drop-down list.
      Value Enter the CNAME that is allocated by GA.

      You can find the CNAME on the Instances page.

      TTL Select 10 minute(s) from the drop-down list.

      The TTL period of the DNS record on the DNS server.

      Note
      • New CNAME records immediately take effect. If you modify the CNAME record, the record takes effect within 72 hours after it is modified.
      • After you add a CNAME record, it requires about 10 minutes for the system to update the status in the console. The message "You must add the CNAME record" may appear on the Domain Names page.

Step 5: Verify the acceleration performance

  1. Open the command prompt on an IPv6 client in a region that belongs to the acceleration area. In this example, the IPv6 client is deployed in the China (Hong Kong) region.
  2. Run the following command to check whether the IPv6 client can access the IPv4 service as normal:
    curl -g http://[<Accelerated IP address assigned by GA>]
    Note In this example, the IPv6 client runs Alibaba Cloud Linux 2. The command that is used to run the test may vary based on the operating system. For more information, refer to the user guide of the operating system.
    The test result shows that the IPv6 client can access the IPv4 service in the US (Silicon Valley) region as normal. Access IPv4 service
  3. Run the following command to test the network latency:
    curl -o /dev/null -s -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" -g "http[s]://<Accelerated IP address assigned by GA>"
    In the command:
    • time_connect: the period of time that it takes to establish a TCP connection. Unit: seconds.
    • time_starttransfer: the start time of data transfer. The start time refers to the amount of time from when the client sends a request to the backend server to when the first byte is sent to the client. Unit: seconds.
    • time_total: the total connection time. The total connection time refers to the amount of time from when the client sends a request to when the client receives the last byte from the backend server. Unit: seconds.
    The test result shows that the network latency of data transmission from the China (Hong Kong) region to the US (Silicon Valley) region is reduced.
    Figure 1. Network latency before acceleration
    Before acceleration
    Figure 2. Network latency after acceleration
    After acceleration
    Note The performance of the GA acceleration service may vary based on your workloads.