Problem Description
My website is still slow after it’s connected to Tencent Cloud CDN.
Possible Reasons
You have not configured a CNAME record for the connected domain name at a DNS service provider, so the CDN acceleration service for the domain name is not in effect. Please check DNS. The resource URL is accessed for the first time after CDN activation, and it has not been prefetched before. Please prefetch the URL. Solutions
Check DNS
This example shows you how to run nslookup
to check the DNS record of a CDN acceleration domain name:
Run `nslookup` for the acceleration domain name
If the result domain name is not suffixed with dnsv1.com
as shown above, then the CDN acceleration service for your domain name is not in effect. Please check the CNAME record of the domain name at the DNS service provider as instructed in CNAME Configuration.
Check the node cache validity configuration
Log in to the CDN console, select Domain Management on the left sidebar, click Manage on the right of a domain name to enter its configuration page, and switch to the Cache Configuration tab to find the Node Cache Validity Configuration section.
Check the node cache rules of the resource: whether the validity is "0", too short, or is configured as "No Cache".
Access requests will be forwarded to the origin server if the request resources are not cached on nodes, in which case the acceleration is not effective. Please configure the cache validity as required by your business.
Check whether the header Cache-Control
is set as no-store/no-cache/private
for your origin server.
If it is, you need to enable Force Cache for the CDN nodes to cache resources as configured.
If Force Cache is not enabled and the header is configured as so, CDN nodes will not cache resources even the cache validity is configured.
Prefetch the URL
It is normal that the speed is slow when accessing a resource for the first time which has not been prefetched before. Please log in to the CDN console, click Purge and Prefetch on the left sidebar, and then submit the URL for prefetch. For more information, please see Prefetch Cache.
Optimize the website architecture
Requests for dynamic resources are always forwarded to the origin server to pull the latest resources, slowing the access speed. If your website has many dynamic resources, we recommend separating them from static resources and using CDN for your static resources only.
Was this page helpful?