Skip to content

Ramblings on Cloudflare cost #98

Answered by bdon
eddy-geek asked this question in Q&A
Discussion options

You must be logged in to vote
  • you can set CACHE_MAX_AGE in the Workers script and choose 1 week or 1 month. a 50% cache hit rate is a reasonable guess at longer cache ages.

  • Range reads are Class B operations, which are $0.36 per million.

  • 1000 tiles per session is pretty unusual, I would estimate an average of 20-50 tiles per user session, of course it depends on your application.

  • The possibility of users scraping tiles is present for any public-facing API, even if you use a hosted SaaS.

Using R2 or S3 directly without the CDN is the recommended deployment method for hobby projects. Range requests work fine concurrently on R2 because it uses HTTP/2, but the latency is poor right now (can spike to 1-2 seconds).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bdon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants