Maxcompute cross border access acceleration solution

Time:2021-11-28

Introduction:Maxcompute cooperates with global acceleration services to provide a set of efficient and stable cross-border access acceleration solutions for maxcompute customers with cross-border access needs.

Maxcompute cooperates with global acceleration services to provide a set of efficient and stable cross-border access acceleration solutions for maxcompute customers with cross-border access needs.

background information

A large number of maxcompute’s overseas customers often need cross-border mutual visits due to the inconsistency between the developer’s location and the data source region. When using idea / odpscmd / SDK for control job submission, data download and other requests, the network jitter is relatively large, and problems such as RST and resetting the connection may occur.

Specific scenarios include two types:

  • Office is in the mainland, but the corresponding maxcompute terminal node is overseas. For example, it is necessary to visit the terminal node in Mumbai from Hangzhou. If you directly use the public network of office to call the corresponding API for business creation, the direct use of the public network link is very unstable.
  • Office is overseas, but the corresponding maxcompute terminal node is in the mainland. For example, the terminal node that needs to visit Shanghai from Mumbai also has a similar call.

Example: under normal network conditions, when visiting India (Mumbai) terminal node from Hangzhou, the network connection times out.

Maxcompute cross border access acceleration solution

Solution

Scheme architecture

Maxcompute cross border access acceleration solution

Technical principle

This solution relies on global acceleration services.

Global accelerator GA (Global accelerator) is a global network acceleration service. Global accelerator will allocate an acceleration IP for each access acceleration region. Client traffic enters the Alibaba cloud acceleration network from the nearest access point through the acceleration IP. After entering the Alibaba cloud acceleration network, global acceleration can intelligently select routes and automatically complete network scheduling, and then deliver the client’s network access requests to the best terminal node to avoid public network congestion and reduce delay. For details, seeGlobal acceleration official document

Implementation process

prerequisite

  • Maxcompute project created.

For more operations on creating maxcompute items, seeCreate maxcompute project

Configure global accelerator

Users can according to the global acceleration serviceOfficial documentsConfigure. The configuration steps of this scheme are as follows:

Step 1: create a global acceleration instance

  1. Sign inGlobal acceleration management console
  2. stayInstance listPage, clickCreate acceleration instance
  3. On the purchase page, configure the global acceleration instance according to the following information, and then clickBuy now
    1. Select the specifications for purchasing global acceleration instances. Selection of this schemeSmallType II
    2. Select the length of time to purchase the global acceleration instance. Selection of this scheme1 month

Please refer to for specific specifications, types and expensesGlobal accelerated product pricing

After successful purchase, return to the management console. After the instance is created, the system will automatically assign a CNAME to resolve the domain name of the back-end service to be accelerated. Please record the CNAME used for subsequent domain name resolution.

Maxcompute cross border access acceleration solution

Step 2: purchase and bind the basic bandwidth package

The basic bandwidth package provides global public network access bandwidth and Alibaba cloud intranet transmission bandwidth. To achieve global acceleration, you need to purchase the basic bandwidth package and bind the basic bandwidth package to the global acceleration instance.

  1. stayInstance listPage, clickPurchase basic bandwidth package
  2. On the purchase page, configure the basic bandwidth package, and then clickBuy nowComplete the payment.

Please refer to for specific specifications, types and expensesGlobal accelerated product pricing

⚠️ Note: to improve the quality of network access from overseas regions to mainland China, you must submit it firstCross border product use applicationOtherwise, you cannot configure access to foreign regions.

Selection of this schemeEnhanced acceleration bandwidth, 20MB

Maxcompute cross border access acceleration solution

  1. returnInstance listPage, click the created global acceleration instance ID, and clickBandwidth packet managementTab, inBasic bandwidth packetArea, find the target basic bandwidth package, and clickoperationListedbinding

Maxcompute cross border access acceleration solutionMaxcompute cross border access acceleration solution

After the binding is successful, the status of the basic bandwidth packet changes toavailable

Step 3: add acceleration area

After purchasing the basic bandwidth package, you can add an acceleration area, specify the region of users accessing the back-end service, and allocate the acceleration bandwidth.

Complete the following to add an acceleration area.

  1. stayInstance listPage, find the created global acceleration instance, and click the instance ID.
  2. single clickAcceleration regionTab,Add access region
  3. stayAdd acceleration areaDialog box, configure according to the following information.
    • region: select the region of the accelerator user. Selection of this schemeChina (Hangzhou)
    • bandwidth: select the regional bandwidth of the acceleration service. Input of this scheme20 Mbps。
    • IP address protocol: select the IP address protocol for the user to access the global accelerator service. Selection of this schemeIPv4

 Maxcompute cross border access acceleration solution

  1. single clickdetermine。 After successful addition, global acceleration will allocate an acceleration IP in the access region to accelerate user access.

