You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Going through the code, just want to confirm, it looks like for (almost) every request to your site you will get billed by cloudflare for both a workers request and a KV read. For stale content, you'll get both a workers request and KV write request billed? Am I thinking about that correctly?
As well, have you been able to determine the amount of CPU time used for successful KV responses? Obviously, for non-KV responses the CPU time will be highly dependent on how long your framework of choice takes to render the page.
Lastly, neither workers nor KV appears to charge for bandwidth, so am I correct that you'd only get billed by the amount of invocations and the amount of storage in KV?
The text was updated successfully, but these errors were encountered:
Hi!
I've created this repo 3 years ago as an experiment, so I'm not really sure it still works.
Regarding your questions:
Every read to KV goes through the Cloudflare cache first as implemented in @cloudflare/kv-asset-handler. Even though cache hits are non-deterministic, if your site has a lot of traffic you can be quite sure most of the requests for an asset will hit the cache
Workers only bill for non-IO-bound CPU time, that means the time waiting for the KV response is not billed ( I'm not 100% sure but KV.get being async I assume it's going to make some kind of TCP call )
Yes bandwidth transfer is always free on Cloudflare for every product
Thanks for the work on this. It looks good.
Going through the code, just want to confirm, it looks like for (almost) every request to your site you will get billed by cloudflare for both a workers request and a KV read. For stale content, you'll get both a workers request and KV write request billed? Am I thinking about that correctly?
As well, have you been able to determine the amount of CPU time used for successful KV responses? Obviously, for non-KV responses the CPU time will be highly dependent on how long your framework of choice takes to render the page.
Lastly, neither workers nor KV appears to charge for bandwidth, so am I correct that you'd only get billed by the amount of invocations and the amount of storage in KV?
The text was updated successfully, but these errors were encountered: