All 12 ModulesModule 11 of 12
Kafka + Docker + Microservices
Module 11: Enterprise Scaling — Modular Monolith to Event-Driven Microservices
Decompose monolithic services into an event-driven architecture using Kafka, Docker containerization, Kubernetes manifests, and an API Gateway.
MicroservicesApache KafkaEvent-Driven ArchitectureDockerKubernetesAPI GatewaySaga Pattern
Level 1: Build
Level 1: Build — Event-Driven Architecture with Kafka
Implement Kafka event publishing when network devices or backhaul circuits change state.
User Story:
As a Chief Architect, I need cross-service communication to be decoupled via asynchronous events so services can scale independently.
Key Deliverables & Specifications:
- Kafka Producer & Consumer wrapper with automatic reconnection
- Decoupled Microservices: Device Service, Automation Service, and Audit Service
- Dockerfiles and Docker-Compose orchestrating Zookeeper, Kafka, Node microservices, and MongoDB
Implementation Roadmap:
1. **Event Schema**: Define `DeviceCreatedEvent` and `CircuitActivatedEvent`.
2. **Kafka Producer**: Publish events upon successful database mutations.
3. **Kafka Consumer**: Audit service consumes events and persists compliance logs.