Grokking Kafka and Event-Driven Architecture

Learn to design event-driven systems with Apache Kafka: when to use events, how to size topics and partitions, and how to reason about durability, duplicates, ordering, and consumer lag.

Level:
Intermediate
Study Time:
14h
Lessons:
60
Assessments:
100
Updated
Last week
4.4
(33 ratings)
668 learners
Arslan Ahmad
Created byArslan Ahmad
Ex FAANG Manager, Expert Behind Grokking Kafka and Event-Driven Architecture

Course Overview

This course teaches event-driven architecture through the decisions an engineer makes when building it. Each lesson takes one decision, such as whether a call should be a request or an event, how many partitions a topic needs, or which acknowledgment setting a workload can afford, and works it through with real numbers, the cost of each option, and the case where the other option is better. Every code sample was run against a real Kafka 4.4 broker, and each lesson shows the output it produced. The course starts with whether a system should use events at all. It then covers topics, partitions, and keys; consumer groups and share groups; replication, retention, and compaction; duplicate messages and exactly-once processing; and the outbox pattern, sagas, schema changes, and consumer lag. It compares Kafka with RabbitMQ, Amazon SQS, and Apache Pulsar, and ends with complete designs of an order pipeline, a notification system, and an activity feed. Every chapter lesson ends with practice questions, every chapter ends with an assessment, and most lessons close with a short section on explaining the decision in a system design interview.

Grokking Kafka and Event-Driven Architecture Image
This course
Lifetime access to this course
One-time payment. Yours forever.
All 68 courses
Annual plan
Discussions
Certificate
Free updates
Own everything, once
Grokking Kafka and Event-Driven Architecture Image
This course
Lifetime access to this course
One-time payment. Yours forever.
All 68 courses
Annual plan
Discussions
Certificate
Free updates
Own everything, once

What you'll learn in Grokking Kafka and Event-Driven Architecture

  • Decide when a call should be a request and when it should be an event, and price what events cost in delay and repeats.
  • Size a topic's partitions from its write and read rates, and pick keys that keep order without creating hot partitions.
  • Set replication, acks, and min.insync.replicas for a stated loss tolerance, and read what happens when brokers fail.
  • Trace where duplicate messages come from, build consumers that tolerate repeats, and know what transactions cover.
  • Keep services consistent with the outbox pattern and sagas, with the right Kafka keys for each.
  • Measure consumer lag in records and in time, and find its cause from real tool output.
  • Apply every decision in complete designs: an order pipeline, a notification system, and an activity feed.
  • Choose between a queue and a log, and design events with clear names, keys, identifiers, and the right amount of data.
  • Scale consumers with consumer groups and share groups, and stop slow handlers from causing repeated rebalances.
  • Plan retention and compaction with storage arithmetic, and replay events without repeating side effects.
  • Design retry topics and dead letters so that one failing message does not block a whole partition.
  • Change event schemas safely, including on compacted topics that keep old records for a long time.
  • Choose between Kafka, RabbitMQ, Amazon SQS, and Apache Pulsar for a stated reason.

Course Content

• 11 Chapters • 60 Lessons
1.

Course Introduction

1 lesson

Course Introduction

Requests and Events

What Events Cost

Queues and Logs

Designing an Event

When Not to Use Events

Quiz: Should This System Use Events?

What people say about our courses

