
Learn to identify integration and resilience problems in reactive microservices architecture and apply ten patterns across two categories to design robust, reactive architectures, with hands-on implementation and testing.
Explore the gateway aggregator pattern as a single api proxy that collects product, pricing, reviews, and promotions from multiple services, reducing client-side complexity and latency.
Develop a gateway aggregator by interacting with a single external services jar that simulates product, promotion, and review services, and learn to call their endpoints to assemble a unified response.
Set up a reactive spring project with Maven, configure group and artifact, add reactive web and Lombok, generate and import, and create zero one packages (plan, action, controller, data, service).
Create DTOs to model upstream service data, including product response, promotion, and reviews, and assemble a product aggregator with a price object to compute discount and discounted price.
Create external service clients for product, promotion, and review services; build plan-based clients, call upstream endpoints with get requests, and aggregate reviews in a non-blocking way.
Combine product details, promotion, and reviews in parallel using a reactive zip to build a single product aggregator response, including computed price and discount details.
Create and wire an aggregator controller that retrieves product information via an aggregator service, handles not found with a response entity, and configures service endpoints and properties for inter-service communication.
Demonstrates a gateway aggregator pattern that assembles product information, list price, discount, and reviews by calling multiple external services, delivering a unified response to the browser.
Improve the aggregator's resilience by handling upstream failures in zip's all-or-nothing flow, returning empty lists for failed services like reviews or a no-promotion object to keep the page building.
Test your aggregator to verify true parallel calls by introducing a 3-second delay in one external service and comparing parallel versus sequential fetches for product and promotion data.
Handle product service outages by returning an empty product signal to the aggregator, using a placeholder photo and avoiding 500 errors so the UI can gracefully redirect.
Use a gateway aggregator as a facade to hide backend complexity, calling upstream aggregates and returning a single, resilient response to the client, reducing latency.
Explore the scatter gather pattern by broadcasting requests to upstream services, gathering their results, and delivering a final response, as seen in flight search use cases.
Apply a scatter-gather approach to external services by wiring Delta, Frontier, and JetBlue, streaming flight results and handling occasional errors while noting post requests and carrier-specific implementations.
Create a flight result data transfer object in a new package, defining fields like from, to, and price, and wire it to a controller and a service.
Create a Delta service client as a simple sprint component that streams flight results via a flux from a get request, and gracefully complete the stream on errors.
Create a world-class JetBlue client and a Frontier service client as Spring components to handle get flights and post frontier requests with normalized flight results.
Create a flight search service class in a service package that merges multiple flight publishers from source to destination into a streaming flux and limits results to first 3 seconds.
Create a flight controller class with request mappings, wire a flight search service, and stream flight results via text/event-stream while configuring services like Delta and JetBlue in the application properties.
Run a scatter gather demo by starting the app, confirming external services are up, and observing data from multiple upstream services being combined to present the best option to users.
Scatter a message to all target systems and gather their responses, illustrating the aggregate pattern across upstream services and the idea of distributing work.
Acting as an aggregator, the orchestrator pattern coordinates product, payment, inventory, and shipping services with parallel calls to execute a reliable order workflow, handling success, failure, and refunds.
Build an orchestrator that fetches product information, then makes parallel calls to payment, inventory, and shipping, handling success and rollback actions such as refunds and restocking.
Explore how external service APIs interact across product, inventory, shipping, and user balance, including get, deduct, refund, and cancel flows, with logs to support an orchestrator.
Learn to implement an orchestrator that handles a service request by constructing DTOs for a create order flow, including request and response objects, status enum, and shipping address.
Define and implement product, payment, inventory, and shipping DTOs to model upstream service interactions, including request and response structures, status fields, and Swagger and Lombok support.
Develop product and user service clients with dedicated endpoints, implement direct payment requests and refunds, and robustly handle failures by building a payment response via a builder.
Create and configure inventory and shipping service clients with direct and restore endpoints, define inventory and shipping requests and responses, and handle signals in a reactive microservices pattern.
Create an orchestration request context as a wrapper that coordinates a single order through multiple requests and responses, storing order data, product price, payment, inventory, and shipping details, final status.
Develop an orchestration utility that builds payment, inventory, and shipping requests from a shared orchestration context, preparing service calls for a reactive microservices workflow.
Implement an orchestrator that calls product, inventory, and shipping services in parallel (non-blocking), validates responses, and commits or rolls back the transaction using an abstract class and orchestration interfaces.
Build a reactive payment handler with an abstract orchestrator and spring component that initiates a payment request, handles the response, validates success, and coordinates non-blocking cancellation and refunds.
Implement external inventory orchestrator and a shipping orchestrator as Spring components, handling create, on-next, and cancel flows, mapping responses, and wiring success filters to restore orders and process refunds.
Develop and orchestrate an order fulfillment service that receives a request, calls multiple orchestrators via a Spring-injected list, uses reactive mono.zip to collect responses, and updates the overall status.
Cancel an order asynchronously through a non-blocking order cancellation service that publishes cancellation requests via a shared flux to all orchestrators, ensuring scalable orchestration.
The order orchestrator service coordinates product data via the product client, retrieves price, and fires parallel calls to fulfillment, shipping, and payment services, then handles post-processing or cancellation on failure.
Develop a simple debugging utility for orchestration context, object mapper lookups, and pretty printing to aid learning in a reactive microservices design.
Design and wire a simple orchestrator controller for reactive microservices with post mapping, integrate product, user, inventory, and shipping services, and handle not found responses with ResponseEntity.
Demonstrate testing an orchestrator by issuing a post request to place orders, validating inventory, payment, and shipping flows, and handling failures with refunds and cancellations.
Fix the reactive orchestrator by using map instead of then, propagate empty product signals with the context, and gracefully handle 404 errors when a product is missing.
Examine asynchronous refunds and restores when services fail, using the replay pattern and a message queue, with an orchestrator coordinating payment checks and inventory updates.
The orchestrator pattern acts as an aggregator that coordinates back-and-forth microservice calls in a gateway, with a fulfillment service handling success, rollback, refunds, and inventory restoration.
Contrast chain and orchestrator sequential workflows, showing how the orchestrator enables ordered service calls and easier debugging in a payment, inventory, shipping scenario with refund flows.
Explore external APIs and orchestrator-driven workflows, verify payment flows with Swagger, then validate inventory and shipping dependencies to grasp sequential service calls.
Copy the client controller, duty service, and utilities into section four, then update references to section four using find and replace to align all packages and controllers.
Update the dto across services in section four: add payment id to payment response, adapt inventory and shipping requests and responses to use the payment date, and modify drivers accordingly.
Learn how to create service clients in a reactive microservices setting by handling errors with null responses for inventory, shipping, and payment, ensuring compilation succeeds across the plan.
Update the util class to align orchestration requests with payment and inventory responses, making build methods public and ensuring shipping requests rely on payment and inventory results.
Implement a sequential orchestrator flow that executes payment, then inventory detection, halting on error with an error signal and triggering cancellation, refund, and restoration to preserve consistency.
Create a custom fulfillment exception and implement a handle-based status check in the abstract orchestrator to emit an error signal on failure. Apply this across payment, shipping, and inventory.
Demonstrates converting the order fulfillment workflow from parallel to sequential calls, updating a shared context through product, payment, inventory, and shipping steps with error handling.
Orchestrate a sequential workflow with the orchestrator service coordinating fulfillment and cancellation, using a context object to drive sequential calls, post-processing, and error handling.
Update the app to section four, start the application, and test endpoint services to validate the sequential workflow with payment, inventory, and shipping and failure handling.
Explore the splitter pattern, an integration pattern, and its contrast with the scatter-gather approach. See how a frontend routes multi-item orders to service-specific backends.
Explore external APIs via Swagger to reserve cars and hotel rooms, model requests and responses, and route reservations to upstream services.
Create DTOs for a car service, including restoration request and response and home reservation request and response, with fields like city, pickup, drop, category, and price.
Create DTOs for a reservation service, including a reservation item request and its response, with per-item prices and a wrapper aggregating all responses and the total price.
Learn to implement reactive service clients in a Spring-based microservices setup, building flux and mono publishers for car reservation and room resolution requests, with error handling.
Explain why flux requests cannot be streamed with the upstream, and how responses are collected as a list, then converted to a flux, using sockets or server-sent events.
Develop a service layer that orchestrates multiple upstream reservation services using an abstract class called situation handling, exposing a resolution type and processing a flux of reservation item responses.
Implement a car reservation handler in a reactive microservices architecture, extending an abstract reservation handler and using flux, map, and transform to map requests to car reservation responses.
The lecture extends the car reservation handler to a room reservation handler, using a swing component. It updates item types and responses for check in and check out.
Build a reactive reservation service in Spring that routes reservation item requests to type-specific handlers via a map, using group by and an aggregator to assemble responses.
Create a reservation controller with validation and post mapping, handling a reactive request body of multiple items, routing through the service layer with endpoints for car and room reservations.
Showcases the splitter pattern by splitting a multi-item reservation—cars and hotel stays—processed by a backend service that routes to upstream services and returns a consolidated price and status.
Learn resiliency patterns to build responsive, reactive microservices that stay timely despite failures, using defaults or cached values to prevent error propagation in multi-service calls.
Apply the timeout pattern to microservices by setting upstream timeouts and returning fallback values when the product service and the review service miss deadlines, via a gateway aggregator.
Set up section zero six by reusing code, remove promotion logic, keep product and review services, remove the price object, update aggregates and controllers, then run tests.
Master the timeout pattern in reactive microservices by enforcing a 500-millisecond response window, emitting errors or empty lists, and using fallbacks with cached values to maintain resilience.
Demonstrates the timeout pattern in reactive microservices by parallel calls to product and review services, aggregating results within 500 ms for resilient responses even when reviews slow or fail.
Apply a timeout pattern to mark requests as failed if no response arrives within the configured time, and plan for slow upstream services and restarts in a microservices architecture.
Explore the retry pattern in a microservice architecture to handle intermittent network failures, improving resilience when calls to services like review and product fail due to temporary outages.
Examine external services in a reactive microservices architecture, focusing on product and review services, with random failures and latency, and explore making survey aggregation more resilient.
Set up the project for section seven, configure retry, and validate with Postman while handling intermittent external service failures to boost resilience.
Implement the retry pattern in the review service demo, using five retries to handle intermittent errors and verify resilience in logs; avoid replay for form errors or not found products.
Fix the client-side error handling by transforming 4xx error signals into empty responses using status predicates, and enforce timeouts on retries to cap total replay time at 300 ms.
Explore retry and fixed-delay strategies in reactive microservices, and examine replay specs, maximum wait times, and configurable retry attempts to manage failed requests.
Learn how the retry pattern enhances resilience against transient failures and intermittent network issues, with considerations for timeouts and when not to replay for 400 errors.
Explore the circuit breaker pattern for microservices, which prevents cascading failures by detecting unhealthy upstream services and returning default values instead of retries, protecting both downstream and upstream systems.
Explore how a circuit breaker moves among closed, open, and half-open states to protect upstream services. Configure a one-minute window and observe transitions from open to half-open to closed.
Explore external services through Swagger UI, observe the section eight circuit breaker, and simulate maintenance windows every thirty seconds, restarting services and monitoring healthy versus maintenance states.
Set up the project by creating a section zero eight package and updating references; test with postman, noting retries yield about 300 ms latency during outages.
Explore resilience4j circuit breaker configuration for Spring apps, including reactive support and yaml properties, implementing sliding window, failure rate thresholds, minimum calls, open and half-open states, and exception handling.
Implement circuit breaker resilience in the review client by annotating with circuit breaker, configuring a named circuit for upstream service, and adding a fallback method that returns a safe response.
Watch how the circuit breaker pattern safeguards a service under failure by transitioning through open and half-open states, using timeouts and fallbacks in a reactive pipeline for resilience.
Override runtime configuration for circuit breakers by updating application.yaml, using environment variables or command line, and applying programmatic overrides to tailor minimum calls and sliding window size.
Explore how circuit breakers keep microservices responsive by isolating upstream failures, then combine with retry and timeout patterns, using spring resilience configurations in YAML.
Learn how rate limiter patterns protect servers and control upstream usage by limiting per second or per minute requests, enabling client and server side throttling and rejection of excess requests.
Implement server-side rate limiting for a calculator service using resilience4j, enforcing two requests in five seconds (or five in twenty) with a fallback for too many requests.
Watch a server side rate limiter demo that shows rapid requests, a five-second wait to hit the second bucket, and blocking calls until the next window.
Implement a client-side rate limiter to cap calls to a third-party review service, configure limits in application YAML, and use a fallback and cache to preserve performance and control costs.
Explore how a rate limiter controls resource usage by capping records served on a server node or requests sent to an upstream service, reducing cost and honoring service contracts.
This Masterclass is the definitive guide to building production-grade, resilient, and fault-tolerant Reactive Microservices. Moving beyond basic non-blocking APIs, you will master the most critical advanced patterns necessary to survive in a distributed environment: Resilience (Circuit Breaker, Bulkhead, Rate Limiter), Distributed Transactions (Orchestration), and Advanced API Composition (Scatter Gather). Learn to eliminate cascading failures, guarantee data consistency, and maximize system availability under extreme load. This is the expertise that elevates you to a senior microservices architect.
What You Will Master: Advanced Patterns for the Real World
Advanced API Composition Patterns:
Scatter Gather Pattern: Master high-performance parallel service composition to aggregate data from multiple downstream services with guaranteed fast responses.
Splitter Pattern: Learn to efficiently route single requests to multiple processing services simultaneously, increasing throughput and decoupling services.
Distributed Transaction Mastery (Saga Pattern):
Saga Orchestration: Solve the fundamental problem of data inconsistency across multiple services (e.g., Payment, Inventory, Shipping) without using costly two-phase commits.
Parallel vs. Sequential Workflow: Implement the Orchestrator Saga for both high-performance Parallel execution and reliable Sequential compensation logic.
Mastering Resilience Patterns:
Circuit Breaker: Learn to implement fault isolation and prevent cascading failures by quickly tripping and recovering services.
Bulkhead Pattern: Guarantee resource isolation and prevent a single failing service from consuming all thread resources and crashing your application.
Rate Limiter: Implement robust API protection and traffic control on both the server and client sides to prevent service abuse and guarantee stability.
Timeout & Retry: Master core reactive resilience techniques for handling transient errors and preventing perpetual deadlocks in your non-blocking flows.
By the end of this course, you will possess the specialized knowledge to design, implement, and operate truly resilient microservices architectures. You will no longer just build APIs; you will build systems that can reliably survive chaos and guarantee transactional integrity under any load.