queue-advisor-pricing-app
Compare SQS, Kinesis, EventBridge and MSK by cost and fit before you pick the queue
git clone https://github.com/fernando-moretes/app-queue-advisor-pricing.gitListen to guide
generated on playGenerated only on first play
Powered by Amazon Polly + OmniVoice
QueueAdvisor is a Next.js app that compares SQS, Kinesis, EventBridge and MSK side by side — estimated cost and technical fit — from your throughput and retention, so the messaging choice is made with a number on the table instead of with whichever service someone on the team happened to use last.
Why this repository exists
The question I heard most often in architecture reviews was never "which queue should we use?" — it was "what does this cost a year from now, when volume is ten times higher?". The four AWS messaging services answer that question with different billing models, and that is exactly where comparing in your head breaks down.
SQS bills per million requests, with every 64 KB of payload counting as one request. Kinesis Data Streams bills per shard-hour (or per GB ingested in on-demand mode) plus extended retention beyond 24 hours. EventBridge bills per million events published to a custom bus. MSK bills per broker-hour and per GB-month of storage, whether the cluster is busy or idle. Four units, four curves: one is linear with message count, one is a staircase with shard count, one is nearly flat regardless of traffic.
I have watched decisions get made from a three-month-old spreadsheet — and the invoice come in differently because nobody counted the average message size. This repository exists to turn that arithmetic into a form: you enter throughput, message size and retention, the app applies each service's pricing model and shows the four results on one screen. The goal is not to replace the AWS Pricing Calculator; it is to answer, in under a minute, at which volume band each service stops making sense.
What the tool delivers
How the flow works
From the architect's input to the recommendation: everything runs client-side, Vercel only serves the files.
- Formulário · msg/s · KB · dias
- Modelo de preço · TypeScript, por serviço
- Regras de encaixe · ordenação · replay · fan-out
- Tabela comparativa · custo/mês + veredito
- SQS · por milhão de req
- Kinesis · shard-hora / GB
- EventBridge · por milhão de eventos
- MSK · broker-hora + GB-mês
How the comparison is built
The app is a form plus a pricing model in TypeScript. There is no runtime call to the AWS Price List API — rates are constants in the code, which keeps the tool static, fast and credential-free, with the maintenance cost that comes with it: someone has to update the constant when AWS changes the table.
Inputs: messages per second, average message size in KB, retention in days and, for fit, what the workload demands — strict ordering, replay of old messages, more than one consumer reading the same event.
Cost: each service has its own function. For SQS, the model converts throughput into requests per month and rounds payload up in 64 KB chunks — that rounding is why a 70 KB message costs twice a 64 KB one. For Kinesis, it derives the shard count from the larger of 1 MB/s write and 1,000 records/s per shard, multiplies by shard-hours and adds retention beyond 24 h. For EventBridge, it is events per million, with the 256 KB payload limit as a constraint rather than a cost. For MSK, it is broker-hours times broker count plus GB-month of storage — the fixed cost that dominates at low volume.
Fit: simple rules flag what each service does not do. Standard SQS does not guarantee order; SQS FIFO does, but with a per-group throughput ceiling. Kinesis and MSK allow replay within retention; SQS does not. EventBridge fans out to multiple targets per rule; SQS delivers each message to one consumer.
The output is a table: four columns, estimated monthly cost and fit flags. The table does not decide for you — it removes the part of the conversation that is arithmetic.
Install and use
- 1
Use the published version or clone
For a quick comparison, open
https://queue.moretes.com— nothing to install. To change rates or rules, clonegithub.com/fernando-moretes/app-queue-advisor-pricing. - 2
Install dependencies with pnpm
The project uses
pnpm. Runpnpm installat the root; Node 20 or later is what current Next.js expects. - 3
Start the dev server
pnpm devserves the app athttp://localhost:3000. No environment variable and no AWS credential involved. - 4
Enter the scenario
Fill in throughput in messages per second, average size in KB and retention in days. Tick the requirements — ordering, replay, multiple consumers — if the workload demands them.
- 5
Read the table and try double
Compare monthly cost and fit flags. Then double the throughput and watch which service jumps a step — that is where the decision becomes visible.
- 6
Adjust a rate and open a PR
If AWS changed a price, edit the service constant in the model, run
pnpm buildto confirm the typecheck, and open a pull request with the pricing page URL in the body.
git clone https://github.com/fernando-moretes/app-queue-advisor-pricing.git
cd app-queue-advisor-pricing
pnpm install
pnpm dev # http://localhost:3000
# antes de abrir PR / before opening a PR
pnpm buildEstimate, not invoice
The rates in the code are public rates for one region and one date; AWS changes the table without notice, and free tier, Savings Plans and cross-AZ traffic are not in the math. Use the result to eliminate options and rank what is left — close the final number in the AWS Pricing Calculator with the real region and account.
How to read the result without fooling yourself
Three things I learned using this tool in architecture reviews.
The lowest cost is rarely the answer. At 100 messages per second with a 4 KB payload, SQS usually comes out cheaper than anything else — and it is the wrong choice if you need to reprocess the last 24 hours after a broken deploy. The fit column exists for that: a service flagged as no-replay should not win on price.
Message size matters more than throughput. The SQS model rounds to 64 KB chunks; the Kinesis model counts shards per MB/s. A workload of 50 messages per second at 200 KB each costs, in SQS requests, the same as 200 messages per second at 50 KB. Whoever only reports "messages per second" underestimates the bill.
Fixed cost becomes an advantage at high volume. MSK looks expensive at 10 messages per second because the broker-hour does not know it is idle. At 20,000 messages per second with 7-day retention, that same fixed bill falls behind Kinesis on-demand — and that is where having all four on one screen, with the same scenario, beats four estimates made on different days.
The tool does not replace the architecture design. It replaces the part of the design that used to be a spreadsheet.
Frequently asked questions
Does the tool query the AWS Price List API?
No. Rates are constants in the TypeScript code, which keeps the app static and credential-free. The cost of that is manual maintenance when AWS changes the table — which is why the repository is public and accepts PRs.
Why does MSK look so expensive at low volume?
Because MSK bills per broker-hour and per GB-month whether the cluster is busy or idle. At 10 messages per second you pay for the whole cluster for almost nothing. The curve only crosses the usage-priced services at high throughput with long retention.
Can I use the result as an official budget?
No. Use it to eliminate options and rank the rest. Free tier, Savings Plans, cross-AZ traffic and per-region differences are outside the model. The final number comes from the AWS Pricing Calculator with the real region and account.
The README still points to `fernandofatech/queue-advisor-pricing-app`. Which repository is right?
The current one is fernando-moretes/app-queue-advisor-pricing; the old one redirects. Clone by the new name so you do not depend on GitHub's redirect.
References
When to use it
Use QueueAdvisor when: you are between two or more AWS messaging services, you have an honest estimate of throughput, message size and retention, and you need to show in a meeting why one option leaves the table. Do not use it as a final budget or as a substitute for the design — it does not know your region, your Savings Plan or who operates the cluster at 2 AM. It answers one question only, and answers it well: at which volume band each service stops making sense.
Architecture, AWS, AI and market deep dives — straight to your inbox. Free.
No spam · unsubscribe anytime