Back to blog

How to Test Cloudflare Performance Across China Without Relying on a Single Location

CdnChart EngineeringPublished on 2026-11-2716 min read3,244
How to Test Cloudflare Performance Across China Without Relying on a Single Location

Start with a Better Question: Which Users in China Get Fast Access, and Under What Conditions?

A reliable way to test Cloudflare across China is to organize probes by “region × carrier × access type,” then separately record IPv4/IPv6, cold and warm cache states, resource types, and test periods. A single download from one city, a Ping test on a cloud server, or a chart of nationwide average response times cannot establish whether real users can access a site reliably.

For websites primarily serving users in mainland China, prioritize the regions and networks that account for a substantial share of your audience rather than trying to cover every province on a test map. Report samples from Hong Kong, Macao, and Taiwan separately; do not combine them with mainland samples and describe the result as “access speed in China.” If the business also serves users overseas, establish a separate overseas control group.

This article covers access paths for website domains delivered through Cloudflare’s reverse proxy CDN. It does not cover public DNS resolver performance or represent the standalone performance of Workers, R2, or other products. A deployment should be accepted only when success rates, tail latency, content correctness, and actual application experience on the target networks all meet predefined thresholds. A fast result from one location demonstrates only the performance of that particular request under those conditions.

Cloudflare’s CDN product description describes it as a reverse proxy delivery service, but product coverage and network scale cannot be directly translated into access performance in a particular Chinese city. Test the domain you intend to launch, its actual enabled configuration, and real resources—not the vendor’s website or someone else’s demo site.

1. Identify the Request Path You Are Measuring

A page visit involves at least DNS resolution, the connection from the user to the edge, TLS negotiation, edge processing, and upstream retrieval when necessary. The browser also loads scripts, stylesheets, images, and API requests. A problem with any critical dependency can leave the page unusable even when the initial homepage request appears normal.

Using Cloudflare DNS Does Not Necessarily Mean Requests Pass Through the CDN

Before testing, verify that proxying is enabled for the domain, the test hostname is correct, the HTTPS certificate matches, and requests are not redirected to another domain. Cloudflare being the authoritative DNS provider does not, by itself, establish that HTTP requests pass through its reverse proxy.

Use account settings, DNS results, response headers, and access logs together to verify where requests enter the service. Provider identification and supporting edge checks can provide an external perspective, but identification results cannot replace checks of account settings or establish the actual path to the origin.

Save a configuration snapshot for each test round, including at least proxy status, origin region, cache rules, redirect rules, security rules, and any enabled edge logic that changes request processing. Otherwise, differences between test rounds will be difficult to attribute to network changes or configuration changes.

IP Addresses, Data Center Identifiers, and Routes Explain Only Part of the Picture

With Anycast, the same service address may route to different locations. Even when the address stays unchanged, carrier egress points and paths may change. You therefore cannot use the geolocation of one IP address to conclude that users nationwide reach the same data center, nor assume that geographic proximity guarantees better network performance.

If a response includes request identifiers or fields related to edge location, retain them to compare path changes on the same network. These fields can help explain anomalies, but should not be used alone as proof of edge coverage or the ultimate origin location.

Traceroute also has limitations: intermediate devices may not respond to probes, and packet loss at one hop does not mean application traffic experiences the same loss. Further investigation is warranted only when the anomaly persists through subsequent hops and aligns with HTTPS failures or timing changes. Do not conclude that a carrier cannot access Cloudflare simply because one hop has high latency.

2. Design a Multi-Location Matrix Around Your Users, Not Just Cities

The basic unit of multi-location testing is not a city, but a specific type of network within a particular region. China Telecom home broadband, a cellular network, and cloud server egress in the same city may use different egress points and interconnection paths. Their results are not interchangeable.

A Layered Approach to Get Started

Dimension

Selection approach

Differences that must remain visible

Mainland regions

Select northern, eastern, southern, and other priority regions based on user distribution

Do not treat one coastal city as representative of the entire country

Carriers

Cover the networks your users actually use, such as China Telecom, China Unicom, and China Mobile

