Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for RabbitMQ Difficulty: Advanced ClaudeChatGPTCursor

RabbitMQ perf-test Benchmark & Capacity Plan Prompt

Design a rigorous rabbitmq-perf-test benchmark that measures publish/consume throughput, end-to-end latency, and confirm/ack overhead for a specific workload — so capacity numbers come from data, not guesses.

Target user
Platform and SRE engineers benchmarking RabbitMQ before a launch or migration
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior platform engineer who has benchmarked RabbitMQ clusters with the official `rabbitmq-perf-test` (PerfTest) tool before production launches. Help me design a benchmark that actually predicts how my cluster behaves under my real workload, not a synthetic best case.

I will provide:
- Target workload: expected publish rate, consumer count, average and p99 message size, and whether traffic is steady or bursty [DESCRIBE]
- Durability and safety requirements: quorum vs classic queues, publisher confirms, consumer acks, persistent vs transient [DESCRIBE]
- Cluster shape: node count, vCPU/RAM per node, disk type (SSD/NVMe/network), and RabbitMQ + Erlang versions [DESCRIBE]
- The load-generator hosts (must be separate from the broker) and network path between them [DESCRIBE]

Your job:

1. **Translate the workload into PerfTest flags** — map my requirements to concrete flags: `--producers`/`--consumers`, `--rate` (publisher rate cap), `--size`, `--queue`/`--queue-pattern`, `--flag persistent`, `--confirm` (outstanding confirms), `--multi-ack-every`/`--qos` (prefetch), `--queue-args x-queue-type=quorum`, and `--autoack` off for realistic ack cost. Explain what each flag changes about the measurement.

2. **Isolate one variable at a time** — design a matrix that sweeps a single dimension per run (rate, message size, prefetch, producer count, quorum vs classic) so each result is attributable. Warn against changing three things at once and drawing conclusions.

3. **Separate open-loop from closed-loop tests** — clarify when to cap publishers with `--rate` (open-loop, to find sustainable throughput and see backlog form) versus letting them run uncapped (closed-loop, to find the ceiling and where latency explodes). Both matter; they answer different questions.

4. **Define pass/fail up front** — pick the metrics that decide success: sustained publish/consume rate at steady state, end-to-end latency (PerfTest `--use-millis` latency output), confirm latency, and whether `messages_ready` stays flat (consumers keep up) or grows (broker is the bottleneck).

5. **Guard the measurement** — run generators on separate hosts from the broker, warm up before recording, run long enough to pass GC/checkpoint cycles, and watch the broker itself (`rabbitmqctl list_queues`, memory/disk alarms, CPU, Ra segment writes for quorum) so you catch a broker-side bottleneck rather than a client-side one.

6. **Turn results into capacity numbers** — from the sweep, state the sustainable rate with headroom, the message size where latency degrades, the prefetch sweet spot, and the safety margin to recommend for production.

Output as: (a) the PerfTest command matrix with each flag justified, (b) the metrics to capture per run and where to read them, (c) the interpretation guide (what a growing backlog vs a latency spike vs a broker alarm each tells you), and (d) the capacity recommendation template to fill in once runs complete.

Run benchmarks on a non-production cluster or a clearly isolated environment. PerfTest can saturate a broker and trigger memory/disk alarms that block publishers — never point an uncapped closed-loop run at anything sharing infrastructure with production.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Why this prompt works

Most RabbitMQ benchmarks are wrong in the same two ways: they change several variables per run so no result is attributable, and they run the load generator on the broker host so client CPU steals from the broker and the numbers mean nothing. This prompt forces the discipline that makes a benchmark predictive — one variable per run, generators isolated, warm-up before recording, and runs long enough to survive a GC and checkpoint cycle.

It anchors on the distinction that trips up most capacity work: open-loop versus closed-loop. Capping publishers with --rate shows you whether the cluster can sustain a target while keeping the backlog flat; running uncapped shows you the ceiling and exactly where latency explodes. They answer different questions, and confusing them is how teams either over-provision wildly or ship a cluster that collapses at launch.

The guardrails reflect a real hazard: PerfTest is powerful enough to push a broker into a memory or disk high-watermark alarm, which blocks every publisher on the cluster — so an uncapped run against shared infrastructure is an outage waiting to happen. Keeping it isolated and alarm-monitored is the difference between a benchmark and an incident.

Related prompts

More RabbitMQ prompts & error guides

Browse every RabbitMQ prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.