This topic describes how to enable the Global Accelerator feature of Log Service.

Prerequisites

Procedure

After you enable HTTP acceleration for the target project, you can also configure the global accelerator feature for Logtail- and SDK-based log collection.

  1. Enable HTTP acceleration.
  2. Optional: Enable HTTPS acceleration.
    If you use HTTPS to access Log Service, ensure that HTTPS acceleration is enabled. For more information about how to configure HTTPS acceleration, see Enable HTTPS acceleration.
  3. Collect logs in Global Accelerator mode.
    • Logtail
      • If you want to install Logtail on a server after Global Accelerator is enabled, you can set the Logtail installation mode to Global Accelerator by following the instructions provided in Install Logtail in Linux. After the configuration, Global Accelerator automatically takes effect when Logtail collects logs.
      • If you have installed Logtail on a server before Global Accelerator is enabled, you can manually change the Logtail collection mode to Global Accelerator by following the instructions provided in Configure Logtail collection acceleration.
    • SDK, Producer, or Consumer

      If you use other methods such as the SDK, Producer, or Consumer to access Log Service, you can replace the configured endpoint with log-global.aliyuncs.com to achieve Global Accelerator.

Enable HTTP acceleration

  1. Log on to the DCDN console.
  2. In the left-side navigation pane, click Domain Names to go to the Domain Names page.
  3. Click Add Domain Name in the upper-left corner to go to the Add Domain Name page.
  4. Set DCDN Domain Name, specify other parameters as needed, and then click Next.
    Parameter Description
    DCDN Domain Name Enter project_name.log-global.aliyuncs.com. Replace project_name with your actual project name.
    Type Select Origin Domain.
    Domain Name Enter the public endpoint for the region where your project resides. For more information about endpoints, see Service endpoint.
    Port Select Port 80. If you need to use HTTPS acceleration, configure HTTPS by following the instructions provided in Enable HTTPS acceleration in this topic.
    Acceleration Region The default value is Mainland China.

    If you need to use Global Accelerator, submit a ticket to apply for a whitelist from DCDN.

    After your application is approved, you can select acceleration regions as needed.

    For more information about how to add domain names, see Add a domain name.

  5. Return to the Domain Names page as prompted.
    On the Domain Names page, you can view the CNAME of the added domain name.
  6. Enable Global Accelerator in the Log Service console.
    1. Log on to the Log Service console and click the name of the target project.
    2. On the Overview page, move your pointer over Global Acceleration in the Basic Information section and click Modify next to it.
    3. In the dialog box that appears, enter the CNAME of the accelerated domain name and click Enable Acceleration.

After you complete the preceding steps, Global Accelerator is enabled for Log Service.

Enable HTTPS acceleration

If you need to use HTTPS to access Log Service after HTTP acceleration is enabled, you can perform the following steps to enable HTTPS acceleration.

  1. Log on to the DCDN console. In the left-side navigation pane, click Domain Names to go to the Domain Names page.
  2. Click Configure in the Actions column corresponding to the target domain name.
  3. In the left-side navigation pane, click HTTPS Settings. On the page that appears, click Modify in the SSL Certificate section. The HTTPS Settings dialog box appears.
  4. Configure SSL Acceleration and Certificate Type.
    1. Enable SSL Acceleration.
    2. Set Certificate Type to Free Certificate.
    3. Select Agree to grant Alibaba Cloud permission to apply for a free certificate. and click OK.

For more information about HTTPS settings, see Configure an HTTPS certificate.

FAQ

  • How do I check whether the acceleration configuration takes effect?

    After the configuration is complete, you can access the accelerated domain name configured in the DCDN console to check whether the acceleration configuration takes effect.

    For example, if Global Accelerator is enabled for the test-project project, you can run the curl command to send a request to the accelerated domain name. The following response indicates that the acceleration configuration takes effect:

    $curl test-project.log-global.aliyuncs.com
    {"Error":{"Code":"OLSInvalidMethod","Message":"The script name is invalid : /","RequestId":"5B55386A2CE41D1F4FBCF7E7"}}
  • What do I do if the error message "project not exist" appears when I access an accelerated domain name configured in the DCDN console?
    This error is typically caused by an invalid origin domain name. You need to log on to the DCDN console and change the origin domain name to the public endpoint for the region of your project. For more information, see Service endpoint.
    Note The change in the origin domain name takes effect several minutes later.