Downside of using CNAME in CDN?

Is there any speed penalty if we use CNAME to make the CDN URLs pretty eg. instead of using the default CDN URL?

Slight but as long as you have a long TTL on the CNAME it will get cached by the various ISP’s DNS resolvers.

Having a CNAME basically adds another query that the DNS servers need to do - they need to query your DNS resolver first and then go query the CDN provider’s resolver.

We’re generally talking on the order of 10’s of ms but it could be slower depending on what you are using for your site’s DNS and how well distributed it is.

Thanks Patrick. I am using DNSMadeEasy, so I guess the delay shouldn’t be all that much, but it is an overhead nonetheless.