🍃 Spring Boot

Spring Boot Microservices

20 lessons in this section of the Spring Boot tutorial. Work through them in order, or jump to the one you need.

  1. 1.Introduction to Microservices

    Microservices is an architectural style that structures an application as a collection of small, independently deployable services, each running in its own process and…

  2. 2.Monolithic vs Microservices

    A practical comparison of monolithic, modular monolith and microservices architectures for Java and Spring Boot teams.

  3. 3.Spring Cloud Tutorial: Config Server, Eureka, Gateway, OpenFeign and Resilience4j

    Spring Cloud explained with working config: release trains, Config Server, Eureka, Gateway, OpenFeign and Resilience4j, plus when Kubernetes replaces them.

  4. 4.Service Discovery

    Learn how service discovery works in Spring Boot microservices: client-side vs server-side discovery, Eureka server and client setup, health checks and heartbeats…

  5. 5.Eureka Server

    How to run a Eureka service registry with Spring Cloud: dependencies and version matching, server setup, securing it, registering client services and calling them by…

  6. 6.Eureka Client

    Set up a Spring Boot Eureka Client: registration, heartbeats, health checks, @LoadBalanced calls, load balancing strategies and instance metadata, with examples.

  7. 7.API Gateway

    An API Gateway is the single entry point for all client requests in a microservices architecture.

  8. 8.Spring Cloud Gateway

    Spring Cloud Gateway (SCG) is the official API gateway for Spring Boot microservices.

  9. 9.Load Balancing

    Load balancing distributes incoming requests across multiple instances of a service to maximise throughput, minimise latency, and avoid overloading any single instance.

  10. 10.OpenFeign

    Spring Cloud OpenFeign is a declarative HTTP client for microservices.

  11. 11.Circuit Breaker

    The Circuit Breaker pattern prevents cascading failures in a distributed system by wrapping remote calls with a state machine that monitors failure rates.

  12. 12.Resilience4j

    Resilience4j is a lightweight fault-tolerance library for Java, designed as the replacement for Netflix Hystrix in Spring Boot 3.x.

  13. 13.Distributed Tracing

    Distributed tracing tracks a request as it flows through multiple services, providing end-to-end visibility into latency, errors, and dependencies.

  14. 14.Config Server

    Spring Cloud Config Server provides centralised external configuration for distributed systems.

  15. 15.Centralized Configuration

    Configuration drift is one of the most common causes of 'works in staging, breaks in production'.

  16. 16.Service Registry

    In a system of many services whose addresses change as instances start, stop and scale, a service registry is the live directory that maps a logical name such as…

  17. 17.Inter-Service Communication

    Microservices communicate through synchronous HTTP calls or asynchronous messaging.

  18. 18.Fault Tolerance

    Fault tolerance is the ability of a distributed system to continue operating correctly in the presence of partial failures.

  19. 19.Rate Limiting

    Rate limiting controls the number of requests a client is permitted to make within a time window.

  20. 20.Microservice Security

    Securing a microservices architecture requires protecting traffic at multiple layers: authenticating external clients at the API Gateway, propagating identity between…