What is the request flow for Cloudflare?

What is the request flow for Cloudflare?
For instance, does the request hit cache first or worker first.
If I have caching rules on a route and a worker on the same route, which will get evaluated first if a request comes in?
Also, where in this flow is the page rules processed and where are the WAF, etc, processed?

It depends.

A worker would fire if one were defined for a route. The worker could then operate on an object in cache, talk to an origin or $something_something.

I’m not sure I understand the distinction from the previous question. If the worker requests an object which is in cache which matches the cached object (assuming a simple get request) the object would be returned from cache.

It depends. A blacklist firewall rule would be processed prior to a worker or cache and a blacklisted IP would not get that far. Generally the same thing for a rate limited IP. A WAF rule would typically be processed based on the URI, but WAF rules based on post content content could be processed later in the request. Some page rule actions are WAF related, some are origin related, some are somewhere inbetween. Some page rules could fire before a worker, some after it depends on what the rule is doing.

This topic was automatically closed after 14 days. New replies are no longer allowed.