Vibe Engines
YouTube

Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path

Handbooks  /  Kafka vs Kinesis
Engineering~8 min readComparison
Head to Head

Kafka vs Kinesis: portable log, or zero-ops AWS stream?

KafkavsKinesis

Underneath, they're the same idea — an append-only, partitioned log that consumers read at their own pace. The real choice isn't about the streaming model at all. It's about who operates it, and whether you're willing to live inside AWS to get out of doing that yourself.

01

The one distinction that decides everything

Kafka is open-source software you run yourself (or via a managed offering like Confluent or Amazon MSK) — a distributed, partitioned, replicated log, portable across any cloud or on-prem. Kinesis is AWS's fully-managed streaming service, built on the same append-only log idea but organized into shards instead of partitions, and it exists only inside AWS.

→ The rule

Need to run outside AWS, want the biggest ecosystem, or need very long/infinite retention? Kafka. Already all-in on AWS and want zero operational burden? Kinesis.

02

Head to head

DimensionKafkaKinesis
ManagementYou run/tune brokers (or a managed offering)Fully AWS-managed, zero ops
Lock-inPortable — any cloud, on-premAWS-only
Scaling unitPartitions, very high throughput ceilingShards, provisioned or on-demand
Per-unit throughputTunable, generally highFixed: 1MB/s in, 2MB/s out per shard
RetentionConfigurable, can be near-infinite (tiered storage)Default 24h, up to 365 days at extra cost
Cost modelInfra/ops cost — cheaper at massive self-run scalePay-per-shard-hour + PUT/GET — cheap to start
EcosystemHuge — Connect, Streams, ksqlDB, FlinkTight AWS integration — Lambda, Firehose, Analytics
Multi-cloudYesNo
03

When to use each

Reach for Kafka

  • Multi-cloud or on-prem requirements
  • Need long retention / full replay of history
  • Want the largest streaming ecosystem and tooling
  • Already run dedicated ops/platform teams
  • Extreme throughput on a single hot stream

Reach for Kinesis

  • Already all-in on AWS
  • Want zero operational burden
  • Need tight Lambda / Firehose / Analytics integration
  • Smaller team without dedicated streaming ops
04

They’re substitutes, not complements

Unlike RAG-and-fine-tuning or MCP-and-A2A, you don't typically run both in the same pipeline — pick one streaming backbone. The existence of Amazon MSK (managed Kafka, running on AWS) is itself telling: it's AWS acknowledging that some teams want Kafka's specific model and ecosystem even while staying on AWS, rather than Kinesis's shard model, which shows this is a genuine architectural trade-off and not just "AWS vs not-AWS."

→ The migration reality

Moving between them is more of an ops/infrastructure decision than an architecture rewrite — both are the same log-and-offset model underneath — but Kinesis's hard per-shard throughput ceiling can force a re-architecture Kafka's tunable partitions wouldn't have.

05

Same log model, different hard limits

Both systems implement the same core idea: an append-only, partitioned log where consumers track their own read position (offset in Kafka, sequence number in Kinesis) and can replay by resetting it. That means the semantic guarantees — ordered delivery within a partition/shard, at-least-once consumption, replay from any retained point — are essentially the same on both. The difference that actually bites in practice is the throughput ceiling per unit: a Kafka partition's throughput is tunable and can be pushed very high by adjusting broker resources, while a Kinesis shard has a hard, fixed limit of 1MB/s in and 2MB/s out, full stop, regardless of what you're willing to pay for bigger hardware.

This matters specifically for "hot key" streams — if one partition key (say, one very active user or one very busy IoT device) needs to sustain more than 1MB/s, Kinesis forces you to solve it with application-level key-splitting tricks, because there's no "just make this shard bigger" option the way there effectively is with a Kafka partition on beefier hardware. It's a small-sounding limit that becomes a real architecture constraint at the tail of a workload's traffic distribution.

→ The trade you’re actually making

Kinesis trades away Kafka's tunable per-partition ceiling for the operational simplicity of never having to tune a broker — fine until one shard's traffic wants to exceed a hard-coded number.

06

A worked scenario: a clickstream analytics pipeline

An analytics team already runs Lambda consumers, streams to S3 via Firehose, and visualizes in QuickSight — all AWS-native. Kinesis fits this pipeline directly: no brokers to run, and the integration points (Lambda triggers, Firehose delivery) are first-class, managed features rather than something to wire up manually. The zero-ops story is a genuine win when the rest of the stack is already this AWS-native.

The same pipeline, if it also needs to feed an on-prem fraud-detection cluster today, or needs to stay portable for a possible multi-cloud future, points to Kafka instead — the portability isn't a nice-to-have here, it's the actual requirement Kinesis structurally can't satisfy, since it doesn't run outside AWS at all. The right call depends entirely on whether "stay inside AWS" is a real constraint or an assumption worth questioning before committing.

