Cached traffic breakdown

Hello,

Since a couple days ago I’ve noticed traffic almost suddenly tripling on a domain I manage, luckily almost all of that is cached by Cloudflare, so that’s not a problem. However with that increase of traffic there’s also a lot more that’s going through Argo now, so now we’re noticing our Argo bill increasing with no obvious way to investigate what that traffic exactly is.

So what I was wondering is whether it’s possible to have a cached traffic breakdown of some kind, because being billed for something that you can’t investigate yourself is quite worrying. Currently our argo bill is pretty manageable, but if it increases even more in the future then it’ll definitely be a problem.

The best service for this would be Logflare.app (by @chasers), it gives you great insights and you can do all your data analysis afterwards in Google’s Data Studio.

1 Like

I do have a worker on the domain that logs every hit, but I’m not actually noticing any increases in our logs. And when I check Cloudflare’s analytics it shows that the influx of traffic is “cached” instead of it returning a status code from the workers, so it seems like that cached traffic skips the worker for some reason?

Sent my message a bit too fast, here is the screenshot of the analytics chart I’m talking about.
This chart is located at Workers > Status Codes

:heart: :heart: :heart:

If you get setup on Logflare you can copy this report: Frontend Dashboard Logflare.app

There is already a filter there for the cache status. Use that, and then I might build a couple reports around IP addresses (via metadata.request.headers.cf_connecting_ip).

1 Like

Ah yeah, nevermind. No idea if we’d be able to give you insight there you’d have to play with it and see.

The worker is never skipped, unless the requests are blocked by the firewall before it even reaches the Worker.

That seems very strange, I don’t think I ever saw that status code. I would have to check though… maybe ask support if they know what that means?

It was my assumption that the status codes in that chart were the status codes being returned from the subrequests inside your worker. So those are all the status codes of the origin and when it’s “Cached” it’s being returned from Clouflare.

1 Like

BUT you should still be able to pull any info you need from the response in your worker and log it wherever you’re logging it.

This is the response from support regarding the “cached” status code:

Requests served by a Worker always show as cached . For an accurate cache hit ratio on subrequests, see the Subrequests graph in the Analytics app under the Workers analytics tab.

It still leaves me a bit puzzled why my logs aren’t aren’t showing the influx. Will give logflare a try and report back soon. Thanks for your help and responses so far :smile:

1 Like