Step 4: configure listening

Listening is responsible for checking connection requests. The system forwards inbound connections from the client based on the port and protocol you specify.

  1. On the instance details page, clickmonitorTab, and then clickAdd listening
  2. stayConfigure listening and protocolOn the configuration wizard page, configure listening according to the following information.
    1. Listening name: enter the name of the listener.
    2. agreement: select the protocol type to listen to. Customers can select according to business scenarios. Selection of this schemeTCP
    3. port: input of this scheme80
    4. Client affinity: this scheme is selectedclose

For more information, refer toMonitoring overview

Maxcompute cross border access acceleration solution

  1. single clicknext stepConfigure the terminal node group.
  2. Access control:Different policies can be configured based on the form of white list / blacklist to accurately control client requests and manage request forwarding.

explain  At present, the access control white list is open. If you need to use it, please submit a work order.

Step 5: set the terminal node group

Each listener is associated with a terminal node group. The terminal node group is associated with the listener by specifying the region to distribute traffic. After association, global acceleration will allocate traffic to the best terminal node in the terminal node group associated with listening.

Complete the following operations to set the terminal node group.

  1. stayNode group nameEnter the node group name in the area.
  2. Select the to which the terminal node group belongsregionThat is, the region of the target server to be accessed. Selection of this schemeIndia
  3. choiceBackend service deploymentAlibaba cloud or non Alibaba cloud. Selection of this schemeFEIALiyun
  4. Select enable or disable keep client source IP. In this scheme, select enable keep client source IP.
  5. Configure the terminal node.
    1. Back end service type: SelectCustom domain name
    2. Back end service: enter the maxcompute extranet endpoint to be accelerated. Input of this schemeservice.ap-south-1.maxcompute.aliyun.com
    3. weight: enter the weight of the terminal node. The weight value range is 0 ~ 255. Global acceleration routes traffic to the terminal node proportionally according to the weight you configure.
      be carefulIf the weight of a terminal node is set to 0, global acceleration will stop distributing traffic to the terminal node. Please be careful.
  6. single clicknext stepView the listening and terminal node group configuration, and click OKnext step

Maxcompute cross border access acceleration solution

Bind host locally

After adding the global acceleration configuration, find the acceleration IP under the instance information – acceleration area tag.

Maxcompute cross border access acceleration solution

After that, you must resolve the corresponding domain name to the CNAME assigned by global acceleration through local binding host to switch the business traffic to global acceleration.

Host add example:

1xx.xx.x.xx6 (accelerated IP) service.ap-south-1.maxcompute.aliyun.com (back-end service domain name)

Delay test

  1. Open the command line window in the computer connected to the region (Hangzhou, China in this scheme).
  2. Execute the following command to view the packet delay.Curl - O / dev / null - S - W "time_connect:% {time_connect} \ ntime_starttransfer:% {time_starttransfer} \ ntime_total:% {time_total} \ n" "HTTP [S] // [: < port >]"Of which:
    • time\_ Connect: connection time, from the beginning to the completion of establishing a TCP connection.
    • time\_ Starttransfer: start transfer time. The time it takes to get to the back-end server to respond to the first byte after the client makes a request.
    • time\_ Total: total connection time. The time it takes for the client to respond to the session to the back-end server after the client makes a request.
  1. After testing, the use of global acceleration significantly reduces the delay of users in Hangzhou, China visiting India (Mumbai) endpoint.

Maxcompute cross border access acceleration solution

Using maxcompute

After configuration, you can enter the maxcompute client or web console to connect to the maxcompute data source in source mode. At this time, maxcompute has successfully achieved efficient and stable cross-border access.

Maxcompute cross border access acceleration solution

Safety protection related issues

In order to effectively defend against DDoS attacks, this scheme can be used in combination with advanced anti DDoS products to effectively defend against DDoS attacks. For details, please refer to:Cross regional web security accelerationDDoS configuration in.

Copyright notice:The content of this article is spontaneously contributed by Alibaba cloud real name registered users, and the copyright belongs to the original author. Alibaba cloud developer community does not own its copyright or bear corresponding legal liabilities. Please refer to Alibaba cloud developer community user service agreement and Alibaba cloud developer community intellectual property protection guidelines for specific rules. If you find any content suspected of plagiarism in the community, fill in the infringement complaint form to report. Once verified, the community will immediately delete the content suspected of infringement.