A production-grade distributed microservices streaming platform built using Spring Boot, Kafka, and Kubernetes.
This project demonstrates how modern backend systems are designed using:
- ๐งฉ Microservices Architecture
- โก Event-Driven Communication (Kafka)
- ๐ Service Discovery (Eureka)
- ๐ API Gateway Routing
- โธ๏ธ Kubernetes Deployment
- ๐ณ Containerization with Docker
This system simulates a real-world video streaming backend where:
- Users upload content
- Content is processed asynchronously
- Streaming is handled efficiently
- Analytics are generated from events
This project is designed to reflect real industry-level system design, covering:
- Scalable microservices
- Distributed communication
- Fault tolerance challenges
- Kubernetes orchestration
The system follows a microservices-based distributed architecture deployed on Kubernetes.
It is designed to handle high-throughput streaming workloads using asynchronous event-driven communication.
All incoming requests are routed through a centralized API Gateway, which:
- Handles routing
- Provides a single entry point
- Simplifies client interaction
Each microservice registers with the Discovery Server, enabling:
- Dynamic service lookup
- Loose coupling between services
- Resilience in distributed communication
The system uses Apache Kafka for asynchronous communication:
- Content ingestion โ produces events
- Streaming & analytics โ consume events
- Decouples services for scalability
Each service manages its own data:
- MySQL โ persistent storage
- Redis โ caching layer
- MinIO โ object storage (videos/files)
All components are deployed using Kubernetes:
- Deployments โ stateless services
- StatefulSets โ Kafka
- Services โ internal networking
- Ingress โ external routing
- User hits
streaming.localvia Ingress - Request goes to API Gateway
- Routed to respective microservice
- Services communicate via:
- REST (synchronous)
- Kafka (asynchronous)
- Data stored and processed across services
distributed-streaming-platform/
โ
โโโ api-gateway/ # API Gateway (Routing layer)
โโโ discovery-server/ # Eureka Service Registry
โโโ auth-service/ # Authentication & JWT
โโโ user-service/ # User management
โโโ content-service/ # Content metadata
โโโ content-ingestion-service/# Content upload pipeline
โโโ streaming-service/ # Streaming logic
โโโ video-processing-service/ # Video processing pipeline
โโโ analytic-service/ # Analytics & event processing
โ
โโโ common-lib/ # Shared DTOs & utilities
โโโ kafka-kraft/ # Kafka setup (KRaft mode)
โ
โโโ k8s/
โ โโโ infrastructure/ # Kafka, MySQL, Redis, MinIO
โ โโโ services/ # Microservice deployments
โ โโโ ingress/ # Ingress configuration
โ โโโ namespace/ # Namespace setup
โ
โโโ docker-compose.yaml # Local development setup
โโโ init-db.sql # Database initialization
โโโ images.txt # List of Docker images
โโโ prometheus.yml # Monitoring config
โโโ pom.xml # Parent Maven configuration
โโโ README.md
Each service is independently developed and deployed, enabling:
- Independent scaling
- Fault isolation
- Faster development cycles
Contains:
- DTOs
- Event classes
- Common utilities
๐ Ensures consistency across services
All infrastructure is defined declaratively under k8s/:
- Infrastructure layer (Kafka, DBs)
- Service deployments
- Networking (Ingress)
- Docker Compose โ Local development
- Kubernetes โ Production-like deployment
- Java (Spring Boot) โ Core microservices framework
- Spring Cloud โ Service discovery & gateway
- Spring Security + JWT โ Authentication & authorization
- Apache Kafka โ Event-driven communication
- Kafka KRaft Mode โ Zookeeper-less setup
- MySQL โ Relational database
- Redis โ Caching layer
- MinIO โ Object storage (video/files)
- Docker โ Containerization
- Kubernetes (Minikube) โ Container orchestration
- Ingress Controller (NGINX) โ External routing
- Prometheus โ Metrics collection
- Maven โ Build tool
- Docker Compose โ Local setup
| Service | Responsibility |
|---|---|
| API Gateway | Routes incoming requests |
| Discovery Server | Service registry (Eureka) |
| Auth Service | Authentication & JWT |
| User Service | User management |
| Content Service | Content metadata |
| Content Ingestion Service | Upload pipeline |
| Streaming Service | Streaming logic |
| Video Processing Service | Video processing |
| Analytics Service | Event analytics |
- Built a distributed microservices system from scratch
- Implemented event-driven architecture using Kafka
- Deployed complete system on Kubernetes (Minikube)
- Integrated API Gateway + Service Discovery (Eureka)
- Designed for scalability, modularity, and fault isolation
- Add CI/CD pipeline (GitHub Actions)
- Enable autoscaling (HPA)
Yash chauhan
Backend Engineer | Distributed Systems Enthusiast
If you found this project useful, consider giving it a โญ on GitHub.