Steven Zhang avatar
Steven Zhang
Software Engineer
Just wanted to say thanks for your Grokking the system design interview resource (https://lnkd.in/g4Wii9r7) - it helped me immensely when I was interviewing from Tableau (very little system design exp) and helped me land 18 FAANG+ jobs!
Eric avatar
Eric
Software Engineer
I've completed my first pass of "grokking the System Design Interview" and I can say this was an excellent use of money and time. I've grown as a developer and now know the secrets of how to build these really giant internet systems.
Ashley Pean avatar
Ashley Pean
Software Engineer
Check out Grokking the Coding Interview. Instead of trying out random Algos, they break down the patterns you need to solve them. Helps immensely with retention!
Arijeet avatar
Arijeet
Software Engineer
Just completed the “Grokking the system design interview”. It's amazing and super informative. Have come across very few courses that are as good as this!
Simon Barker avatar
Simon Barker
Software Engineer
This is what I love about http://designgurus.io’s Grokking the coding interview course. They teach patterns rather than solutions.
Roger Cruz avatar
Roger Cruz
Software Engineer
The world gets better inch by inch when you help someone else. If you haven't tried Grokking The Coding Interview, check it out, it's a great resource!

About the Author

Arslan Ahmad

Arslan Ahmad

Design Gurus Founder
Ex-FAANG Manager
Meta
Microsoft
Google
Amazon
Uber

Industry Expertise & Leadership

Arslan Ahmad is the lead author of Grokking Kafka and Event-Driven Architecture. As the founder of Design Gurus and a former FAANG hiring manager, he has worked at industry giants like Facebook (now Meta) and Microsoft.

He has conducted hundreds of system design interviews, giving him unique insight into what top tech companies look for in candidates.

The course also incorporates expertise from senior engineers at Google, Meta, Amazon, Microsoft, and Uber, ensuring you learn system design best practices from professionals who have built and scaled real-world systems.

500+

Interviews Conducted

10k+

Students Taught

Related Courses

Grokking the System Design Interview
The original system design interview course from DesignGurus. Master scalable systems, critical trade-offs, and 15+ real-world design problems with a repeatable interview framework.
4.7
194K learners
Discounted price for Your Region

$148

System Design Patterns: From Fundamentals to Real Systems
Learn the 60+ patterns behind every scalable system: from caching and sharding to AI-era infrastructure: through real incidents, everyday analogies, and honest trade-offs.
4.8
5.9K learners
Discounted price for Your Region

$72

Grokking Microservices Design Patterns
Master microservices design patterns for designing scalable, resilient, and more manageable systems.
4.1
14K learners
Discounted price for Your Region

$98

FAQs

It is a text course on designing event-driven systems with Apache Kafka. Each lesson takes one design decision, such as whether a call should be an event, how many partitions a topic needs, or which acknowledgment setting a workload can afford, and works it through with real numbers, real Kafka behavior, and the cost of each option. The course ends with complete designs of an order pipeline, a notification system, and an activity feed.

It is for backend engineers who build services and want to design with Kafka well, for engineers who already run Kafka and want to understand the trade-offs behind its settings, and for engineers preparing for system design interviews where events and message brokers come up.

You should be comfortable building backend services that talk over HTTP and store data in a database, and you should be able to read short Java programs. You do not need any experience with Kafka or other message brokers, because the course defines every term when it first appears.

No. The course teaches the decisions an engineer makes when designing with events, and it uses Kafka to show each one in practice. It shows the client code and settings that a decision needs, but it does not walk through every Kafka API or command-line option.

Kafka 4.4. It covers current Kafka, including KRaft, which replaced ZooKeeper, the newer consumer rebalance protocol, share groups for queue-style reading, and eligible leader replicas, and it says when a behavior changed in a recent version.

Not to follow the course. Every code sample was run against a real Kafka 4.4 broker, and each lesson shows the code next to the output it produced, because the course player cannot run a Kafka broker. To run the samples yourself, start a broker with docker run -p 9092:9092 apache/kafka:4.4.0; the Course Introduction gives the exact steps.

The samples use Kafka's own Java client, and the design lessons use short pseudocode. The decisions themselves apply to any language that has a Kafka client.

Yes. One chapter compares Kafka with RabbitMQ, Amazon SQS, and Apache Pulsar on one shared workload, using each product's official documentation, and ends with a way to choose a broker for a stated reason. It does not use vendor benchmarks.

Every lesson after the introduction ends with practice questions whose answers you can open after trying them, and every chapter after the introduction ends with an adaptive assessment. Many of the practice questions are short design calculations, such as sizing partitions or storage.

Most lessons end with a short section on how to explain the decision in an interview, with likely follow-up questions, and the three complete designs are common interview questions. The rest of each lesson teaches the subject itself, so the same material applies to building production systems.

It is text-based, with animated diagrams that show events moving through each design, so you can read at your own pace and return to any lesson as a reference.

Design Gurus logo
One-Stop Portal For Tech Interviews.
About Us
Our Team
Careers
Partners
Contact Us
Become Affiliate
Copyright © 2026 Design Gurus, LLC. All rights reserved.