Find CDN images for testing HTTP/2 Prioritization

There is a new version of the test for support of HTTP/2 prioritization that can test any origin as long as there is an image served over HTTP/2 from that origin (optimally in the range of 100 KB).

The HTTP Archive data set is a perfect source for finding images that meet the testing requirements and also has the detected CDN information so we can find images across every CDN for testing how well each CDN supports HTTP/2 prioritization. Since HTTP/2 support is optional for some CDN’s, it is important that we filter for only images that were served over HTTP/2 in the size range we are looking for:

SELECT 
    JSON_EXTRACT_SCALAR(payload, '$._full_url') as url,
    JSON_EXTRACT_SCALAR(payload, '$._bytesIn') as size
FROM
    [httparchive:requests.2018_12_15_desktop]
WHERE
    JSON_EXTRACT_SCALAR(payload, '$._protocol') = "HTTP/2" AND
    JSON_EXTRACT_SCALAR(payload, '$._contentType') LIKE "image/%" AND
    INTEGER(JSON_EXTRACT_SCALAR(payload, '$._bytesIn')) > 90000 AND
    INTEGER(JSON_EXTRACT_SCALAR(payload, '$._bytesIn')) < 110000 AND
    JSON_EXTRACT_SCALAR(payload, '$._cdn_provider') = "Cloudflare"
LIMIT 20

That will give you 20 candidate images to pick from to use for the testing (only one is actually needed). Just repeat for each CDN (or site) that you want to test.

WARNING, you WILL get images that are “not safe for work”. The page data has an “adult” flag for each test that might be able to be joined with the request table to help filter the list automatically (won’t be perfect) but I generally found it easier to just increase the LIMIT until I found origins that looked like they were probably safe before selecting images to use for testing.

I ran the tests for most of the CDN’s that WebPageTest knows how to detect and added them to @andydavies’s status tracker and the results aren’t pretty.

2 Likes