Group different carriers within the same city separately

Access type

Sample home broadband, mobile networks, and cloud egress separately

Cloud egress does not represent residential networks

Hong Kong, Macao, and Taiwan

Sample independently based on actual user locations

Do not combine these results with mainland results

Address family

Test IPv4 and IPv6 separately on capable probes

Distinguish unsupported probe capabilities from access failures

Time

Cover business peak and off-peak periods across multiple working days

Do not use early-morning performance as a substitute for evening experience

Resources

Include HTML, static files, dynamic APIs, and critical user journeys

Do not extrapolate small-file results into download speeds

This is a test design, not a requirement for every website to deploy the same number of probes. Websites with users concentrated in a few provinces should prioritize more carrier and real-access samples in those regions. Sites with widely distributed users need broader geographic coverage.

For mobile networks, also record the access environment: for example, whether the device is on a cellular connection or Wi-Fi, and whether a VPN or corporate proxy is in use. Do not switch networks during testing and then combine the results. Otherwise, address changes, wireless signal conditions, and carrier egress differences become an uninterpretable dataset.

Use Cloud Probes for Diagnosis and Real Networks for Acceptance Testing

Cloud servers make it easy to schedule tests, save logs, and control the environment, so they are useful as a continuous baseline. However, their egress quality, interconnection arrangements, and bandwidth constraints differ from those of residential networks. Fast cloud probe results demonstrate performance only under that cloud egress environment; slow cloud probe results do not mean all residential users in the area will experience slow access.

A practical combination is to use fixed cloud probes to track trends over time, then recruit controlled home broadband and mobile network samples in priority cities for application acceptance testing. Real user monitoring can add browser experience data, but browser caching, device performance, page version, and sampling bias must be identified. Do not indiscriminately combine these results with active probe measurements.

If you use website speed testing for external observations, first verify the locations, networks, and metrics actually provided by the page. Carrier information, cache states, or browser capabilities that the tool does not explicitly report must not be assumed to have been verified.

3. Choose Test Resources That Separate Edge, Origin, and Page Issues

Different resources under the same domain may have entirely different paths and bottlenecks. Testing only the homepage mixes caching, application generation, redirects, and page dependencies. Testing only a cache-hit image, on the other hand, may conceal problems with login and APIs.

Prepare at Least Three Resource Categories

The first category is publicly cacheable, versioned static resources, such as CSS, images, or test files with fixed versioned paths. These help assess edge delivery. Their content and size should remain stable, and they should contain no user data.

The second category is test objects explicitly permitted to be publicly cached, whose cache-fill process needs to be observed. Publish a new version under a dedicated path and record the first and subsequent requests separately. A new URL is not necessarily completely cold across every cache layer, and the first request may not go directly to your origin. Logs are still needed to interpret the results.

The third category is application requests that normally cannot use a shared cache, such as an authenticated read API. Use dedicated test accounts and non-sensitive data to observe actual performance through the proxy when backend processing is still required. Do not force personal information or authenticated responses into a cache to increase the hit ratio.

If the business includes downloads or video, prepare corresponding test objects as well. For downloads, assess sustained throughput, integrity, and resumable downloads. For video, assess time to first frame, segment retrieval, quality switching, and playback stalls. The TTFB of a small icon cannot represent these experiences.

Save Cache State Alongside Performance Data

Cloudflare’s cache documentation describes capabilities such as cache rules, tiered caching, and purging. These are configurable mechanisms. Their availability does not mean every resource is cached or every account has the same capabilities enabled.

For each test, save cache-related response fields, Cache-Control, Age, Vary, status code, and content length. If CF-Cache-Status is present, use it as a diagnostic clue, interpreted alongside rules and origin logs. An edge cache miss does not necessarily mean the request went directly to your origin; other cache layers may be involved.

Do not create a “cold cache” by arbitrarily adding random query parameters. You need to verify whether query parameters form part of the cache key. This approach also changes application URLs and may eliminate reuse for every request. A more controlled approach is to publish versioned objects in a dedicated directory, purge only the test objects as necessary, and retain the purge time and scope.

