Why Is the Cache of a Resource Inconsistent on Different PoPs?
Symptom
When users in different regions access a resource of your domain name with CDN acceleration enabled, CDN PoPs return different resource versions to them.
Possible Causes
- You have enabled URL parameter filtering on the CDN console and configured the origin server to return resources based on URL parameters.
Resources cached on CDN PoPs may be different when the URL parameters carried in the first request to the PoPs are different. When requests for the same resource are sent to different PoPs, the returned data is different.
- The cache is not refreshed after the resource on the origin server is updated.
If the resource is updated on the origin server but the access URL of the resource does not change, when a user accesses the resource, the PoP returns the cache. The PoP will pull the updated resource from the origin server and cache it only when the original cache expires. In addition, the cache eviction time varies by the access popularity in different regions. If the cache on some PoPs has been evicted, when a user accesses the resource, the PoP will pull the resource of the latest version from the origin server. If the cache on some PoPs is still available, the cache is directly returned to the user. As a result, the old and new versions may coexist in the cache of PoPs.
Solutions
- Do not use URL parameter filtering of CDN and the function of returning different resource versions based on URL parameters of the origin server at the same time.
Check whether the origin server is configured to return different resource versions based on URL parameters. If yes, perform the following operations:
- Log in to Huawei Cloud console. Choose .
The CDN console is displayed.
- In the navigation pane, choose .
- Click the target domain name, click the Cache Settings tab, and check whether URL parameter filtering is enabled.
- If URL parameter filtering is enabled for the domain name, disable it.
- Log in to Huawei Cloud console. Choose .
- If the resource is updated on the origin server, purge the cache on CDN.
- Log in to Huawei Cloud console. Choose .
The CDN console is displayed.
- Choose in the navigation pane, click the Purge tab, and enter the URL or directory of the resource.
- Log in to Huawei Cloud console. Choose .
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.