Blog 11 min read
Estimate message queue cost per month
method for overseas founders pricing async/webhook/background queues: separate Amazon SQS Standard/FIFO vs Cloudflare Queues ops vs Google Cloud Tasks create+delivery, with dated 1M vs 30M worked example
Overseas SaaS and Next.js builders often price functions, Postgres and a Redis cache first, then add webhooks, emails and background jobs — and ask what the queue costs. Amazon SQS requests, Cloudflare Queues operations and Google Cloud Tasks billable operations all rhyme at about $0.40 per million, but each counts a different unit. Do not fold them into the function or cache worksheet.
This is a method article. It shows how to separate Amazon SQS (Standard and FIFO) per-API-request billing, Cloudflare Queues per-64 KB operations, and Google Cloud Tasks create + delivery operations from serverless function compute and Redis/cache, run a dated 1M vs 30M messages worked example, and flag the traps that make apples-to-oranges comparisons. Start from the prior delivery steps: estimate Redis cache cost per month, estimate serverless function cost per month and estimate serverless Postgres cost per month. No vendor is recommended. All dollar figures are illustrative, based on public list prices re-checked on 2026-11-03 Asia/Shanghai (aws.amazon.com/sqs/pricing/, developers.cloudflare.com/queues/platform/pricing/, cloud.google.com/tasks/pricing). SQS figures below are US East (N. Virginia) on-demand rates; other regions differ — see the traps section. Prices change, so re-check each vendor's current pricing page before you decide.
1. Step 1: separate queue billing from functions, Redis and Postgres
Do not fold the queue into the function, cache or database worksheet. Four layers:
- Function invoke / compute: the producer and consumer code (Lambda, Workers CPU, Cloud Run). Covered in the serverless function method.
- Session / cache: Redis commands, GB-hours or KV ops. Covered in the Redis cache method.
- Managed Postgres: CU-hours and storage. Covered in the serverless Postgres method.
- Queue: how sends, receives, deletes, retries and payload chunks are counted as billable requests or operations — minus each vendor's free allowance.
Monthly queue cost ≈ (messages × billable units per message × payload chunks + retries/empty receives − free allowance) × unit price (+ extra queues). Queue ≠ functions ≠ cache ≠ Postgres. Keep SNS, EventBridge and Service Bus off this worksheet.
2. Step 2: pick the billing model
| Model | What you pay | Typical fit |
|---|---|---|
| Amazon SQS Standard | Per API request (send, receive, delete, change visibility, empty receives); batch of up to 10 msgs ≤1 MiB = 1 request; each 64 KB chunk = 1 request | AWS-hosted workers and Lambda consumers; at-least-once delivery |
| Amazon SQS FIFO | Same metering at a higher FIFO request rate | Strict ordering / exactly-once processing per message group |
| Cloudflare Queues | Per operation: each 64 KB written, read or deleted — per message, not per batch; ~3 ops per message | Workers producers/consumers; no egress charges |
| Google Cloud Tasks | Per billable operation (API call or push delivery attempt), chunked at 32 KB; ~2 ops per first-try task | HTTP push to Cloud Run / App Engine / any HTTPS handler with rate limiting |
Out of MVP scope: SNS / EventBridge / Service Bus; SQS Extended Client payloads in S3 and KMS call charges; Workers Paid subscription CPU; Cloud Run always-on instances.
3. Step 3: dated list prices (re-verified 2026-11-03)
Illustrative list rates used below. Re-check the linked pages; free tiers, tiering and regional rates can nudge small workloads.
| Line (list, 2026-11-03) | Amazon SQS (us-east-1) | Cloudflare Queues (Workers Paid) | Google Cloud Tasks |
|---|---|---|---|
| Free allowance | 1M requests/mo, every month (across regions) | 1M operations/mo included | First 1M billable operations/mo free |
| Unit price | Standard $0.40/M requests (first tier); FIFO $0.50/M | $0.40/M operations | $0.40/M billable operations |
| What counts | Every API action; batch ≤10 msgs and ≤1 MiB = 1 request | Each write, read, delete per message; retries = extra reads | Each API call or push delivery attempt |
| Payload chunk | 64 KB per request | 64 KB (KB = 1,000 bytes, ~100 B metadata) | 32 KB |
| Add-ons / notes | Fair Queue optional +$0.10/M on top of standard (default off); same-region transfer free; region disclaimer | First 10,000 queues included, then $0.10/queue-month; no egress; Free plan = 10,000 ops/day cap (note only) | Handler compute (Cloud Run, etc.) billed separately |
4. Worked example: 1M vs 30M messages
Assumptions (illustrative, list prices as of 2026-11-03 Asia/Shanghai). Payload <32 KB, each message consumed once, no retries, no empty receives. SQS ≈ 3 requests per message (send + receive + delete, unbatched); Cloudflare Queues = 3 ops; Cloud Tasks ≈ 2 ops (create + delivery). Scenario A — side project: 1M messages/mo. Scenario B — production: 30M messages/mo.
| Option | Math | Monthly |
|---|---|---|
| SQS Standard (A) | 3M − 1M free = 2M × $0.40/M | ≈ $0.80 |
| Cloudflare Queues (A) | 3M − 1M = 2M × $0.40/M | ≈ $0.80 |
| Cloud Tasks (A) | 2M − 1M = 1M × $0.40/M | ≈ $0.40 |
| SQS Standard / FIFO (B) | 90M − 1M = 89M × $0.40/M; FIFO 89M × $0.50/M | ≈ $35.60; FIFO ≈ $44.50 |
| Cloudflare Queues (B) | 90M − 1M = 89M × $0.40/M | ≈ $35.60 |
| Cloud Tasks (B) | 60M − 1M = 59M × $0.40/M | ≈ $23.60 |
Apples note: the per-million price is the same, so the difference comes from how many units one message produces. Batching SQS receives and deletes (10 per request) can cut SQS well below the unbatched figure; Cloudflare Queues cannot batch its way down because ops are per message. Cloud Tasks looks cheapest here, but its handler runs on Cloud Run or another service you pay for separately — as do Lambda and Workers consumers. Treat totals as worksheets, not invoices.
5. Step 5: traps
- Counting only messages sent: SQS bills receive, delete, change-visibility and empty receives too. Short polling on an idle queue can burn requests with zero messages — use long polling.
- Comparing Cloudflare batch size to billable ops: a batch of 10 is still 10 writes, 10 reads and 10 deletes. Retries add reads per message.
- Folding consumer compute into the queue line: Cloud Run, Lambda and Workers CPU belong on the function worksheet.
- Ignoring payload chunking: Cloud Tasks chunks at 32 KB, SQS and Cloudflare at 64 KB. A 96 KB payload is 3 Cloud Tasks ops but 2 SQS/Queues units.
- Assuming FIFO = Standard rate: SQS FIFO is $0.50/M vs $0.40/M. Fair Queue, if enabled with message group IDs on standard queues, adds +$0.10/M on top.
- Treating free tiers as identical units: 1M SQS requests, 1M Cloudflare ops and 1M Cloud Tasks ops cover different numbers of messages (~333K, ~333K and ~500K here).
- Unit prices rhyme, units differ: $0.40/M everywhere is not the same bill — multiply by units per message first.
6. Checklist before you commit
- Finish function, cache and Postgres worksheets separately from the queue line.
- Forecast monthly messages, average payload size and expected retry rate.
- Convert messages to billable units per vendor (SQS requests incl. batching and empty receives; Queues ops; Cloud Tasks ops).
- Apply payload chunking (64 KB vs 32 KB) and each free allowance explicitly.
- Choose Standard vs FIFO; confirm Fair Queue is off unless you need it.
- Set the SQS region (MVP rates = us-east-1); re-price if you run elsewhere.
- Re-check every list price on the vendor's current pricing page before you commit.
7. Calculators and related reading
Use these calculators to check current queue prices.
- AWS SQS cost calculator
- Cloudflare Queues cost calculator
- Google Cloud Tasks cost calculator
- Message queue cost comparison
- Estimate Redis cache cost per month: session/cache beside the queue bill
- Estimate serverless function cost per month: producer/consumer compute beside the queue bill
- Estimate serverless Postgres cost per month: database compute/storage beside the queue bill
Several vendors are listed on purpose. The aim is to compare per-request vs per-operation vs create+delivery structures, not to pick a vendor in advance.
Turn queue cost into a clear product site
Infrastructure math only helps when product pages, APIs and buyer inquiries convert. If you want help with that, contact us or see how the platform fits.
Next step
Want a crawlable inquiry site for that topic?
Tell us the product, target market, and how many sites you need. We build English inquiry pages search engines and AI crawlers can read—then route buyer messages into one admin.
See how Yizhan builds crawlable inquiry sites on the platform page, or leave a request.