4. Break Down Timings with curl Instead of Looking Only at Total Time

Command-line tests are useful for establishing a repeatable baseline. The following example uses a standard example domain; replace it with a test domain and resource you control. The command uses GET to retrieve the actual response body rather than substituting HEAD, which may trigger different processing logic.

curl -4 --connect-timeout 10 --max-time 30 \
  -sS -D headers-v4.txt -o /dev/null \
  -w 'remote_ip=%{remote_ip}\nhttp_code=%{http_code}\nhttp_version=%{http_version}\ndns=%{time_namelookup}\nconnect=%{time_connect}\ntls=%{time_appconnect}\nttfb=%{time_starttransfer}\ntotal=%{time_total}\nbytes=%{size_download}\nspeed=%{speed_download}\nredirects=%{num_redirects}\n' \
  'https://www.example.com/assets/test-v1.bin'
printf 'curl_exit=%s\n' "$?"

The connection and overall timeouts are test parameters, not Cloudflare service metrics. Adjust them to your application's tolerance if necessary, but keep them consistent within each comparison group. If the environment does not have /dev/null, use an output destination appropriate for that operating system.

This command saves response headers, discards the response body, and prints timings. To formally verify file correctness, save the content separately and check its expected length or hash. Always save the exit code alongside the status code. When the status code is empty or 000, you need to distinguish among DNS, connection, certificate, overall timeout, and other failures.

Distinguish Cumulative Timings from Stage Durations

For a direct HTTPS request of this kind, without redirects, curl’s main timing fields generally measure elapsed time from the start of the request to a particular event:

  • Use time_namelookup as a reference for the DNS stage.

  • Approximate TCP connection time as time_connect minus time_namelookup.

  • Approximate TLS time as time_appconnect minus time_connect.

  • Measure the interval from TLS completion to the first byte as time_starttransfer minus time_appconnect.

  • Measure reception time after the first byte as time_total minus time_starttransfer.

The last two intervals are not pure server processing time or pure network transfer time. They may also be affected by request transmission, proxy processing, congestion, rate limiting, and other factors. Do not label TTFB as “origin response time.”

If the command does not follow redirects, the timing of a 3xx response represents only that redirect response. Check Location first, then test the final destination separately. To observe the full redirect chain, use -L and retain information for every hop, but do not apply the simple differences above to interpret the entire chain. Corporate proxies, connection reuse, and different protocols can also change what the timings mean. Keep the test environment consistent and record the curl version.

Run IPv4 and IPv6 Tests Separately

After confirming that a probe supports IPv6, replace -4 with -6 in the command and use different output files. Do not change the resource, test period, and protocol at the same time, or you will be unable to identify the source of any difference.

If the probe has no IPv6 default route, that is not a Cloudflare IPv6 failure. Diagnose the target path only when the probe has working IPv6 connectivity but requests to the target domain consistently time out. Even if forced IPv6 is slower, that does not establish that browsers will be equally slow, because browsers may use connection strategies that race address families.

Organize protocol comparisons, such as HTTP/2 and HTTP/3, separately as well. First check whether the client supports the target protocol, then verify the protocol actually negotiated. Requesting a protocol in a command does not guarantee it was ultimately used.

5. Use Control Requests to Distinguish Network Delays from Origin Fetch Delays

When some regions show abnormal performance, the most useful next step is to establish path comparisons rather than immediately change plans. Control requests must retrieve the same content, with request headers, compression negotiation, request method, and time window kept as consistent as possible.

Compare Direct Origin Access While Preserving Host and SNI

With authorization, an origin that permits testing, and no increase in exposure, you can connect directly to the origin as follows. The example IP is reserved for documentation and is not an actual service address.

curl --resolve www.example.com:443:203.0.113.10 \
  --connect-timeout 10 --max-time 30 \
  -sS -D origin-headers.txt -o /dev/null \
  -w 'http_code=%{http_code}\nttfb=%{time_starttransfer}\ntotal=%{time_total}\n' \
  'https://www.example.com/assets/test-v1.bin'

