If I have a queue and attach a producer/consumer worker, how many requests am I being billed?
The details are basically a worker enqueues one message (which constitutes to one row inserted into a 'clicks' table in DB), I want to consume any messages as often as possible (like a 30 second max consistency) to write into my Supabase DB, batching is preferred if it saves $$. I want to just design this realistically where I'm not burning money if I enqueue a million messages a month, etc.
4 Replies
Queues are billed per operation (every 64 KB that is read, write, delete) so if you have 1 million messages a month, that is 3 million operation so $35.60 USD. Plus worker request costs
Queues pricing: https://developers.cloudflare.com/queues/platform/pricing/#examples
Workers Pricing: https://developers.cloudflare.com/workers/platform/pricing/
Cloudflare Docs
Cloudflare Queues - Pricing · Cloudflare Queues
Cloudflare Queues charges for the total number of operations against each of your queues during a given month.
@Cyb3r-Jok3 lets say I batch my messages to save costs, does the request for the worker that dequeues get billed as well or is that a part of the queue 3 request bill?
also, thank you for the help!
Yes the consumer gets billed, but if your batch size is 10, there is one request for the worker to handle 10 messages
Right right, thanks, i just wanted to get some correct estimates before building, thank you