Website Speed Testing in China: What to Measure Beyond the Average
When testing website speed in China, average response time describes only the overall performance of a set of requests. It cannot answer questions such as “Which users still cannot open the site?”, “Will it suddenly slow down during the evening peak?”, or “Why does the homepage stay blank when its response arrives quickly?” Other important measures include tail latency such as P95, business success rates, timeout rates, consecutive slow requests, and completion times for resources critical to the initial viewport. These metrics point to different stages, including network connections, CDN caching and origin fetches, application processing, and browser rendering.
Start troubleshooting by confirming two things: whether the test request received the correct content, and whether slow requests stalled before connection establishment, before the first byte, or during the download of the response body and page resources. If the average looks good but failures cluster on a particular access network, investigate that network’s DNS resolution and connection path first. If connections are stable but dynamic endpoints show high tail latency, changing static resource nodes should not be the main priority.
The following discussion covers technical principles and validation methods, not measured results for any particular vendor or region. Refer to the official curl manual for command usage; supported options depend on the locally installed version. Platform probes, individual command-line requests, and real browser visits measure different things and should not be treated as equivalent user experience data.
Why Average Response Time Can Hide the Slowest User Experiences
The average is sensitive to extreme values, yet a large volume of fast requests can dilute their effect. Static resources return quickly on cache hits, while a small number of misses wait for origin fetches. Combining these requests can produce a seemingly stable average even while users accessing particular content for the first time are still waiting. Another common issue is that a testing system counts only successful requests, excluding the slowest requests that eventually time out. The displayed average then looks better than the actual experience.
A drop in average response time therefore has at least three possible explanations: the same requests have genuinely become faster, fast requests make up a larger share of the sample, or more slow requests are failing and no longer entering the calculation. Only the first directly supports a performance improvement; the other two require further checks.
What P50, P95, and P99 Can Tell You
P50 is the median and helps describe the experience of a typical request. P95 means that approximately 95% of samples, ordered by duration, do not exceed that value, making it useful for examining the slower end of the distribution. P99 focuses more closely on extremely slow requests but is also more sensitive to sample size and isolated events. Different software may use different percentile interpolation methods, so align the calculation method before comparing reports.
Metric | Main question it answers | Conditions that must also be stated |
|---|---|---|
Average | What is the average duration of all included samples? | Whether failures are excluded and whether the sample composition has changed |
P50 | How fast are requests typically? | Whether request types and cache states are consistent |
P95 | Are slower users experiencing significant waits? | Sample size, time window, and percentile algorithm |
P99 | How severe are extremely slow requests? | Whether there are enough samples and whether anomalous tasks are included |
Business success rate | How many requests completed the intended business operation? | Business assertions and how retries and timeouts are handled |
Timeout rate | How many requests exceeded the observation limit? | Connection timeout and total timeout thresholds |
P99 can be calculated from a small number of requests, but that does not make the result stable. One slow sample among a few dozen tests can dominate a high percentile. In that case, showing the raw duration sequence, maximum value, and failure reasons is more accurate than claiming that “P99 is stable.” When increasing the sample size, do not treat a short burst of frequent requests as representative of the entire day: adjacent requests may share the same congestion and cache conditions.
Averaging regional P95 values does not produce a nationwide P95. An overall percentile must be calculated from raw samples or mergeable distributions representing the corresponding population. If weighting by user traffic, the weights and distribution handling must also be specified. A weighted average of regional averages can describe average duration under those particular weights, but it is still not overall tail latency.
How HTTP 200, Timeouts, and Retries Affect Test Results
HTTP 200 only means that the server returned that status code. It does not guarantee that the user received the intended page. A page reached after a login redirect, a security verification page, a degraded-service notice, or even an endpoint returning empty data may be counted as successful by a basic speed test. A small security challenge page may also download faster than the normal page, creating the illusion of “lower latency but an unusable service.”
For page requests, check at least the final URL, status code, content type, and a stable content marker. For API requests, verify the business-level response code, required fields, or data structure. Choose content markers that do not vary by time or user; exact equality of the entire page length is not a suitable general rule. For personalized responses, define appropriate assertions using an authorized test identity so that normal differences are not classified as failures.
A Timeout Is Not an Exact Completion Time
If a request has not finished when the total timeout threshold is reached, all that is known is that it “did not complete within this limit.” Its actual remaining duration is unknown. Simply deleting timeouts makes successful-request percentiles look better; treating the timeout threshold as the actual completion time also understates the real wait. A clearer report presents successful-request latency, business success rate, and timeout rate side by side, with the timeout thresholds stated.
If you also plot an experience distribution “capped at the maximum waiting time,” label its definition explicitly and do not mix it with the duration distribution of successful requests. When different test batches use different timeout thresholds, neither failure rates nor tail latency should be compared directly: a shorter threshold may make successful samples look faster while increasing timeouts.
Automatic retries also need separate records. A failed first connection followed by a successful second attempt may count as a final business success, but the user has already incurred an additional wait. Record the first-attempt success rate, final success rate, number of attempts, and total time from the initial attempt to final completion. Logging only the last successful request hides path instability and retry costs.
In Results for China, the Access Network Matters More Than the Province Label
Home broadband, mobile networks, and cloud host egress in the same city may use different DNS resolution and interconnection paths. A probe labeled with a province demonstrates access conditions from that probe’s egress point at that time, not the experience of every user in the province. A successful cloud-server probe also does not automatically establish that local mobile users have a normal experience.
When comparing results, retain labels for province and city, carrier, access type, address family, probe time, and target URL. The purpose is not to divide reports into ever smaller segments, but to avoid drawing one conclusion from fundamentally different requests. For example, if broadband is stable while mobile access in the same city fluctuates significantly, investigating mobile egress, wireless access, and the corresponding traffic-steering path is more useful than continuing to aggregate results by province.
For IPv4 and IPv6, Check Both Connectivity and the Path Actually Selected
The presence of an AAAA record does not mean that the IPv6 path works or is faster. Browsers typically race dual-stack connections and may switch paths when one is slow. A command-line test that forces IPv6 does not fully reproduce that behavior. Distinguish between IPv4-only performance, IPv6-only performance, and the path ultimately selected by a real client.
If failures cluster on IPv6 while IPv4 remains stable, check the delivery service associated with the AAAA record, the certificate, IPv6 listeners, and security rules rather than first extending cache lifetimes. Conversely, if both address families show rising time to first byte at similar times, the issue may lie in a shared application or origin-fetch path. Continuing to focus on address families may not be the most efficient approach.
For remote observation, website speed testing can help reveal access differences under different probe conditions. Interpret only the results actually provided by the page, and do not equate the number of probes with real-user coverage. The networks that actual users primarily come from must still be determined from the site’s own access and monitoring data.
Evening Peak-Hour Trends Reveal Congestion More Clearly Than a Single Daily Average
A daily average combines quiet and busy periods, making sustained degradation less visible. For access from China, pay particular attention to the target users’ active hours, but do not assume every service experiences problems only in the evening. Office systems, content sites, and campaign pages may have completely different load peaks.
Align request durations, failure rates, and business traffic within the same time windows to distinguish different causes. If connection and download performance deteriorate together while origin processing time remains stable, network congestion becomes a stronger suspect. If connections remain stable but time to first byte rises with business traffic, examine application queues, database connection pools, or upstream APIs. If slowdowns occur only briefly after releases, investigate cache invalidation and resource version changes.
Consecutive Slow Requests and Isolated Spikes Pose Different Risks
A single spike may result from temporary packet loss, probe host load, or an occasional connection re-establishment. Slow requests persisting across multiple windows are closer to a fault that users cannot resolve even by repeatedly refreshing. In addition to percentiles, record the length of consecutive slow-request runs, the number of abnormal windows, and whether error rates rise at the same time.
This also affects sampling. Making many consecutive requests within the same minute is likely to repeatedly encounter the same cache and connection conditions; spaced sampling is better suited to observing changes throughout the day. Follow-up tests should cover the original incident period and compare windows with similar business load. One normal off-peak test proves only that conditions were normal at that moment, not that the evening peak-hour issue has been resolved.
Use curl to Separate DNS, TCP, TLS, and Time to First Byte
A single “response time” often leaves its start and end points undefined. One person may measure Ping round-trip time, another time to first byte, another the full HTML download, and another browser page loading. These are not interchangeable. A fast Ping only indicates a short round trip over a particular ICMP path; it verifies neither the HTTPS handshake nor the application’s ability to return content.
The following example is intended for a Unix-like terminal with curl installed and uses a documentation example domain. For actual troubleshooting, replace it with the same URL that you are authorized to test. The command sends a GET request, does not follow redirects or retry automatically, and outputs response headers and cumulative timings. It is suitable for an initial assessment of a single-hop request. When repeating it, use identical parameters, allow reasonable intervals, and record each result separately.
curl -sS --noproxy '*' \
--connect-timeout 5 --max-time 20 \
-D response-headers.txt -o /dev/null \
-w 'code=%{http_code} remote=%{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/'
printf 'curl_exit=%s\n' "$?"
These timeout values are examples, not industry acceptance thresholds. --noproxy '*' excludes interference from environment-configured proxies. If the service normally depends on a proxy, run a separate test with the proxy retained and document the path; do not present a direct-connection result as the actual access experience. The command’s exit code identifies transfer errors, while HTTP status codes require separate evaluation: without the relevant failure options, an HTTP error response may still produce a curl exit code of 0.
Subtract Cumulative Timings; Do Not Add Them as Stage Durations
For a direct, standard HTTPS connection with no redirects or connection reuse, interpret the output as follows: time_namelookup approximates the time from the start until name resolution completes; time_connect - time_namelookup approximates the TCP connection time after resolution; and time_appconnect - time_connect approximates the TLS handshake time.
time_starttransfer is the cumulative time from the start of the request to the first byte and already includes DNS resolution and connection establishment. Subtracting time_appconnect gives the remaining wait between handshake completion and the first byte. This includes request transmission, network round trips, edge or application processing, and other work; it cannot simply be called “origin processing time.” time_total - time_starttransfer approximates the time from the first byte until the transfer ends.
If the DNS stage is abnormal, check the resolver actually used, returned records, TTL, and resolution failures rather than immediately adjusting web server threads. If the TCP stage is abnormal, examine connectivity, packet loss, and the access path. If TLS stands out, check handshake failures, certificate chains, and protocol negotiation. If the main delay is before the first byte, use CDN and application logs to locate the processing delay.
Redirects, Connection Reuse, and HTTP Versions Change What Is Being Measured
When encountering 301 or 302, first check whether Location is expected, then decide whether to use -L to measure the full redirect chain. The total duration of that chain includes multiple requests, so the single-hop formulas above no longer apply mechanically. Common redirects from HTTP to HTTPS, from an apex domain to the primary hostname, or to a login page all add waiting time before users reach the target page.
Separately launched curl processes do not share the previous process’s connection pool, although the operating system or local resolver may still cache DNS. Browsers, by contrast, often reuse connections. HTTP/2 can carry concurrent requests over a connection, and HTTP/3 uses a different connection establishment mechanism. A single request over a new connection is therefore useful for diagnosing connection issues, but it cannot directly represent the full browser page experience. When comparing two rounds of tests, retain the negotiated protocol version to avoid mistaking a protocol change for a node change.
Why New Content and Dynamic Endpoints Can Remain Slow Despite Fast Cache Hits
A website’s overall average is often lowered by large volumes of static resources, while the requests that actually affect user actions may not be cacheable. Product lookups, login-state checks, and form submissions require real-time application processing. Even a nearby CDN access point cannot eliminate waits caused by application queues and upstream dependencies. At minimum, examine latency distributions separately for static resources, cacheable pages, and dynamic endpoints.
Cache state is also more complex than simply “hit” or “miss.” An object may be undergoing revalidation, retrieved from an upper-tier cache, or served as permitted stale content during an origin failure. An edge miss does not prove that a request reached the organization’s origin server. Nor can one response header establish the complete delivery path. Interpret vendor-specific fields alongside request identifiers and the relevant logs.
If Consecutive Requests Get Faster, First Verify That the Content and Cache Key Match
When the first request to a URL is slow and subsequent requests are fast, this is only a clue that cache or connection state may have changed. To investigate further, keep the method, query parameters, relevant request headers, Cookie state, and client network consistent, while observing cache-related response fields and origin request records. Field names and values differ by vendor, so do not assume a universal cache-hit marker.
Adding random query parameters to a URL is not a universal cold-cache test. Parameters may be included in the cache key, ignored, or change application behavior. Cache-control directives in request headers may not pass through every layer as the tester expects either. A more reliable approach is to use newly versioned resources on a controlled test path or arrange comparisons based on confirmed cache rules. Avoid repeatedly purging the entire production cache.
If P95 rises significantly only for misses and revalidation requests, prioritize origin connections, origin capacity, object expiration policies, and simultaneous expiration of popular objects rather than comparing edge-hit speed alone. For public resources that can tolerate some update delay, assess more appropriate cache lifetimes and platform-supported update mechanisms. For account, order, or personalized data, do not expand shared caching merely to improve speed-test scores.
How to Compare CDN and Origin Access Without Misattributing the Cause
When time to first byte is high, compare normal CDN access with authorized direct-origin access from the same client. For an HTTPS comparison, retain the domain in the URL, the Host header, and TLS SNI rather than replacing the URL with the origin IP address. The second command below is comparable only when the origin permits the test source and uses the same site certificate and application entry point.
curl -sS --noproxy '*' --connect-timeout 5 --max-time 20 \
-o /dev/null \
-w 'code=%{http_code} first=%{time_starttransfer} total=%{time_total}\n' \
'https://www.example.com/'
curl -sS --noproxy '*' --connect-timeout 5 --max-time 20 \
--resolve 'www.example.com:443:203.0.113.10' \
-o /dev/null \
-w 'code=%{http_code} first=%{time_starttransfer} total=%{time_total}\n' \
'https://www.example.com/'
203.0.113.10 is a documentation example address and cannot be used directly for a real origin test. Do not disclose the actual origin address when testing, and do not force a successful result by disabling certificate verification or broadly opening the firewall. If the origin accepts only CDN-originated requests, uses dedicated authentication, or expects a different origin Host header, a failed direct connection may be expected security behavior rather than an origin fault.
Both commands must also use the same request headers, method, and content conditions. Alternate multiple tests from the same location and record whether caches are warm or cold, so that network fluctuations between tests are not mistaken for architectural differences. Publicly cached pages and pages carrying a logged-in session must not be grouped together.
Slow CDN access alongside fast direct access raises suspicion about edge processing, traffic steering, or the origin-fetch path, but a client-side comparison alone cannot identify the responsible segment. The client-to-origin path is not the same as the CDN-to-origin path. If dynamic requests are slow through both routes and application logs show a corresponding increase in processing time, shift the investigation toward the application or its dependencies. This is more useful than deciding to “change nodes because the average is worse.”
A Completed HTML Download Does Not Mean Users in China Can See the Page
After receiving HTML, a command-line client does not automatically execute JavaScript, load stylesheets, call business APIs, or complete layout. A homepage with a fast first byte can still be delayed by large images, blocking scripts, font files, and third-party APIs. If users report a blank screen while single-URL speed tests remain normal, shift the investigation immediately from HTML to the browser’s critical request chain.
The Network panel in browser developer tools shows the request waterfall, statuses, transfer sizes, initiators, and protocols. Performance recordings help determine whether script execution or main-thread tasks continue to block the page after resources arrive. When testing first and repeat visits, record browser cache and Service Worker states separately. Do not directly compare a cache-disabled run with a normal repeat visit.
What Gaps LCP and Interaction Metrics Can Fill
LCP measures when the main content in the viewport is rendered, helping investigate cases where “the HTML has returned, but the main above-the-fold content is still missing.” It can be affected by when images are discovered, download duration, fonts, and render blocking. Interaction responsiveness also requires real interaction metrics such as INP; completion of page loading does not guarantee a prompt response to clicks.
Lab browser tests make it easier to hold device and network conditions constant, while real-user monitoring captures differences in actual devices and access networks. They serve different purposes. If third-party resources fail on certain access networks in China, normal main-site HTML does not rule out a page failure. Use the waterfall to establish whether the resource lies on the critical path before considering deferred loading, replacing the dependency, or implementing an appropriate fallback.
There is also no contradiction when an API returns 200 but the frontend still reports a cross-origin error. curl does not enforce browser CORS checks. Inspect preflight requests, allowed Origin values, methods, and credential policies in the browser. Limit fixes to trusted sources and the permissions actually required; do not allow arbitrary credentialed origins merely to make the test pass.
How to Verify That an Optimization Improves More Than Reported Numbers
Each change should target a diagnosed stage and have defined rollback conditions. For DNS adjustments, monitor resolution failures and connection paths. For cache changes, verify content correctness and update freshness. For application optimizations, check business errors and tail latency together. Changing DNS resolution, caching, and application code at the same time makes it difficult to identify which change produced the result and makes side effects easier to miss.
Validation does not require an unlimited number of metrics, but every number must answer a specific question. Use the following acceptance sequence:
Fix the target URL, method, content assertions, and timeout definitions, and retain request-level timestamps, outcomes, and error types.
Retest on the networks and during the periods where the issue originally occurred. Keep unaffected requests as a reference to confirm that the change is not due to overall traffic or sample composition.
Compare successful-request P50 and P95, business success rate, timeout rate, and user waiting time from the first attempt to final completion side by side.
For cache changes, check cold requests, warm requests, and updated content. For page changes, check critical resources and browser rendering, not just HTML.
Apply changes first within a limited domain, path, or traffic scope. Roll back if error rates rise, content becomes stale, or permission anomalies appear, then restore and recheck the original security and cache rules.
Reports should also identify missing measurements: a probe that did not run does not mean that access from that network succeeded. A fault in the probe host itself must not be counted as a site failure without confirmation either. When responsibility for a failure remains unclear, retain the raw error and a pending-confirmation status rather than deleting it for a tidier report. When platforms use different measurement definitions, consult the speed testing methodology to understand the measurement scope. Platform probe success rates, however, cannot replace a contractual SLA or the business’s own availability definition.
The real value of website speed testing in China is not a more attractive nationwide average. It is the ability to explain which visits are still slow, where the delay occurs, how failures are counted, and whether the problems disappear under the same conditions after a change. Keep averages in the overview, but base remediation decisions on tail latency, business correctness, and the page’s critical path together.
- website speed testing in China
- average response time in website speed tests
- P95 tail latency
- website speed test success rate
- curl timing analysis
- CDN cache speed testing
- IPv4 and IPv6 speed testing
- page loading performance