3 ms·
I wouldn't recommend using any sqlite database direct on s3... You'll end up with a pretty high bill from all the operations.
by londons_explore 4y ago
I wouldn't recommend using any sqlite database direct on s3... You'll end up with a pretty high bill from all the operations.
- toomuchtodo 4y agoDo range requests against s3 work if you’re fronting with Cloudflare and aggressively caching? Could be more economical.
- elithrar 4y agoIt should work directly against R2 - our S3 compatible object storage) w/ no egress fees: https://developers.cloudflare.com/r2/ https://developers.cloudflare.com/r2/ Makes experimenting with things like this much cheaper. (I work for CF)
- piperswe 4y agoThough if you have enough users pinging the server you'll probably end up with a bunch of operations happening, which do have fees. It may be better cost-wise to just put this SQLite database on D1 (especially if it gets read-only replication at some point) and set up a Worker to return tile data in one HTTP request. That way the infrastructure is still serverless, but doesn't require N requests per tile, just 1. (I also work for CF)
- simonw 4y agoCan D1 handle a 92GB SQLite database file?
- piperswe 4y agoI'm not sure! I would imagine it's planned though, scaling to that size seems important for a database product. I'm not on the D1 or R2 teams so I'm not intimately familiar with their products.
- toomuchtodo 4y agoThank you Cloudflare folks for contributing, extremely helpful.
- zylepe 4y agoWe’ve been experimenting with R2 for serving tiles from an 80gb pmtiles archive, unfortunately the latency on up to 3 byte range requests from a worker is 5-10 seconds so it’s not practical for real usage yet. Can we expect that to improve as R2 gets closer to general availability?