All Products
Search
Document Center

CDN:Deliver real-time logs to SLS

Last Updated:Apr 01, 2026

Alibaba Cloud CDN streams access logs from points of presence (POPs) worldwide to Simple Log Service (SLS) within 3 minutes of each request. Once the logs land in SLS, you can run queries and view preset dashboards to analyze traffic patterns, diagnose errors, and understand your audience — without downloading or preprocessing data yourself.

Prerequisites

Before you begin, ensure that you have:

Limitations

ConstraintDetails
Logstore typeStandard; default data retention of 7 days
Logstore write accessOnly real-time CDN logs can be written to the dedicated Logstore
Index modificationIndexes in a dedicated Logstore can be modified; if modification fails, contact technical support
Supported regionsChina (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Shenzhen), China (Hong Kong), Asia Pacific SE 1 (Singapore)
Query, alerting, and consumptionNo special limits

Real-time logs vs. offline logs

Real-time log deliveryOffline log
Log latencyWithin 3 minutesWithin 24 hours
Log analysis4 preset report templates + custom queries, powered by SLSExport to Object Storage Service (OSS) only; no built-in analysis

Create a real-time log delivery project

To store real-time logs, create a project in SLS and associate it with your accelerated domain name. See Configure real-time log delivery.

The following figure shows an example project with the name project-example, stored in the China (Hangzhou) region (cn-hangzhou).

创建实时日志推送project

View preset reports

CDN real-time log delivery includes four preset analysis reports. On the real-time log feature page, find your project and click View Reports to open the report templates.

CDN投递SLS适用场景

By default, reports show data across all domain names. Filter by domain name or URI to narrow the scope.

CDN投递SLS适用场景2

CDN basic data

Tracks overall CDN service quality and end-user access efficiency. Use this report to monitor cache performance and spot service quality issues as they happen.

MetricDescription
HealthPercentage of responses with normal status codes
Cache hit ratioAverage cache hit ratio, calculated by bytes
Request hit ratioHit ratio calculated by number of requests
Download speedAverage download speed of resources
Access latencyAverage latency for resource downloads
Access latency distributionPercentage breakdown by latency range
Request bandwidthBandwidth at 1-minute granularity
Access statusPercentage breakdown by response status code
Number of visits/visitorsPage views (PV) and unique visitors (UV)

CDN基础数据CDN基础数据2

CDN access errors

Pinpoints the source of CDN service errors when requests are failing — such as problematic URIs, origin server issues, unavailable nodes, or regional carrier problems.

MetricDescription
Top 10 error domain namesDomain names with the highest error percentages
Top 10 error URIsURIs with the highest error percentages
Request error percentage4xx and 5xx status codes over time
Error request status distributionCount and percentage per status code
Error statistics by carrier4xx and 5xx counts per carrier
Error statistics by province4xx and 5xx counts per province
Error details (4xx)Count and percentage per province and carrier
Error details (5xx)Count and percentage per province and carrier
Error distribution by client4xx and 5xx counts by User-Agent (UA)
CDN访问错误1

CDN hot spot resources

Shows which domain names, URIs, provinces, and carriers drive the most traffic. Use this report to assess the impact of campaigns and verify whether traffic spikes meet expectations.

MetricDescription
Top domain names by number of visitsDomain names with the highest visit share
Top domain names by download trafficDomain names with the highest download traffic share
Popular access URIsVisit count, unique visitors (UV), and total download volume per URI
Popular access sourcesReferer domain names with visit counts, UVs, and percentages
Nationwide visit statisticsVisit counts per province
Nationwide download speedAverage download speed per province
Statistics by provinceTotal visits, download traffic, and average download speed per province
Carrier traffic and speedTotal download volume and average download speed per carrier
Statistics by carrierTotal visits, download traffic, and average download speed per carrier
CDN热门资源1

CDN user composition

Breaks down who is accessing your content — by client type, province, and carrier. Also ranks users by access volume and download volume.

MetricDescription
Number of visitsTotal page views (PV)
Number of visitorsTotal unique visitors (UV)
Access region distributionVisit count and percentage per province
Access client statisticsVisit count and percentage per client type
Visit statistics by carrierVisit count and percentage per carrier
Top users by download volumeVisits, error visits, and download volume grouped by IP address
Top users by valid visitsVisits, error visits, and download volume by IP address, excluding 4xx and 5xx responses

Run custom log analysis

If the preset reports don't cover your use case, query the raw logs directly. On the real-time log feature page, find your project and click Log Analysis to open the query interface.

自定义日志分析

Enter a search statement in the search box for complex filter conditions. For simple filtering, click a field value in the Raw Logs panel on the left.

image

Example 1: Rank domain names by the number of 499 responses in the last 30 days.

return_code = 499| select domain , count(*) as c group by domain order by c desc limit 10
示例1

Example 2: Rank domain names by the number of 502 responses in the last 30 days.

return_code = 502| select domain , count(*) as c group by domain order by c desc limit 10
示例2

Example 3: Filter log data for a specific URI — for example, /cpu — in the last 30 days.

Click the URI field in the Raw Logs panel, then click /cpu to apply the filter.

image

Subscribe to report data

To receive periodic snapshots of a report template by notification, use the subscription feature.

  1. On a report page (for example, CDN basic data), click Subscribe in the upper-right corner, then click Create.

    订阅报表模板数据1

  2. Enter a Subscription Name, Frequency, and Global Time, then click Next.

    订阅报表模板数据2

  3. From the Notification List drop-down menu, select a notification method, fill in the required information, and click Submit. Supported notification methods: Email, webhook-DingTalk Robot, webhook-Lark Robot, webhook-WeCom Robot, and WeChat.

    订阅报表模板数据3

What's next

  • Preset report: CDN basic data

  • Preset report: CDN access errors

  • Preset report: CDN hot spot resources

  • Preset report: CDN user composition

  • Custom reports