Every request to Cloudflare goes through the same request pipeline, and every node on the Cloudflare network performs each and every task for the request it receives. This article outlines the flow of every request to Cloudflare, so you’ll get an understanding of the order the various features and apps are applied to every request.
A request in this sense is an HTTP request, not a request for an entire web page (which usually consists of 50 or 100 individual requests). A request can be either any type of asset, for example HTML, CSS or images.
How is every request to Cloudflare processed?
1. Visitor sends requests
The process starts with the Visitors browser or any online App that requests an asset or resource.
2. DNS
- Translate domain name to Cloudflare IP address via global, Anycast DNS
- DNSSEC
- CNAME Flattening
- Load Balancing
- DNS Analytics
3. Security
- Detect and mitigate DDOS Attacks
- Terminate TLS connection
- Check visitor IP against Cloudflare database
- Check visitor IP against Customer access rules
- Apply custom Rate Limiting
- Check request against Web Application Firewall (WAF) rulesets, Cloudflare, OWASP and Custom.
4. Performance
- HTTP manipulation
- Serve static content from global, tiered cache (Argo Tiered Caching) + Workers
- Load balance to Active, Healthy origin
- Choose fastest route to origin server for dynamic requests (Argo Smart Routing)
5. Origin (Pool)
- Retrieve any uncached dynamic content from the Origin pool (Servebolt Cloud, Google or Amazon)
6. Performance
- Accelerate dynamic content (Railgun)
- Apply web content optimization features (Auto minify, Image compression)
7. Insights
- Aggregate HTTP Analytics
- Aggregate Threat Analytics
- Aggregate DNS Analytics
- Store Enterprise Logs for API retrieval
- Insertion of Apps
8. Serve request
The request is served from Cloudflare back to the browser (or any other application initiating the request).
Is it fast?
After seeing this list, it might seem like an awful lot of work for a single request. Especially when just a single page request often consists of tens or even hundreds of requests. Cloudflare has always been about providing a security and CDN solution where performance also plays a lead role. Their continued focus on performance is what’s ensuring that all this work can be done in a matter of milliseconds.