Cloudflare is well known for protecting origin server ip (letting attacks unless you pay the price)
Currently extending its scope to offer cloud functions and edge databases. With this post I want to explore differences of database offerings with you.
KV
Key value databases stores small amounts of data for given namespace/key.
Most common examples can be user configuration settings, routing information, A/B testing configurations, authentication tokens, application data, user sessions, and shopping cart details
Pricing 10M read 5$ , write 50$
Private to workers
R2
R2 is unstructured database, you can store json documents, podcasts, html content, assets. Provides AWS S3 compatiblity.
Pricing
10M read 4$ write 45$
1GB 0.015$
Can be opened to public.
D1
serverless sql database sqlite based. Sqlite is very poweerful and has multi
Pricing
10M read 0.01$ write 10$
1GB 0.75$
Queues
For inter-communication between, job queuing, you can push from durable objects. I cant find detailed info if we can subscribe in our system or if it's used only in cloudflare workers.
Pricing
10M read/write 4$
Choosing a data or storage product. · Cloudflare Workers docs
Example scenarios
Small ecommerce store of 1k products 15k pageview
Website features a diverse inventory of 1,000 products spread across 20 categories, catering to a daily influx of 1,000 visitors. With approximately 2,000 searches conducted daily and 10,000 product interactions, including 20 transactions and 10 comments, our platform engages a significant audience. All of this is managed by one person.
Extended ecommerce store of 5k products, 100k pageview
Big ecommerce hub 1M products, 1k vendors, 20M pageview