→ The pattern generalizes

The decision is rarely about which system streams data better — it’s whether staying inside one cloud’s walls is a feature (less ops) or a constraint (less portability) for this specific team.

★

The flip point: the throughput where the cost crosses over

Kinesis bills per shard (fully managed, no ops); self-managed Kafka is a fixed cluster cost plus your engineers’ time. If a shard costs P per hour and a Kafka cluster costs M per hour, Kinesis is cheaper below M / P shards, and Kafka’s fixed cost amortizes above it.

→ The number

Plugging in example figures — a shard at P = $0.015/hour and a small cluster at M = $1.50/hour — the crossover is 1.50 / 0.015 = 100 shards ≈ 100 MB/s of ingest. Below that, Kinesis’s pay-per-shard is cheaper and spares you running Kafka; above it, the fixed cluster wins. Crucially, M should include the on-call engineers who operate Kafka — folding that in pushes the crossover well past 100 shards, which is why “start with the managed one” holds until you are genuinely at scale. Use your provider’s real shard price and your true cluster cost; the crossover is just their ratio.

The picture

The picture: keys, partitions and one consumer each

producer keyshash(key) → partition / shardconsumer group key u42 key u17 key u99 key dev-71.6 MB/s P0 / shard 00.5 MB/s P1 / shard 10.4 MB/s P2 / shard 20.3 MB/s P3 / shard 31.6 > 1 MB/s cap C1 reads P0+P1 C2 reads P2 C3 reads P3needs 1.6 MB/s C4 idleno partition left rates illustrative; a Kinesis shard takes 1 MB/s or 1,000 records/s in
The same shape on both systems. The producer hashes each record’s key to pick a partition (a shard, in Kinesis), so every record for one key lands in one place and stays in order. Within a consumer group, each partition is read by exactly one consumer. A fifth consumer on four partitions has nothing to do. The hot key cannot be spread out: it fills one shard past its cap, and on either system one consumer has to keep up with all of it.
By the numbers

Worked example: sizing a 6 MB/s clickstream

A clickstream averages 6 MB/s in, with 2 KB records, and two separate apps read all of it. Each consumer instance can process 1.5 MB/s. These workload numbers are illustrative; the shard limits are Kinesis’s documented ones. Size both systems.

StepQuestionArithmeticAnswer
1Records per second6 MB/s ÷ 2 KB (1 MB = 1,000 KB here)3,000 records/s
2Kinesis shards for bytes6 MB/s ÷ 1 MB/s per shard6
3Kinesis shards for records3,000 ÷ 1,000 records/s per shard3
4Shards to provisionthe larger of 6 and 36
5Read headroom, two apps sharing reads2 × 6 = 12 MB/s out, against 6 × 2 = 12 MB/s100%: no headroom at all
6Provision 8 shards insteadwrites 6 ÷ 8; reads 12 ÷ 1675% each
7Kafka consumers per app6 ÷ 1.54, so at least 4 partitions
8Kafka partitions for 3× growth18 ÷ 1.512, chosen now, not later
9One device sends 1.6 MB/s1.6 > 1 shard cap; 1.6 > 1.5 per consumerKinesis throttles it; on Kafka its one consumer falls behind

