Apache Kafka
3-broker Apache Kafka cluster in KRaft mode (no ZooKeeper) with Kafbat UI - durable defaults, official images, env-only config.
One-click deploy, from $49/mo on a Miget plan.
Apache Kafka is the de-facto standard event streaming platform - and one of the most expensive things to buy as a managed service. This template runs a real 3-node cluster in KRaft mode (combined broker+controller, no ZooKeeper) using the official apache/kafka image, configured entirely through environment variables. No custom images, no config files to maintain.
Topic defaults are durable out of the box: replication factor 3 and min.insync.replicas=2, so a broker can die without losing acknowledged writes. Each broker keeps its log dirs on its own persistent volume. Kafbat UI ships as the public entrypoint for browsing topics, consumer groups, and messages - the brokers themselves stay private on the project network.
Producers and consumers in the same Miget project connect with bootstrap servers kafka-1:9092,kafka-2:9092,kafka-3:9092 - no TLS/SASL gymnastics, the project network is the boundary.
Upstream project: Apache Kafka
#what you get
- 3 combined broker+controller nodes in KRaft mode - no ZooKeeper to run or patch
- Official apache/kafka image, configured 100% via environment variables
- Durable defaults: replication factor 3, min.insync.replicas=2
- Kafbat UI for topics, consumer groups, lag and message inspection
- Per-broker persistent volumes (10 GB each)
- Runs identically with plain docker compose up on a laptop
#topology
| Service | Role | Public |
|---|---|---|
| kafka-1..3 | combined broker+controller (Kafka API :9092, KRaft :9093) | no |
| kafka-ui | Kafbat UI web console | yes (HTTP) |
#miget sizing
// this stack needs
7 GiB RAM · 30 GB disk · 4 services
2 GiB per broker covers a 1 GiB JVM heap plus page-cache headroom - Kafka loves page cache, so do not starve it. 10 GB disk per broker is a starting point; resize volumes as retention grows.
Hobby - recommended fit
$49/mo
4 vCPU · 8 GiB · 160 GiB disk
Headroom for your own apps: 16 GiB at $97/mo
Professional - production
$85/mo
4 vCPU · 8 GiB · 50 GiB disk
Dedicated resources, production SLOs - plan details
One Miget plan is a fixed pool of compute - the whole stack (managed databases included) deploys inside it, and anything left over runs your other apps. No per-service or per-seat math.
#vs. the managed service
What the hosted equivalents charge, against the flat Miget plan this stack fits on. Prices as of June 2026, sources linked.
| Service | Plan | Monthly | What you get |
|---|---|---|---|
| Apache Kafka on Miget ★ | 8 GiB plan | $49 | this whole stack, flat - no usage meters, and room left for your own apps |
| Confluent Cloud | Basic (usage-based) | ~$120 | small always-on workload (~2 eCKU avg + transfer + storage); Standard tier from ~$385/mo |
| AWS MSK | 3× kafka.t3.small | ~$130 | smallest 3-broker provisioned cluster + EBS storage; AWS’s own sizing example (3× m7g.large) lands ~$607/mo |
#vs. other PaaS
Estimated monthly cost of running this exact stack (7 GiB RAM, 30 GB disk, 4 containers) elsewhere, from published June 2026 rates.
| Platform | Est. monthly | Notes |
|---|---|---|
| Miget ★ | $49 flat | compose stacks first-class: one deploy, dedicated vCPU, managed Postgres/Valkey, volumes and TLS all included in the plan |
| Heroku | ~$350 | no volumes; nothing between 1 GB ($50) and 2.5 GB ($250) dynos - 2 GB containers cost far more than shown |
| Render | ~$95 | per-service instances (0.5 GB $7, 2 GB $25) - every container is its own paid service |
| DO App Platform | ~$89 | no persistent volumes - stateful containers need managed DBs/Spaces (base $5 Spaces included here) |
| Railway | ~$75 | usage-based ($10/GB RAM-mo); vCPU billed separately at $20/vCPU-mo on top |
| Fly.io | ~$46 | cheapest sticker price - but burstable shared CPUs (1/16 core; dedicated vCPUs cost ~2-3×), no compose deploys (one app per container, manual wiring), managed DBs billed extra |
Estimates assume RAM fully allocated at published on-demand rates - and sticker price isn't the whole comparison: the cheaper rows buy burstable shared CPUs, per-service wiring instead of a compose deploy, and managed databases billed separately. Heroku and DO App Platform have no persistent volumes at all - stateful stacks like this one need workarounds there.
#deploy it
On Miget
- Create a Compose Stack in app.miget.com pointing at the templates repository
- Set the stack path to
kafka - No required variables - deploy as-is
- Deploy. Miget layers
compose.miget.yaml(RAM, privacy, volumes, managed services) automatically
Locally first?
Every template is portable, vanilla Docker Compose - the Miget overrides are ignored locally:
git clone https://github.com/deployable-sh/stacks
cd miget-compose-templates/kafka
docker compose up -d Same files, same behavior. The template README covers connection strings and scaling notes.
#faq
How much does it cost to self-host Kafka vs Confluent Cloud or MSK?
This 3-broker cluster fits the 8 GiB Miget hobby plan at $49/month flat (or $85/month on a Professional plan). Managed Kafka typically starts around several hundred dollars a month for a comparable always-on 3-broker setup, before egress. The flat Miget plan also still has room for your producer/consumer apps.
Does this Kafka setup use ZooKeeper?
No. The cluster runs in KRaft mode - each node is a combined broker and controller, which is the supported, ZooKeeper-free architecture in modern Kafka. Fewer moving parts, fewer pods, faster controller failover.
Can a broker fail without data loss?
Yes, for acknowledged writes: topics default to replication factor 3 with min.insync.replicas=2, so the cluster tolerates one broker outage while still accepting produces with acks=all.
How do my applications connect to this Kafka cluster?
Apps deployed in the same Miget project use kafka-1:9092,kafka-2:9092,kafka-3:9092 as bootstrap servers - plain PLAINTEXT on the private project network. The brokers are never exposed to the internet; only the Kafbat UI gets a public domain.
Can I scale this cluster to more brokers?
Yes - add a kafka-4 service block (cluster nodes need stable identity and their own volume, so you scale by adding blocks, not replicas) and include it in the controller quorum voters list.
Ship Apache Kafka today
One compose stack, 7 GiB of RAM, from $49/month flat, and it runs on your laptop with the same files.