Planning CDN Speed Tests: Provider Benchmarks vs. Tests of Your Own Website
Comparing static file downloads from two CDN providers and investigating a slow homepage are both CDN speed tests, but they are fundamentally different experiments. The first requires keeping content, requests, and cache conditions as consistent as possible to isolate differences in the delivery path. The second must retain the page’s login state, resource dependencies, and API requests to identify what actually blocks user actions.
Start by defining what you want to compare: the client-to-edge connection, delivery from the edge cache, or the complete response, including origin fetching and application processing. Also clarify whether the problem is a slow resource or a page that takes too long to become visible or usable. First verify that the test target returns the correct content, cache states are consistent, and you know whether the measurement includes redirects. Unless these three conditions are aligned, even detailed timing statistics may compare different things.
One distinction directly changes the testing order: If homepage delays mainly come from uncacheable APIs or browser scripts, expanding static file speed tests usually will not identify the main bottleneck. If the goal is to compare static delivery, differences in application response times during origin fetches should not be mixed into edge performance results. This distinction determines whether you should inspect the browser request waterfall before running tests from locations across the country.
This article uses the supplied MDN Overview of HTTP to explain requests, proxies, caching, and connection mechanisms. It provides test design and validation methods, not measured provider rankings. Specific cache response headers, traffic steering behavior, and product capabilities should be verified against the relevant configurations and logs.
Provider Benchmarks vs. Website Tests: What to Control and What to Retain
Provider benchmarking is primarily about controlling variables. To compare static delivery after a cache hit, use the same file content and consistent origin response logic, and make request methods, compression negotiation, and cache rules as equivalent as possible. Deliberately excluding login, database operations, and third-party APIs prevents differences in application processing from being mistaken for CDN differences.
Testing your own website requires the opposite approach: retain conditions that affect real users. For example, a homepage may work normally for anonymous visitors, while uncached HTML after login is delayed by session validation. Product images may download quickly, but a slow pricing API can still leave the page unusable. Removing all these factors and testing only a file makes the experiment easier to repeat but strips away its diagnostic value.
Comparison | Provider benchmark | Test of your own website |
|---|---|---|
Primary question | How does the same delivery task differ across configurations? | Which request or execution step blocks the actual user experience? |
Test content | Fixed resources that can be verified and reproduced | Actual entry pages, critical resources, and application APIs |
Cache conditions | Compare hits, misses, and revalidation separately | Retain the actual distribution, then investigate abnormal paths |
Connection conditions | Specify whether testing new or reused connections | Distinguish first visits from continued browsing within the site |
Success criteria | Expected status, content, and delivery completeness | Pages and user actions achieve their intended outcomes |
Scope of conclusions | Applies only to the resources and request conditions tested | Applies to the tested pages, user states, and workflows |
The two types of tests can follow one another, but they should not be presented as a single test. After comparing static delivery, you can apply candidate configurations to a test website and observe page performance. Clearly label this round as page validation rather than appending page load times directly to static resource rankings.
You can still test two services that use different origin architectures, image processing, or compression strategies, but the question then becomes “Which of these delivery configurations better suits this website?” The report should disclose those differences rather than claim to compare only the providers’ networks.
Test the Edge with Fixed Resources, Without Letting File Content Determine the Result
Small and Large Objects Answer Different Questions
Small CSS files, scripts, and icons are more sensitive to DNS resolution, connection establishment, and time to first byte. Large files are more likely to reveal sustained transfer performance, connection stability, and client bandwidth limits. A high download speed for one large file does not prove that a homepage’s many small resources will be equally fast. Likewise, a quick response for a tiny file does not establish sustained delivery performance for videos or installation packages.
For benchmarks, select a small set of resource types based on actual application needs rather than trying to include as many file types as possible. Once published, keep their content and versions fixed, and retain checksums and expected byte counts. If a file at the same path is overwritten during testing, some edges may still hold the old content, mixing version inconsistencies into timing differences.
Compression must also be part of the test conditions. Different content encodings can change the amount of text data transferred, while image optimization can change both format and quality. If the goal is to compare network delivery, align the encoding and response body as closely as possible. If the goal is to compare the final content users receive, optimization can be allowed, but visual or functional requirements must also be verified. A smaller file alone does not establish that a service is faster.
Do Not Treat HEAD, Range, and GET as Equivalent Samples
HEAD retrieves only response headers and does not transfer the body. The cache layer or origin may also handle it differently from GET. It is useful for preliminary checks of response information, not as a substitute for actual download timing. Range requests may trigger segmented caching, partial origin fetches, or different cache paths, so they should not be mixed with ordinary full-download results.
For the main comparison requests, specify the method, path, query parameters, and key request headers. If the application depends on Range requests, such as seeking during media playback, test that behavior separately and verify the returned range and body length. Parameters are not merely cosmetic: some configurations include them in the cache key, while others ignore or filter them. Similar-looking URLs do not necessarily produce the same caching behavior.
For your own website, select resources directly from the browser that genuinely affect the initial viewport or user interaction. A large background download may not be on the critical path at all, while a small synchronous script or configuration API may block subsequent page initialization. Prioritize by dependencies rather than byte count alone.
Test Cache Hits, Cold Requests, and Revalidation Separately
Confirm Cache Hits Rather Than Simply Running Twice
A faster second visit does not, by itself, prove a cache hit. The first request may include a DNS lookup and TLS handshake, while the second reuses a connection. The origin application may also have populated its own cache. Even a response header reporting a hit may refer to an intermediate cache rather than the layer you intend to observe.
When planning cache-hit tests, first confirm that the object is cacheable, how the cache key is constructed, and whether the response carries state that affects shared caching. Then repeat the same request and assess the result using provider-defined cache fields, response age information, and available logs. Fields and values vary across services; the meaning of HIT or MISS used by one provider cannot simply be applied to another.
Repeated requests may also be routed to different edge instances. Consecutive requests to the same URL are therefore only one prerequisite for a hit, not sufficient evidence. Record the remote address and request time for comparisons. If cache states keep fluctuating, first investigate routing, cache keys, or object expiration rather than immediately attributing the variation to network instability.
Random Query Parameters Alone Do Not Reliably Create a Cold Cache
Adding a random parameter to a URL may create a new cache key, have no effect, or trigger a configured cache bypass. A tester may believe they have measured an initial origin fetch when they have actually measured a hit for the same object or a pass-through path that the application would not normally use.
A more controlled approach is to publish test objects with identical content and unique paths in a dedicated test directory, after confirming that the path participates in the cache key. If using a purge function to create a cold state, limit it to test objects and record the conditions that indicate purge completion. Avoid affecting popular production resources. Prefetching also proves only that requests occurred under specified conditions; it does not guarantee that every edge users may reach already holds the object.
A miss does not necessarily mean that the request reached your origin. The edge may retrieve content from a parent cache, regional cache, or another intermediate layer. A slow cold request therefore has at least two investigation paths: if the corresponding request appears in origin logs, investigate origin fetching and the application. If it does not, continue checking intermediate-layer behavior and logging coverage rather than concluding that origin logs are missing.
Revalidation After Expiration Is a Separate Path
After an object expires, a cache layer may send a conditional request to check whether the content has changed. Even when the existing body is ultimately delivered, waiting for validation can increase time to first byte. This differs both from downloading new content in full and from a fresh cache hit that requires no validation wait, so label it separately.
If a site slows down only when objects expire, first investigate cache lifetimes, validation conditions, origin processing time, and whether many objects expire together, rather than changing client-side DNS resolution. Longer lifetimes may be worth considering for publicly cacheable, versioned static files. For entry files that change, design validation and deployment strategies around update requirements instead of extending every cache lifetime merely to improve benchmark scores.
Break Down Connection Timing with curl, but Do Not Add Cumulative Fields Together
Test the Same Final Resource and Retain Headers and Connection Details
The following command observes a single HTTPS GET request. Replace the example domain and path with an object you are authorized to test. Each separate execution starts a new curl process, but that does not mean the operating system’s or recursive resolver’s DNS cache has been cleared.
curl --noproxy '*' -sS --connect-timeout 5 --max-time 20 \
-H 'Accept-Encoding: identity' \
-D edge-headers.txt -o edge-body.bin \
-w 'code=%{http_code} ip=%{remote_ip} http=%{http_version} dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} first=%{time_starttransfer} total=%{time_total} bytes=%{size_download}\n' \
'https://www.example.com/assets/cdn-test.txt'
This explicitly bypasses configured curl proxies for testing ordinary direct outbound access. If actual users must use an enterprise proxy, create a separate test scenario that retains it rather than mixing the two sets of results. The connection and overall timeouts are example experimental limits, not product commitments, and should not be changed arbitrarily between services under test.
Accept-Encoding: identity requests an uncompressed representation to make content verification easier. You still need to inspect the actual response encoding and body. Real browsers normally negotiate compression, so create another request group that retains realistic encoding negotiation. Do not use transfer times from this command as a substitute for browser download performance.
When reviewing the output, check the status code, body, and byte count before the timings. HTTP 200 may return a login page, challenge page, or application error object. A fast response with the wrong body is not a valid successful sample. Use response headers to verify caching and content type, and the body file to verify actual content. Do not discard both and retain only a timing value.
What the Five Timing Fields Measure
For an ordinary direct HTTPS request with a new connection and no redirects, time_namelookup measures from the start until DNS resolution completes, time_connect until TCP connection establishment completes, time_appconnect until the TLS handshake completes, time_starttransfer until the first byte arrives, and time_total until the request finishes. Most are cumulative values measured from the same starting point, not independent stage durations.
The TCP connection phase can therefore be approximated as connect - dns, the TLS phase as tls - connect, and the period from the first byte to completion as total - first. The value first - tls describes only the wait between handshake completion and the first byte. It may include sending the request, edge processing, queuing, origin fetching, and the application response. It must not be labeled “origin processing time.”
These interpretations have specific prerequisites. A reused connection may involve no new handshake. A proxy changes the connection endpoint and the meaning of the timings. HTTP/3 uses QUIC, so its timing cannot continue to be interpreted as TCP stages. To compare a fixed protocol, explicitly specify the same client-supported protocol for each group and record what was actually negotiated. To observe default access behavior, retain negotiation and treat protocol differences as part of the results.
The command omits -L to expose redirects first. If it returns 301 or 302, inspect the destination, then measure the entry redirect and final object separately. If the application goal covers the journey from the entry URL to final content, you can also test the complete redirect chain, but retain the redirect count and details of each hop. Do not compare a final resource with no redirects against an entry URL’s total time through multiple redirects in the same column.
Origin Comparisons Help Diagnose Origin Fetching, Not Produce a Fair Ranking by Bypassing the CDN
In website testing, an origin comparison can help locate delays along the CDN and origin delivery paths, but it is not an absolute arbiter. A fast direct origin response may simply reflect a favorable path from the test machine to the origin. A slow CDN request may include extra validation or intermediate processing after a cache miss. Interpret the network path and cache state together.
For HTTPS comparisons, retain the Host and TLS SNI for the original domain. Do not access the origin IP directly and treat certificate errors, a default virtual host, or an incorrect page as origin performance. The following command uses the same URL, method, and request header as the previous example, changing only the connection destination to an address reserved for documentation:
curl --noproxy '*' -sS --connect-timeout 5 --max-time 20 \
--resolve 'www.example.com:443:203.0.113.10' \
-H 'Accept-Encoding: identity' \
-D origin-headers.txt -o origin-body.bin \
-w 'code=%{http_code} ip=%{remote_ip} http=%{http_version} dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} first=%{time_starttransfer} total=%{time_total} bytes=%{size_download}\n' \
'https://www.example.com/assets/cdn-test.txt'
This method requires authorized access from the test client, an origin listening on the relevant port, and a valid certificate for the domain. If the origin allows only CDN origin-fetch addresses, requires mutual authentication, or uses a dedicated origin hostname, a failed direct comparison may reflect the intended security policy rather than a fault. Do not temporarily open broad access to the origin for speed testing, and do not hide configuration differences by disabling certificate verification.
Because --resolve fixes the destination address, these requests do not represent actual DNS-based routing. Focus on comparing connections, responses, and bodies rather than claiming that origin DNS resolution is faster. Alternate the two request groups through the same network egress at similar times and check that their response content matches. If the CDN rewrites or compresses the body, explain those differences before discussing transfer times.
Interpret the results by scenario: if hits are fast, misses are slow, and the corresponding origin requests are also slow, prioritize application and origin-fetch processing. If direct origin requests are fast but only CDN misses are slow, correlate CDN request identifiers with origin logs and investigate intermediate caches, origin connection establishment, or policy processing. If even cache hits spend most of their time establishing the client connection, investigate the client-to-edge path before tuning the database. A single comparison suggests a direction; it does not establish responsibility.
Tests of Your Own Website Must Return to the Browser Request Waterfall
A Fast HTML First Byte Does Not Mean the Initial View Is Complete
The browser retrieves HTML, parses styles, scripts, and other resources, and may then make additional API requests through scripts. This dependency chain means that an individual resource’s completion time is not the same as page rendering time. Even with a fast first byte for homepage HTML, the main content may remain invisible because critical CSS arrives late, script execution occupies the main thread, or images are discovered late.
In browser developer tools, record the start times, wait times, and initiating dependencies for the entry document, critical styles, blocking scripts, main content resources, and application APIs. For page metrics, observe when the main content appears and how the layout changes, then use a performance trace to check whether the network or scripts are blocking progress. Do not use the completion time of all requests as the sole metric: analytics, polling, and lazy loading may continue after the page becomes usable.
If the waterfall shows critical resources starting their downloads late, first inspect HTML discovery order, script dependencies, and loading strategies. Switching to an edge with faster downloads may not solve the problem. If resources are requested early but spend a long time waiting for the first byte, return to cache and origin-fetch testing. If resources have already finished but the page remains unresponsive, investigate execution, layout, and rendering rather than continuing to adjust CDN bandwidth settings.
Do Not Mix Cold and Warm Browser States into One Visit
First visits and continued browsing within a site involve different connection, memory-cache, and disk-cache states. A Service Worker may also serve content itself. The “Disable cache” option in developer tools does not clear the CDN cache and does not guarantee the elimination of all application-layer cache effects.
When testing a homepage, specify whether the test is a first visit in a new session, a page refresh, or navigation from another page on the site. A separate browser profile helps isolate previous state, but you must still record whether a Service Worker is involved. If the goal is to measure the actual return-visit experience, retain normal caching and present those results separately from first visits. Disabling every cache is not inherently more accurate.
Login workflows require controlled test accounts. Do not leave Cookies or Tokens in shared commands or reports. When anonymous static files are fast but logged-in pages are slow, check session requests, personalized HTML, and APIs instead of using anonymous cache-hit results to explain the logged-in experience. A successful curl request also cannot rule out a browser cross-origin failure, because command-line requests do not enforce browser CORS restrictions.
Schedule Samples to Avoid Mistaking Changes Over Time for Service Differences
For provider comparisons, avoid finishing all tests of A before testing B much later. Outbound network load, origin state, and routing may have changed. A more reliable approach is to alternate or randomize request order from the same test client, control request intervals, and specify whether each round includes warm-up. Run cache-hit and cold-request groups separately so earlier experiments do not change the object state for later ones.
When diagnosing your own website, do not begin with high concurrency either. Repeated low-load requests help examine paths and content; concurrent testing examines contention and capacity and is a separate experiment. Applying load too early may trigger rate limits, origin queues, or bandwidth contention on the test client, obscuring why ordinary users experience delays. If concurrency is necessary, first define the test targets, authorization scope, and stopping conditions, and monitor application errors and origin load.
The sample count must support the statistics being reported. A small number of requests can help diagnose deterministic errors but cannot reliably characterize tail latency. Reports should state the planned request count, valid request count, failures, and timeouts. When calculating timing percentiles for successful requests, also show the failure rate. Do not remove timeouts and then claim the service became faster. A timeout tells you only that the configured waiting limit was exceeded; it must not be treated as an exact completion time in an ordinary average.
Results from residential broadband, mobile networks, and cloud-hosted outbound connections are not interchangeable. IPv4 and IPv6 may also take different paths. Keep outbound connection types and address families consistent in comparisons. For aggregated results, recalculate from raw samples or clearly defined business weights rather than averaging P95 values from multiple groups. Sample weighting determines which users the results represent; adding more probe locations does not automatically make the results representative of actual traffic.
When additional external observations are needed, use Website Speed Test as a supplementary check, and verify the actual test target and displayed metrics. Retain the distinct conditions for platform probes and local browser recordings. Probe success rates are not contractual SLAs and cannot be directly equated with success rates for all real users.
Which Configuration Should the Results Change, and How Do You Verify the Change?
Useful test conclusions should lead to verifiable actions. For example, if irrelevant query parameters create many cache variants of the same public static resource, consider simplifying the cache key after confirming that those parameters do not change the content. If parameters control language, image dimensions, or access permissions, they cannot simply be ignored to improve the hit ratio. Cache-key optimization requires content equivalence, not merely shorter response times.
If dynamic APIs dominate page waiting time, first inspect their call chains, data queries, and suitability for caching. Data containing user identities, balances, or permissions must not simply be placed in a public cache. Strong CDN static benchmark results cannot replace application fixes. Appropriate options may include safely separating public data, reducing critical-path requests, or optimizing origin execution—not broadly “enabling caching for the entire site.”
If the evidence points to client-to-edge connection differences, first verify that protocols, address families, and routing conditions are consistent, then expand sampling under the same conditions. A single CNAME, IP label, or response header does not establish the complete delivery path. Provider Identification and Node Cross-Checks can provide investigative clues, but cannot replace account configurations and request logs.
Limit each change to one rollback-ready scope, such as a test directory, a single resource type, or controlled traffic. Retain the original rules. After a change, use the same requests to recheck content correctness, cache state, error rates, and timings before extending validation to real pages. If old versions persist, content is shared incorrectly across users, or error responses are cached, immediately roll back the relevant rules and check whether cached objects need to be purged within the affected scope.
The final test findings should, at a minimum, tell the next person what types of requests were tested, what success means, how caches and connections were controlled, which failures were excluded from successful-request timing statistics, and where the conclusions apply. Provider benchmarks compare controlled delivery tasks; tests of your own website explain real dependency chains. Keeping the two distinct makes it possible to decide whether the next change belongs in edge caching, the origin-fetch path, or the page and application themselves.
- CDN speed testing
- CDN provider benchmarking
- website speed testing
- CDN cache-hit testing
- curl timing analysis
- CDN origin comparison testing
- browser request waterfall