internalsGet Pro

Data Engineering · Module 09

Event streaming with Kafka

Lessons
14
Free
0
Reading
~4 h

Your progress

0 / 14 lessons done

Sign in to track

Lessons

  1. Event streaming: data as a continuous flowClick events, app logs and database changes arrive all day and never finish. Most data platforms put them into an event log first, so every team reads the same events without asking the app to send them twice.13 min
  2. Kafka in practice: topics, partitions and offsetsEvery Kafka pipeline starts with a topic someone created, and most of its later problems trace back to that one command: too few partitions to keep up at peak, or too few copies to survive a broker going down. Reading a topic’s layout is also the first step in every Kafka incident.17 min
  3. Kafka producers: keys, batching and acknowledgementsEvery event that reaches Kafka passes through a producer, and its settings decide whether a broker failure loses data, whether a retry duplicates it and whether a busy hour fits through at all. The defaults also differ between the Java and Python clients.17 min
  4. Kafka consumers: groups, commits and rebalancingEvery reader of a Kafka topic, from an S3 sink to a Flink job, is a consumer in a group. When one restarts, the group hands its partitions over, and the commit rules decide whether records are skipped, read twice or left waiting.17 min
  5. Delivery guarantees in Kafka pipelines“Exactly-once” is a setting in Kafka, but the numbers people read live in a database, a bucket or a warehouse. Whether a crash repeats or loses records there depends on how the last write is made, not on the setting.18 min
  6. Share groups: using Kafka as a queueData teams often need a pool of workers for independent jobs: resizing images, calling an API per record, re-running a failed file. Kafka 4.2 and later can hand out those jobs one record at a time, so the team may not need a second messaging system.17 min
  7. Event schemas and the schema registryEvery topic with more than one team on it has a contract, written down or not. A schema registry writes it down and refuses changes that would break a reader, before the change reaches the topic.17 min
  8. Kafka Connect: moving data in and outMost data in a Kafka platform enters or leaves through Kafka Connect: database changes come in through source connectors, and topics land in S3 or a warehouse through sink connectors. Its settings decide how many files the lake gets, and whether one bad record stops the copy.18 min
  9. Retention, compaction and replaying eventsSooner or later a consumer ships with a bug and a day of its output is wrong. Whether you can fix that by reading Kafka again, and how much disk that ability costs, is decided by settings most teams leave at their defaults.18 min
  10. Partition keys and ordering guaranteesKafka promises order only inside a partition, so the key decides which events a consumer sees in order and which it doesn’t. A wrong key, one busy key or a partition count changed in a hurry turns into wrong numbers or wrong messages to customers, often without a single error.18 min
  11. Operating Kafka: lag, scaling and broker failuresA Kafka cluster rarely fails all at once. A reader falls behind, a broker disappears at the busiest hour, a new broker sits empty. The engineer on call has to tell which of these needs action now, and lag and a few broker counters are how they tell.18 min
  12. Case: PhonePe’s Kafka at 100 billion events a dayMost teams that run Kafka for long enough meet PhonePe’s problems in a smaller form: producers that can’t afford to lose events, readers that slow down writers, and no clear signal for when to add brokers. Knowing which fixes match which scale keeps a small platform from copying a large one.17 min
  13. Managed streaming services or self-hosted KafkaEvery team that runs Kafka is asked, sooner or later, why it doesn’t pay a cloud provider to run it. Answering well means pricing your own traffic, not a vendor’s example, and knowing which work never leaves your team.16 min
  14. Design: a clickstream pipeline for an online storeMost online products send a click stream to a data platform, and the same handful of choices decide whether it survives a sale: the key, the partition count, the acknowledgements, the schema rules, the sink’s files and the alerts. This lesson puts them on one page, so you can defend each one and know what breaks when it’s wrong.28 min

Practise with

No tools or paper guides for this module yet.

Terms this module teaches 43

Open glossary

acks (producer acknowledgements)

The Kafka producer setting that decides when the leader broker confirms a write: never (0), after its own write (1), or after every in-sync replica has it (all).