Tool Guide
  • Diagnostic Tool
    • Self-service debugging
  • Speed Test Tools
    • Real User Monitoring
  • Terraform
    • Overview
    • Installing and Configuring Terraform
    • Configuring Site Acceleration Through Terraform
    • Configuring Rule Engine Through Terraform
  • IP Location Query
このページは現在英語版のみで提供されており、日本語版も近日中に提供される予定です。ご利用いただきありがとうございます。

Self-service debugging

Feature Introduction

If you need to confirm whether the node cache rules, custom Cache Key, and other configurations currently configured in EdgeOne have taken effect for your resources, EdgeOne provides a self-service debugging tool to help you obtain node cache TTL, whether the resource is cacheable, Cache key, and other information, making it easy for you to debug your business configuration. After enabling self-service debugging, you can initiate a URL request from a specified client IP, carrying the EO-Debug-Headers: all header in the request, and view whether the resource is cached in the node, the corresponding Cache Key value, and cache time based on the returned response headers.



Usage Scenarios

If you have configured more complex cache rules and custom cache keys in the rule engine of the console, and need to verify whether the configuration is effective, you can use this feature for verification.

Directions

For example, the domain name www.example.com under the current site example.com has been configured to cache .jpg suffix files in EdgeOne nodes for 600 seconds; the cache Cache Key is configured to retain the specified parameter a as the cache key. After the configuration is completed, you need to verify whether the current configuration has taken effect, and you can follow the steps below to verify:
1. Log in to the EdgeOne console, click on the site list in the left menu bar, and click on the site to be configured in the site list.
2. On the site details page, click on Diagnostic Tools > Self-service Debugging.
3. On the self-service debugging page, click the "switch" to enable the self-service debugging feature.

4. After enabling the debugging mode, you need to set the validity period and the allowed client source. The time range is 1-365 days, with a default of 7 days. The client IP allows for the input of 100 entries, accommodating both IPv4 and IPv6 IP/IP segments. The notation 0.0.0.0/0 signifies the permission for all IPv4 clients to execute debugging, while ::/0 indicates the allowance for all IPv6 clients to carry out debugging.

5. Click Save, and the allowed client IPs can debug within the effective time.
6. Initiate a curl request for verification from the specified client IP source in a Mac/Linux environment, for example:
curl -voa 'http://www.example.com/test.jpg?a=1' -H 'EO-Debug-Headers: all'。The request result is as follows:

In the response headers, you can see the corresponding Cache Key, cache status, and cache time for this request, which is consistent with the configuration in the example, indicating that the current configuration has taken effect.

Related References

When the self-service debugging mode is enabled, the debug header explanations in the response are as follows:
Header Name
Configurations
Meaning of the returned value
EO-Debug-Status
Indicates whether the self-service debugging mode is enabled.
on: activated, and the request client IP is within the allowlist & the request time is within the validity period;
off: Off, or activated but the request time is beyond the validity period;
forbidden: activated, but the request client IP is not in the allowlist.
EO-Debug-Cacheable
The Request URL of this request, according to the configured EdgeOne node cache TTL, the final cacheable status of the Request URL resource in EdgeOne nodes.
yes:cacheable content
no: non-cacheable content
EO-Debug-CacheKey
The Request URL of this request, according to the custom Cache key, the final Cache key generated for the Request URL resource in EdgeOne nodes.
For example: www.example.com/test.jpg a=1, indicating the Cache Key generated for the Request URL resource in EdgeOne
EO-Debug-CacheTTL
The Request URL of this request, according to the configured EdgeOne node cache TTL, the final cache TTL duration of the Request URL resource in EdgeOne nodes.

List values, including numbers and time units. d stands for days, h stands for hours, m stands for minutes, and s stands for seconds, for example:
3d0h0m0s means the cache TTL is 3 days;
0d0h5m0s means the cache is 5 minutes;
0d0h0m5s means the cache is 5 seconds.