--resolve directs the connection to the specified address while retaining the hostname from the URL for HTTP Host and TLS SNI. Accessing an HTTPS IP directly may return the wrong certificate, a default site, or a different virtual host, so it is not an equivalent comparison.

This command may fail if the origin accepts only Cloudflare traffic, uses dedicated origin authentication, or lacks a certificate valid for ordinary clients. Do not hide certificate issues with -k and then claim an equivalent result, or broadly expose the origin for testing. Instead, use controlled internal probes, application timings, and origin logs to locate the issue.

Direct testing excludes the normal DNS resolution path. It is therefore useful for investigating origin and network path issues, but should not be used alone to rank end-to-end user experience. Origin addresses and authentication details must not appear in public reports.

Decide What to Investigate Next Based on Combined Results

Observation

Priority investigation areas

Appropriate action

Cache hits are consistently fast, but dynamic requests and cold objects are slow

Retrieval paths beyond the edge, the origin, and application processing

Compare origin logs and application timings before considering cache or architecture changes

The same resource is slow only on a particular carrier

User-to-ingress paths, address families, and time-of-day differences

Add samples from that network and check failure types and route changes

Cloud egress performs normally, but home broadband does not

Access networks, interconnection paths, or local environments

Verify with other home networks in the same region; do not use cloud results to dismiss the issue

curl performs normally, but browser pages are slow

Page dependencies, script execution, challenges, or third-party resources

Analyze waterfall charts, errors, and critical application actions

Both edge and direct-origin access are slow

Origin load, the application, or shared network path factors

Address shared bottlenecks before attributing the issue to the CDN

These branches define an investigation sequence, not an automatic diagnosis. In particular, “fast hits, slow misses” establishes only that the two request conditions differ. Evidence such as origin processing times and request arrival logs is still required to identify a problem with the origin fetch network path.

6. Include Cache and Security Correctness in Performance Results

Performance optimization must not come at the cost of incorrect content. An unusually fast 200 response may be a challenge page, default page, or stale content. A cache hit may also be a personalized response that should never have been shared.

Do Not Assess Cache Hit Ratios by Request Count Alone

The request hit ratio indicates how many requests are served from cache; the byte hit ratio indicates how many response bytes are delivered from cache. If many small files hit the cache while a few large files are fetched from the origin, the former may look good while origin bandwidth demand remains high. Download services need to observe both metrics and specify which cache layers their logs cover.

Tests should also check whether cache keys correctly distinguish languages, query parameters, and necessary request headers; whether requests carrying authentication or cookies bypass shared caches as intended; and whether error responses and purging meet application requirements. Do not ignore these conditions to improve test hit ratios.

If you plan to change cache rules, first restrict the changes to a test hostname or dedicated path. Record the original rules, verify content consistency and purge scope, then expand gradually. If content is served across user boundaries, versions become inconsistent, or error statuses are cached incorrectly, stop expanding immediately and restore the rules.

Security Challenges Are Part of the Application Experience

Automated probes may encounter different security handling from ordinary browsers. When a test returns 403, a challenge page, or repeated redirects, record the response category and verify it with a controlled browser. Do not immediately classify it as a connectivity failure, and do not count challenge HTML as a successful page.

If you need to isolate security-rule processing time, use an authorized, separate test path and make the smallest necessary changes, with a documented way to restore the configuration. Retain another set of experience tests under normal production rules. Do not broadly disable protection or allow requests solely on the basis of User-Agent.

Successful TLS negotiation, complete response headers, or a blocked attack request does not establish DDoS scrubbing capacity, overall WAF effectiveness, or contractual guarantees. Security acceptance testing and performance testing can share logs, but neither replaces the other.

7. Retain Failures in Your Statistics and Do Not Let Nationwide Averages Hide Weaknesses

Each sample record should include at least the time, region, carrier, access type, address family, requested object, cache classification, status code, exit code, timings, and content validation result. Raw records matter more than an average-value chart because they allow regrouping and anomaly verification.

Define “Success” Before Calculating Speed

