Designing a distributed web performance ·续2
Traditional Origin Optimization: For applications that cannot be refactored or modernized ↗︎ to an originless model, the following optimizations are required to minimize the resulting latency impact of traditional infrastructure:
- Connectivity: Cloudflare connects using HTTP/2 to Origin, using Connection Reuse to multiplex requests over a single persistent connection, reducing TCP/TLS overhead. Automatic key exchange predicts the origin's preferred TLS 1.3 key agreement — preferring post-quantum hybrid key agreement where supported — to avoid an extra round trip on new origin connections. For enhanced reliability and security, Cloudflare Network Interconnect (CNI) allows you to connect your network infrastructure directly to Cloudflare - bypassing the public Internet - for a more performant and secure experience. Additionally, the Bandwidth Alliance ↗︎ (including partners like Microsoft Azure Routing Preference ↗︎) can significantly reduce or waive data egress fees.
- Private Infrastructure: Workers VPC and Cloudflare Tunnel enable direct connectivity to private storage endpoints or databases on public clouds without necessarily exposing them to the public Internet.
- Load Balancing: Traffic is distributed across healthy servers using Cloudflare Load Balancing. If an origin fails, traffic is instantly rerouted to healthy server pools. Alternatively, Round-Robin DNS can be used for simpler distribution strategies.

Figure 5: Deployment models
Tools and resources
Continuous monitoring and testing verify each optimization. Measurement and logging confirm real gains, surface regressions early, and reveal edge cases long before they affect clients.
When analyzing this data, it is important to take into account connection limits and TCP connection behavior, while also accounting for Cloudflare crawlers and the /cdn-cgi/ endpoint, as well as potential data discrepancies between Cloudflare and Google Analytics.
Cloudflare platform tools
- Cloudflare Observatory ↗︎: The primary dashboard for performance. It combines Synthetic tests (Google Lighthouse) for standardized baselines with Real User Monitoring (RUM) to capture actual user experiences across different devices and regions.
- GraphQL Analytics API: Use this for Trends and Timing Insights ↗︎. Query specific metrics like
edgeDnsResponseTimeMsversusoriginResponseDurationMsto pinpoint exactly where latency is introduced. - Web Analytics: Specific for privacy-first, edge-based RUM analytics.
- Cache Analytics: Critical for analyzing Cache Hit Ratio (CHR) and "Requests by Cache Status" to find uncached content that causes origin load.
- Ruleset Engine: Review and use the extensive library of fields to implement precise custom logic for routing, caching, and security based on real-time connection properties. Key telemetry fields include: cf.timings.worker_msec (Worker execution time, for performance-regression rules), cf.timings.client_tcp_rtt_msec and cf.timings.client_quic_rtt_msec (client round-trip time per transport protocol), and cf.edge.l4.delivery_rate (L4 delivery rate in bytes per second, for adaptive content or routing decisions on constrained connections).
- Logging & Forensics:
- Log Explorer: For ad-hoc querying of request logs directly in the dashboard. Use Custom Log Fields to log additional request headers, response headers, and cookies.
- Logpush: For exporting logs to third-party SIEMs with optional Log Output Options, supporting formats such as CSV or JSON. Essential for analyzing custom fields and long-term trends, as well as calculating the Download Success Rate and analyzing Download Throughput for large files.
- Instant Logs: Real-time traffic inspection for immediate debugging.
- Network Error Logging (NEL): Captures client-side connectivity issues that the server might never see.
Open source and automation
- Cloudflare Telescope ↗︎: An open-source, cross-browser front-end testing agent capable of running tests in all major browsers. Use this to automate performance regression testing in your CI/CD pipeline.
- Cloudflare Speed Test ↗︎: Measures realistic Internet connection quality - including loaded latency, jitter, and packet loss - by simulating real-world usage on Cloudflare's global network using predefined data blocks, rather than simply testing for peak throughput saturation.
- BEACON ↗︎: An anonymized RUM dataset on Google BigQuery, updated daily. Use it to compare your Core Web Vitals against real-world distributions by country, browser, and protocol.
- Cloudflare Prometheus Exporter ↗︎: Scrapes metrics from the GraphQL Analytics API and exposes them in a Prometheus-compatible format, allowing you to visualize Cloudflare performance data alongside your infrastructure metrics in Grafana or similar tools.
External validation and benchmarking tools
While Cloudflare provides internal metrics, external (third-party) tools are vital for independent validation and deep-dive analysis of the critical rendering path.
- WebPageTest ↗︎: Detailed waterfall charts and deep analysis of loading behavior.
- Google PageSpeed Insights ↗︎: The standard for Core Web Vitals assessment (Field & Lab data).
- DebugBear ↗︎: Excellent for continuous monitoring and tracking speed history.
- Pingdom ↗︎: Useful for simple, geographic-based availability and speed testing.
- Treo.sh ↗︎: Fast, historical visualization of Chrome User Experience Report (CrUX) data.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/reference-architecture/diagrams/content-delivery/distributed-web-performance-architecture/#page","headline":"Designing a distributed web performance architecture","description":"A prescriptive pattern for building a Cloudflare-based L7 performance architecture that reduces latency, raises cache efficiency, and improves Core Web Vitals.","url":"https://developers.cloudflare.com/reference-architecture/diagrams/content-delivery/distributed-web-performance-architecture/","inLanguage":"en","image":"https://developers.cloudflare.com/reference-architecture/diagrams/content-delivery/distributed-web-performance-architecture/og.png?v=1d3def6ed3d9e48b","dateModified":"2026-10-19","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Learn how to get a scalable, high-performance solution to optimizing image delivery. title: Optimizing image delivery with Cloudflare image resizing and R2 image: https://developers.cloudflare.com/reference-architecture/diagrams/content-delivery/optimizing-image-delivery-with-cloudflare-image-resizing-and-r2/og.png?v=b5856d77f8117920
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/reference-architecture/llms.txt
Use this file to discover all available pages before exploring further.