Step 5 is the trap. Six shards are enough for writes but leave zero read headroom, so any burst or third reader means throttled reads. Enhanced fan-out fixes that by giving each registered consumer its own 2 MB/s per shard, billed separately. Step 8 is chosen up front because adding Kafka partitions later changes hash(key) mod n, and a key’s records end up split across two partitions. Step 9 is the honest version of the page’s “hot key” warning. Kafka removes the broker-side cap, but not the rule that one partition goes to one consumer. On both systems the fix is the same: salt the key (dev-7#0 to dev-7#3), spread it over four partitions and re-combine downstream, giving up strict per-device order.

Trade-offs

Cost and trade-offs: scaling, fan-out and replay

Here Time means the effort or wait to make the change. Space means the capacity or storage it gives you or costs you.

CaseTimeSpaceWhy
Kinesis: more write capacityAn API call: split a shard, or UpdateShardCount+1 MB/s in and +2 MB/s out per shardA key’s hash range moves to child shards. Consumers finish the parent before the children, so per-key order holds.
Kafka: more write capacityAdding partitions is quick; adding brokers means a reassignment that copies dataLimited by broker disk, network and replication factorNew partitions change hash(key) mod n, so existing keys can move.
Kinesis: one more reading appNothing to set upShares 2 MB/s per shard with every other app, or gets its own 2 MB/s with enhanced fan-outAt the full 1 MB/s write rate, two shared readers already use the whole 2 MB/s.
Kafka: one more consumer groupNothing to set upReads the same log; costs broker network outRecent data is usually served from the OS page cache, so extra readers are cheap.
Kinesis: replayStart an iterator at a timestamp or sequence number24 h by default, up to 365 days at extra costAnything older than retention is gone. Archive to S3 if you need more.
Kafka: replay 90 daysReset the group’s offsets to a timestamp6 MB/s × 90 days × replication 3 ≈ 140 TB of diskTiered storage moves old segments to object storage to make this affordable.
Latest value per keyKafka: a compacted topicGrows with distinct keys, not with timeKinesis has no compaction. Keep that table somewhere else.

The pattern: Kinesis gives you capacity in fixed slices that you add with an API call, and every limit is stated up front. Kafka gives you knobs (partitions, brokers, retention, compaction), and each knob has a cost you have to know about, such as remapped keys or disk multiplied by the replication factor.

Watch for

Common mistakes

  • Sizing Kinesis on bytes alone

    A shard takes 1 MB/s or 1,000 records/s, whichever you hit first. At 200-byte records, 1 MB/s is 5,000 records/s, which needs 5 shards, not 1. Aggregate small records into larger ones (the KPL does this) or size on the record count.

  • Too few Kafka partitions

    A consumer group can use at most as many consumers as there are partitions. Start with 4 and you can never run a 5th consumer. Add partitions later and keyed data gets remapped. Pick the count for the throughput you expect, as in step 8 above.

  • A low-cardinality partition key

    Keying by country, tenant or event type puts your biggest customer, or the most common event, on one partition. Pick a key with many values that still keeps together the records that need ordering, such as an order id rather than a merchant id.

  • Expecting a global order

    Order is guaranteed only within one partition or shard. Two events for different keys can be read in either order, and after a reshard or rebalance often are. If you need order across keys, they must share a key, and therefore share a partition’s throughput.

  • Assuming no duplicates

    Both deliver at least once. A producer retries after a timeout and writes twice, and a consumer crashes after processing but before saving its offset or checkpoint, so the batch is re-read. Make consumers idempotent with an event id. Kafka’s idempotent producer and transactions cover read-process-write inside Kafka, not your database.

In the wild

Where this shows up in production and interviews

  • Change data capture

    Debezium streams database changes into Kafka topics, keyed by primary key so every row’s changes stay in order. A compacted topic then holds the latest version of every row, which a new service can read from the beginning to rebuild a full copy.

  • Lambda on Kinesis

    An event source mapping processes each shard in order, with one batch in flight per shard by default. The parallelization factor (up to 10) splits a shard across concurrent invocations while keeping each partition key in order. Shard count still sets the ceiling.

  • Lag is the alert

    The health metric on both is how far behind consumers are: consumer-group lag in offsets on Kafka, iterator age on Kinesis. Lag that keeps rising is a consumer slower than its partition, which is the hot-key failure from step 9.

  • The interview version

    In “design a metrics or clickstream pipeline”, do the step 1 to 4 arithmetic out loud. Then name your partition key and what it orders, say what happens when one key goes hot, and say how consumers stay idempotent under redelivery. Interviewers care much more about that than about which product you name.

Your call

Which would you pick?

Three situations. Pick the side you'd actually build — the explanation follows.

A team is entirely on AWS, has no platform engineers to spare, and wants a stream with minimal operational burden.

One partition's traffic is projected to grow past a single shard's hard throughput limit.

How should a team frame the choice between the two?

Frequently asked

Quick answers

Kafka or Kinesis — which should I use?

If you’re already all-in on AWS and want zero operational burden, Kinesis. If you need multi-cloud portability, very long retention, or the largest streaming ecosystem, Kafka (self-run or via managed Kafka like Amazon MSK).

Are Kafka and Kinesis the same underlying model?

Yes — both are an append-only, partitioned log where consumers track their own read position and can replay history. The real differences are operational surface, ecosystem, and hard scaling limits, not the core streaming semantics.

What’s the practical limit that catches teams off guard with Kinesis?

Each shard has a hard, fixed throughput ceiling — 1MB/s in, 2MB/s out — that no amount of extra spend removes. A single very hot partition key can hit this limit in a way a tunable Kafka partition typically wouldn’t.

Can you run Kafka on AWS and get managed simplicity?

Yes — Amazon MSK is managed Kafka running on AWS, giving you Kafka’s model and ecosystem with reduced operational burden, for teams that want Kafka specifically but still prefer not to run brokers themselves.

Kafka vs Kinesis · Vibe Engines · 2026
Finished this one? 0 / 209 Handbooks done
NextStreaming vs Batch Next on the “Moving data between services” ladder · rung 4 of 6

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Handbooks