Microservices Fundamentals
Building microservices with Spring Boot and Spring Cloud: decomposition and DDD, inter-service communication, service discovery, API gateway, centralized configuration, Resilience4j, data management with sagas, outbox and CQRS, OAuth2 security, observability with tracing, Docker and Kubernetes deployment, and interview scenarios.
Introduction to Microservices
Monolith vs microservices, what makes a service "micro", the real benefits and costs, the Spring Cloud toolbox, when microservices are the wrong choice, and the modular monolith alternative.
Decomposing into Services & Domain-Driven Design
Splitting by business capability, bounded contexts and ubiquitous language, aggregates, database per service, sizing services, coupling and cohesion, and the anti-patterns that create a distributed monolith.
Inter-Service Communication
Synchronous vs asynchronous communication, REST with RestClient, WebClient and OpenFeign, gRPC, timeouts and connection pools, propagating headers, idempotency, API versioning, contract testing, and choosing between calls and events.
Service Discovery & Load Balancing
Why hard-coded URLs fail in dynamic environments, client-side vs server-side discovery, Eureka server and clients, Spring Cloud LoadBalancer with @LoadBalanced, health and self-preservation, and how Kubernetes Services replace Eureka.
API Gateway with Spring Cloud Gateway
Why clients need one entry point, gateway responsibilities, routes, predicates and filters, load-balanced routes, authentication and token relay, rate limiting with Redis, circuit breakers and fallbacks, the Backend-for-Frontend pattern, and gateway pitfalls.
Centralized Configuration with Spring Cloud Config
Externalized configuration and the twelve-factor app, a Git-backed Config Server, clients with spring.config.import, profiles and per-service files, refreshing with @RefreshScope and Spring Cloud Bus, handling secrets, and Kubernetes ConfigMaps and Secrets.
Resilience Patterns with Resilience4j
Cascading failures, timeouts, retries with exponential back-off and jitter, circuit breakers, bulkheads, rate limiters and fallbacks with Resilience4j in Spring Boot, combining patterns in the right order, and designing for graceful degradation.
Data Management in Microservices
Database per service and its consequences, why distributed transactions don't fit, sagas, the transactional outbox, eventual consistency, API composition, CQRS and read models, event sourcing, and handling queries that span services.
Security in Microservices
Edge vs service-level security, OAuth2 and OpenID Connect roles, an authorization server such as Keycloak, services as JWT resource servers, token relay, service-to-service authentication with client credentials and mTLS, scopes and roles, and zero trust.
Observability — Logs, Metrics & Distributed Tracing
The three pillars of observability, centralized and correlated logging, metrics with Micrometer and Prometheus, RED and USE methods, distributed tracing with Micrometer Tracing and OpenTelemetry, health checks, dashboards and alerting.
Deploying Microservices — Docker, Kubernetes & CI/CD
Containerizing Spring Boot with a multi-stage Dockerfile and layered jars, Docker Compose for local development, Kubernetes Deployments, Services, probes, resources and autoscaling, graceful shutdown, rolling, blue-green and canary releases, and CI/CD pipelines.
Microservices Interview Questions & Scenarios
The most-asked microservices interview questions, real-world design and troubleshooting scenarios, a reference architecture for an e-commerce platform, the pattern catalogue, and a quick revision sheet.