Microservices vs Modular Monolith: How to Choose
Microservices vs modular monolith: what each means, the Prime Video lesson, and five criteria to choose the right architecture.
Core patterns, Kafka 4.0 changes and eight rules for event-driven systems that stay understandable.
In short
Event-driven architecture helps systems grow without every service needing to know about every other service. A payment service publishes “payment completed”; the notification, loyalty and analytics services each react on their own. This guide explains the core patterns, what changed in Kafka 4.0, and the practical rules that keep an event-driven system understandable as it grows.
The cost is a different way of thinking: eventual consistency, ordering per key, and debugging flows that cross many services.
Apache Kafka 4.0, released in March 2025, is the first major release to operate entirely without Apache ZooKeeper, using Kafka’s own KRaft consensus instead; it also made the new consumer group protocol (KIP-848) generally available to improve rebalance performance (Apache Kafka). Clusters still on ZooKeeper must first migrate to KRaft using Kafka 3.9 before upgrading to 4.0 (Red Hat). Kafka 4.0 also introduced early access to queue-style consumption through share groups (KIP-932) (Confluent).
| Pattern | What it means | Use it when |
|---|---|---|
| Event notification | Event says something happened; consumers fetch details if needed | Simple integrations, low data volume |
| Event-carried state transfer | Event contains the data consumers need | Consumers should not call back the producer |
| Event sourcing | The log of events is the source of truth; state is derived | Strong audit needs, complex domain history |
| CQRS | Separate models for writing and reading, often fed by events | Read and write loads differ a lot |
| Transactional outbox | Write data and the event in one database transaction, publish afterwards | You must never lose or duplicate an event when saving data |
From our work
On one mobile banking programme, our work was followed by 5x fewer incidents and failed transactions (case study). We build the backends, CI/CD and cloud infrastructure behind fintech and mobile products, and the Linux and ROS 2 software behind robots.
| Area | Typical tools |
|---|---|
| Brokers | Apache Kafka (KRaft), managed Kafka services, RabbitMQ, NATS, MQTT for devices |
| Kafka on Kubernetes | Strimzi operator, Helm |
| Schemas | Schema Registry, Avro, Protobuf, JSON Schema |
| Change data capture | Debezium, Kafka Connect |
| Stream processing | Kafka Streams, Apache Flink |
| Languages | Java and Kotlin with Spring Boot, Go, Node.js, Python |
Event-driven design works best inside clear service boundaries. If you are deciding how to split your system, read microservices vs modular monolith; for running brokers and services, Kubernetes for product teams.
Services publish facts as events and other services react, instead of calling each other directly.
No. Kafka 4.0, released in March 2025, runs entirely without ZooKeeper using KRaft.
Saving data and its event in one database transaction, then publishing the event, so events are never lost or invented.
Events can be delivered more than once, so processing the same event twice must be harmless.
Send a few lines about the product, the deadline and the team you have today. A senior engineer replies within two working days.