Application success requires a completed connection, the expected status code, correct response content, and successful completion of necessary actions. Do not count every HTTP 200 as success, or delete failed samples and report only the average speed of the remaining requests.

Report planned requests, valid executions, application successes, DNS failures, connection failures, TLS errors, timeouts, HTTP errors, and content errors separately. List probe failures separately and explain the grounds for excluding them. Do not arbitrarily attribute them to the vendor or silently remove them.

The median and P95 of successful requests describe the latency distribution, while the failure rate describes reachability. Report them side by side. If a group has too few successful samples, flag the instability of its percentiles rather than using a seemingly precise figure to make a procurement decision. A timeout establishes, at minimum, that the request exceeded the configured limit. It should not be treated as a known completion time in ordinary latency rankings.

You Cannot Simply Average Group P95 Values

The average of each city’s P95 is not the nationwide P95. To calculate an overall percentile, combine per-request records that meet the same statistical criteria and recalculate, or use distribution data that can be correctly merged.

Likewise, probe count is not a business weighting. Deploying more probes in eastern China does not mean that region should automatically receive greater weight. You can provide both equally weighted group results and a business view weighted by actual user distribution, but the source of the weights must be explicit, and independent results for each priority network must remain available.

A practical report usually has three layers: an overall business view, priority region and carrier groups, and anomalous sample details. The overall view supports the adoption decision, the groups show which users are affected, and the details help identify causes. Success rates observed during a measurement window cannot be restated as the vendor’s contractual SLA. Refer to test methodology and evidence standards to distinguish measurement findings from service commitments.

8. Turn Test Results into Adoption and Rejection Criteria

Before testing, business and technical owners should jointly define thresholds, including minimum success requirements for priority regions, tail latency budgets, critical page actions, cache correctness, and origin capacity limits. Without predefined thresholds, testing can easily become an exercise in selecting the most flattering chart.

Conditions for Expanding Deployment

You can expand a phased rollout when priority regions and carriers meet established requirements across multiple business periods, static, dynamic, and real-page experience results do not materially contradict one another, and cache and security rules pass correctness checks. Expand first to user groups already validated rather than switching all traffic immediately.

Before the phased rollout, verify certificates, Host/SNI, redirects, expected caching behavior, and security rules. Save DNS and configuration snapshots, and adjust TTL appropriately in advance. If you need to restore the previous DNS path, remember that recursive caches and existing connections will not all switch instantly. The previous delivery path must remain available.

The observation window should cover peak periods and multiple business cycles. Rollback triggers may include sustained failure rates above thresholds on priority networks, inability to complete critical transactions, cross-user caching errors, or abnormal origin load. Each trigger must have an owner, recovery steps, and a verification procedure.

Conditions Requiring Further Validation or Architecture Changes

If you have only a few cloud egress samples, results from a single day, or acceptable success rates but clearly abnormal tail latency on a major carrier, continue testing rather than publish a nationwide conclusion. If issues mainly affect dynamic APIs, adding static caching will not automatically solve them. Consider shortening backend dependency chains, adjusting origin deployment, or separating static and dynamic delivery.

If performance for the main mainland user base persistently fails to meet business thresholds, assess delivery options within mainland China that meet the applicable compliance and contractual requirements, or use validated regional or multi-CDN paths. Alternatives must also be tested for cache consistency, certificates, security policies, traffic steering, and rollback. Switching vendors is not a cost-free fix.

During procurement, clearly document target user networks, acceptance methods, log visibility, incident collaboration, and contractual commitments. Do not assume that a more expensive plan will necessarily deliver faster access across China, or treat a product page’s global network description as a performance guarantee for a particular carrier.

The final deliverable should not be a single “Cloudflare nationwide speed score,” but an actionable assessment: which networks meet requirements, under which conditions risks remain, whether configuration or architecture changes can address those risks, and how to restore service or use an alternative path when thresholds cannot be met. That is how multi-location testing can genuinely support website launches and procurement decisions.

  • Cloudflare
  • Cloudflare performance testing across China
  • CDN carrier network testing
  • Cache and origin fetch performance

Related posts