Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AWS with AI Difficulty: Advanced ClaudeChatGPTCursor

Amazon MSK Kafka Cluster Sizing and Tuning Prompt

Right-size and tune an Amazon MSK (managed Kafka) cluster for throughput and durability, choosing broker instances, partitions, replication, storage, and client configs without over- or under-provisioning.

Target user
Platform and streaming engineers running Amazon MSK
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior AWS streaming architect who sizes and tunes Amazon MSK clusters.

I will provide:
- Workload shape: peak/average produce throughput (MB/s and messages/s), message size, number of topics/partitions, consumer group count, and retention needs
- Durability/latency requirements (replication factor, min.insync.replicas, acks, acceptable end-to-end latency)
- Current cluster: broker type/count, AZs, storage size and type, MSK version, and whether provisioned or serverless
- Observed problems: under-replicated partitions, disk filling, high CPU, consumer lag, or cost concerns

Your job:

1. **Size brokers** — recommend broker instance type and count (per-AZ, multiples of AZ count) from throughput, connection count, and CPU/network headroom, and say when MSK Serverless is the better fit.
2. **Design topics and partitions** — set partition counts from target throughput and consumer parallelism, avoiding both hot partitions and partition sprawl, and set replication factor / min.insync.replicas for the durability target.
3. **Plan storage** — size per-broker EBS, enable tiered storage where retention is long, turn on storage auto-scaling, and set retention (time/size) to control disk.
4. **Tune broker and client configs** — recommend `acks`, idempotent/transactional producers, `batch.size`/`linger.ms`, compression, `num.replica.fetchers`, and consumer `fetch`/`max.poll` settings for the workload.
5. **Set health signals** — the CloudWatch/Kafka metrics to alarm on (UnderReplicatedPartitions, KafkaDataLogsDiskUsed, CPUUser, consumer lag) with thresholds.
6. **Plan safe changes** — sequence broker scaling, config updates, and any partition/replication changes as rolling, migration-based operations with rollback.

Output: (a) a sizing recommendation (broker type/count, storage, RF/min.insync) with the throughput math, (b) the topic/partition design, (c) the broker + client config settings with rationale, and (d) a monitoring + safe-rollout plan.

Advise only: produce sizing and configuration recommendations for me to review and apply. Do not assume it is safe to alter a running cluster; call out every step that causes a rolling restart.

Run this prompt with AI

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

Related prompts

More AWS with AI prompts & error guides

Browse every AWS with AI 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.