Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
The module does not seem to check whether an external CDN is alive, mapped resources return 404 rather than a fallback to using origin located resources.
Whether or not an external CDN is alive, the Stats continue to show that resources are being served from the CDN
Any help and your time appreciated,
Cheers
Comments
Comment #1
OriginalSauce CreditAttribution: OriginalSauce commentedUpdated priority to major, as this breaks the site.
Comment #2
OriginalSauce CreditAttribution: OriginalSauce commentedIf this functionality is not available without a patch, I would've thought in theory it is possible to use cdn_pick_server to check whether the external cdn is running, and if not either return the origin address, or indeed a fake/subdomain cdn?
Will test...
Comment #3
Wim LeersAre you using an Origin Pull CDN?
Comment #4
OriginalSauce CreditAttribution: OriginalSauce commentedHi,
Yes, it is an external Origin Pull CDN.
As mentioned in my previous post, looking at the cdn pick server option, it is possible to code something to either ping/curl etc, to see if the CDN(s) is live. The downside, doing an extra check for every file would in practice, be way to expensive.
I suspect this hasn't been considered before, because it's popular to use the module with fake/subdomain, and the rare occasion for downtime on the larger CDN networks.
Still if this isn't something that is considered a bug, could you point me to the best place in the module code where I might add something myself?
Thanks Wim
Comment #5
Wim LeersPinging the external CDN every request, and potentially multiple domains, that is going to be very bad for performance. I'd advise against it. But yes, it is possible.