DevNotes
Support
Microservices · 12 chapters

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.

CHAPTER 01

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.

6 min · 6 Q&A · 0 examples
CHAPTER 02

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.

5 min · 5 Q&A · 0 examples
CHAPTER 03

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.

6 min · 5 Q&A · 4 examples
CHAPTER 04

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.

4 min · 5 Q&A · 3 examples
CHAPTER 05

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.

6 min · 6 Q&A · 3 examples
CHAPTER 06

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.

5 min · 5 Q&A · 2 examples
CHAPTER 07

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.

6 min · 6 Q&A · 5 examples
CHAPTER 08

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.

5 min · 6 Q&A · 0 examples
CHAPTER 09

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.

7 min · 6 Q&A · 3 examples
CHAPTER 10

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.

6 min · 6 Q&A · 1 examples
CHAPTER 11

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.

6 min · 5 Q&A · 0 examples
CHAPTER 12

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.

7 min · 23 Q&A · 0 examples