Updated on 2023-11-23 GMT+08:00
Why Is the CDN Cache Hit Ratio Low?
Possible causes:
- The HTTP header has been incorrectly configured. As a result, the content cannot be cached. Check the Cache-Control settings of your origin server. If cache-control is set to no-cache, no-store, max-age=0, or private on the origin server and Origin Cache Control is enabled on CDN, CDN cannot cache resources, resulting in a low hit ratio.
- The cache time to live (TTL) you have configured is too short. In this case, CDN points of presence (PoPs) will not be able to cache data. They will frequently pull the fresh content from the origin server. As a result, the CDN cache hit ratio will be low.
- A large portion of the content on your origin server is dynamic. CDN mainly accelerates static content (such as CSS, JS, HTML, TXT files, pictures, and video). Dynamic content (such as ASP, JSP, PHP files, APIs, and dynamic interaction requests) is typically pulled from the origin server.
- The cache is being refreshed too frequently. After a cache purge task is submitted, the cached content on CDN PoPs will be forced to expire. If a user accesses a URL after it has been refreshed, CDN pulls content from the origin server, and the hit ratio will decrease.
- If your origin server has a large number of resources and does not support range requests, CDN PoPs will pull complete resources, increasing the pull traffic and affecting the traffic hit ratio.
- The website is not accessed very frequently. Content cached on the CDN PoPs may be deleted due to infrequent access. As a result, the fresh content is pulled when it is accessed, and the CDN cache hit ratio will decrease.
- An exception occurred on your origin server. In this case, troubleshoot your origin server first.
- HEAD requests are sent. By default, CDN does not cache HEAD requests. Even if cache prefetch is performed, HEAD requests are not cached.
Parent topic: Cache Settings
Cache Settings FAQs
- Will the Cache on CDN PoPs Be Updated in Real Time?
- Does Huawei Cloud CDN Support Regular Expressions for Cache Policy Setting?
- Does CDN Support Batch Configuration of Cache Policies for Acceleration Domain Names?
- Does CDN Cache Status Codes 404 and 403?
- What Are the Default Cache Rules? Can I Modify the Cache TTL?
- Why Is the Cache Hit Ratio of a Domain Name with Whole Site Acceleration Greater Than 0?
- Does the Path in Cache Settings Refer to a Web Address or File Path on the Server?
- Why Is the CDN Cache Hit Ratio Low?
- Why Am I Able to Access and Download a File After It Is Deleted from an OBS Bucket?
- How Do I Cache the Homepage (Root Directory)?
- How Do I Check Whether a Cache Is Hit?
- Why Is the Latest Content Inaccessible Even When the Cache TTL Is Set to 0?
- Does Huawei Cloud CDN Support Caching octet-stream Stream Files?
- Why Are Certain Files Not Downloadable Even Though They Have Not Expired (365 Days)?
- How Do I Configure Cache for Resources That Do Not Need to Be Cached?
- Can I Specify a Directory and Filename Extension for Caching?
- When Hotlinking Happens, Will the Previous Cache Still Exist After I Change the Domain Name?
- All Resources Are Preheated, and the Cache TTL Is One Year. Why Is the Requested Content Still Being Pulled from the Origin Server?
- How Do I Synchronize Content Cached on CDN PoPs with That on the Origin Server?
- Why Does a Cache Rule Not Take Effect?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore