This project implements a cloud-native microservices platform built with Spring Boot and Spring Cloud, designed to demonstrate scalable, resilient, and production-oriented architecture patterns.
It showcases the full lifecycle of modern backend systems:
- Service decomposition
- Inter-service communication
- Containerization
- Orchestration
- Cloud deployment strategies
The system is deployable both locally and in AWS using ECS (container-based) and EKS (Kubernetes-based) approaches.
- Client sends request to API Gateway
- Gateway routes request to appropriate microservice
- Authentication handled via OAuth2 (JWT)
- Service communicates with other services via Feign (if needed)
- Each service interacts with its own database
- Response is returned through the Gateway
- msvc-usuarios → User domain management
- msvc-cursos → Course domain management
- msvc-auth → Authentication & authorization (OAuth2)
- msvc-gateway → API Gateway (Spring Cloud Gateway)
- API Gateway Pattern → Centralized routing, security, and cross-cutting concerns
- Database per Service → Each microservice owns its persistence layer
- Service-to-Service Communication → OpenFeign-based HTTP clients
- Externalized Configuration → ConfigMaps and environment variables
- Stateless Services → Enables horizontal scalability
This project demonstrates two different deployment models:
- Simpler orchestration model
- Suitable for small-to-medium workloads
- Faster setup with fewer operational concerns
- Full Kubernetes-based deployment
- Declarative infrastructure using manifests
- Advanced scalability and orchestration capabilities
Trade-off:
| ECS | EKS |
|---|---|
| Simpler | More flexible |
| Lower operational overhead | Higher control |
| Limited orchestration features | Full Kubernetes ecosystem |
Each microservice is containerized using optimized Dockerfiles.
Run locally:
docker-compose up --buildIncludes:
- Multi-container setup
- Network configuration
- Database containers (MySQL, PostgreSQL)
- Build all services:
mvn clean install
- Start the infrastructure:
docker-compose up --build- Access via API Gateway:
http://localhost:<port>Deployment is fully declarative using Kubernetes manifests:
kubectl apply -f .- Deployments (stateless services)
- Services (internal + external exposure)
- ConfigMaps (configuration management)
- Secrets (sensitive data handling)
- Persistent Volumes (data persistence)
- Horizontal scaling via replicas
- Load balancing via Kubernetes Services
- OAuth2-based authentication (Spring Authorization Server)
- JWT token-based authorization
- Secured endpoints via Spring Security
- Token propagation between services
- Java 17
- Spring Boot
- Spring Cloud
- Spring Security (OAuth2 + JWT)
- Spring Data JPA
- MySQL / PostgreSQL
- Docker
- Kubernetes
- AWS (ECS, EKS)
GET /api/usuariosPOST /api/auth/loginGET /api/cursos
- Decoupled microservices with independent databases
- Centralized authentication using OAuth2 (JWT)
- API Gateway for routing and security
- Containerized services for environment consistency
- Kubernetes orchestration for scalability and resilience
- Microservices architecture design
- API Gateway pattern
- Distributed system communication
- Containerization and orchestration
- Cloud-native deployment strategies
- Security in distributed systems
To centralize:
- Authentication
- Routing
- Cross-cutting concerns
Trade-off: introduces a single entry point (potential bottleneck if not scaled properly).
Kubernetes provides:
- Fine-grained control
- Declarative infrastructure
- Better scalability mechanisms
Trade-off: higher complexity and operational overhead.
- Loose coupling
- Independent scaling
- Domain ownership
Trade-off: increased complexity in data consistency and transactions.
- Stateless services enable horizontal scaling
- Kubernetes replicas for load distribution
- Independent scaling per service
- Database scaling can be handled separately
- Observability (Prometheus + Grafana)
- Distributed tracing (OpenTelemetry)
- Circuit breakers & resilience (Resilience4j)
- CI/CD pipelines (GitHub Actions)
- Infrastructure as Code (Terraform)
Developed by Freyder Otalvaro
