I always want know the rank of CDNs on Webpagetest, below I share my queries . I’m using all the tests starting from November of 2014.
SELECT cdn, num, ROUND(ratio*100) as percent FROM (
SELECT cdn, COUNT(cdn) as num, RATIO_TO_REPORT(num) OVER() ratio FROM (
SELECT CASE
WHEN _cdn_provider IN ('')
THEN 'None'
ELSE 'CDN'
END as cdn
FROM httparchive:runs.2014_11_01_requests,
httparchive:runs.2014_11_15_requests,
httparchive:runs.2014_11_01_requests_mobile,
httparchive:runs.2014_11_15_requests_mobile
) GROUP BY cdn
) ORDER BY percent DESC
I thought that CDN was more used, and I hoped that CDNs would be above 30%. Considering only HTTP requests on CDN’s, it’s a surprise for me that google is first. Could Google be a CDN provider?
SELECT provider, round(100*ratio) as percent, num
FROM (SELECT REGEXP_REPLACE(_cdn_provider,r'^$', 'None') as provider, count(*) as num, RATIO_TO_REPORT(num) OVER() ratio
FROM httparchive:runs.2014_11_01_requests,
httparchive:runs.2014_11_15_requests,
httparchive:runs.2014_11_01_requests_mobile,
httparchive:runs.2014_11_15_requests_mobile
WHERE _cdn_provider != ''
GROUP BY provider
)
ORDER BY num desc LIMIT 10
Then, what’s the rank hostnames inside Google as CDN?
SELECT req_host, count(req_host) as num
FROM httparchive:runs.2014_11_01_requests,
httparchive:runs.2014_11_15_requests,
httparchive:runs.2014_11_01_requests_mobile,
httparchive:runs.2014_11_15_requests_mobile
WHERE _cdn_provider = 'Google'
GROUP BY req_host
ORDER BY num DESC
LIMIT 20
I’m curios. 3rd party objects are Google hosted like videos, jquery/angularjs, etc. could they be CDN hosted?
Then, discard Google and HTTP requests without CDN. … Considering only CDNs that users “pay” to delivery content, the rank is:
SELECT provider, round(100*ratio) as percent, num
FROM (SELECT REGEXP_REPLACE(_cdn_provider,r'^$', 'None') as provider, count(*) as num, RATIO_TO_REPORT(num) OVER() ratio
FROM httparchive:runs.2014_11_01_requests,
httparchive:runs.2014_11_15_requests,
httparchive:runs.2014_11_01_requests_mobile,
httparchive:runs.2014_11_15_requests_mobile
WHERE _cdn_provider != 'Google' AND _cdn_provider != ''
GROUP BY provider
)
ORDER BY num desc