<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Microservices on Java &amp; Software Architecture Knowledge Hub</title><link>https://samirsahoo.github.io/design-patterns-hub/tags/microservices/</link><description>Recent content in Microservices on Java &amp; Software Architecture Knowledge Hub</description><generator>Hugo</generator><language>en-US</language><copyright>© 2026 Samir Kumar Sahoo (https://github.com/samirsahoo). All rights reserved.</copyright><atom:link href="https://samirsahoo.github.io/design-patterns-hub/tags/microservices/index.xml" rel="self" type="application/rss+xml"/><item><title>What Is a Bounded Context?</title><link>https://samirsahoo.github.io/design-patterns-hub/domain-driven-design/strategic/bounded-context/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/domain-driven-design/strategic/bounded-context/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;bounded context&lt;/strong&gt; is an explicit boundary within which a particular domain model applies, and within which every term in the ubiquitous language has exactly one meaning.&lt;/p&gt;&#10;&lt;p&gt;Outside the boundary, the same word may mean something else, and that is acceptable. The boundary makes the difference explicit instead of leaving it hidden in one overloaded class.&lt;/p&gt;</description></item><item><title>Circuit Breakers and Resilience with Resilience4j</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/reliability/circuit-breakers-and-resilience4j/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/reliability/circuit-breakers-and-resilience4j/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Resilience patterns&lt;/strong&gt; stop one slow or failing dependency from taking down the services that call it:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;timeouts&lt;/strong&gt; bound waiting&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;retries&lt;/strong&gt; absorb transient errors&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;circuit breakers&lt;/strong&gt; fail fast while a dependency is unhealthy&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;bulkheads&lt;/strong&gt; isolate resources&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;rate limiters&lt;/strong&gt; control load.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;strong&gt;Resilience4j&lt;/strong&gt; is the standard Java library for these patterns, integrated with Spring Boot.&lt;/p&gt;</description></item><item><title>Event-Driven Microservices with Spring Cloud Stream, Kafka and RabbitMQ</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/communication/event-driven-spring-cloud-stream/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/communication/event-driven-spring-cloud-stream/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;In an &lt;strong&gt;event-driven architecture&lt;/strong&gt;, services &lt;strong&gt;publish events&lt;/strong&gt; (facts such as &lt;code&gt;OrderPlaced&lt;/code&gt;) to a &lt;strong&gt;message broker&lt;/strong&gt;, and other services &lt;strong&gt;consume&lt;/strong&gt; them asynchronously. &lt;strong&gt;Spring Cloud Stream&lt;/strong&gt; lets you write producers and consumers as plain Java &lt;strong&gt;functions&lt;/strong&gt;, bound to &lt;strong&gt;Kafka&lt;/strong&gt;, &lt;strong&gt;RabbitMQ&lt;/strong&gt; or other brokers through &lt;strong&gt;binders&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Microservices versus Modular Monolith</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/fundamentals/microservices-vs-modular-monolith/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/fundamentals/microservices-vs-modular-monolith/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;div class="table-wrap" tabindex="0" role="region" aria-label="Table"&gt;&#10;&lt;table&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&#10; &lt;th&gt;Style&lt;/th&gt;&#10; &lt;th&gt;Deployment units&lt;/th&gt;&#10; &lt;th&gt;Internal boundaries&lt;/th&gt;&#10; &lt;th&gt;Data&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;strong&gt;Monolith&lt;/strong&gt; (unstructured)&lt;/td&gt;&#10; &lt;td&gt;One&lt;/td&gt;&#10; &lt;td&gt;Weak or none&lt;/td&gt;&#10; &lt;td&gt;One shared schema, accessed from anywhere&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;strong&gt;Modular monolith&lt;/strong&gt;&lt;/td&gt;&#10; &lt;td&gt;One&lt;/td&gt;&#10; &lt;td&gt;Strong, enforced module boundaries aligned with business capabilities&lt;/td&gt;&#10; &lt;td&gt;One database, but each module owns its tables&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;&lt;strong&gt;Microservices&lt;/strong&gt;&lt;/td&gt;&#10; &lt;td&gt;Many, independently deployable&lt;/td&gt;&#10; &lt;td&gt;Enforced by the network&lt;/td&gt;&#10; &lt;td&gt;Each service owns its database&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;A &lt;strong&gt;modular monolith&lt;/strong&gt; is a single deployable application divided internally into modules with explicit interfaces and private internals. &lt;strong&gt;Microservices&lt;/strong&gt; take the same idea further: each module becomes a separately deployed process, owned by one team, with its own data store.&lt;/p&gt;</description></item><item><title>Distributed Tracing and Observability with Micrometer and OpenTelemetry</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/operations/observability-micrometer-opentelemetry/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/operations/observability-micrometer-opentelemetry/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Observability&lt;/strong&gt; is the ability to understand what a system is doing from its outputs:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;metrics&lt;/strong&gt;: numbers over time&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;traces&lt;/strong&gt;: the path of one request across services&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;logs&lt;/strong&gt;: discrete events with context.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;In Spring Boot, &lt;strong&gt;Micrometer&lt;/strong&gt; instruments the code once (the &lt;strong&gt;Observation API&lt;/strong&gt;). &lt;strong&gt;OpenTelemetry (OTel)&lt;/strong&gt; is the vendor-neutral standard for exporting telemetry over &lt;strong&gt;OTLP&lt;/strong&gt; to any backend.&lt;/p&gt;</description></item><item><title>Designing an Order Management System</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/order-management-system/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/order-management-system/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;a class="heading-anchor" href="#overview" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;This case study designs the system that takes a customer&amp;rsquo;s order in an online shop, reserves stock, takes payment and hands the order to fulfilment. It follows the &lt;a href="https://samirsahoo.github.io/design-patterns-hub/system-design/introduction/"&gt;18-step framework&lt;/a&gt; and reuses the retail domain from the &lt;a href="https://samirsahoo.github.io/design-patterns-hub/domain-driven-design/fundamentals/"&gt;DDD articles&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Saga Pattern: Choreography versus Orchestration</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/data-consistency/saga-pattern/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/data-consistency/saga-pattern/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;saga&lt;/strong&gt; is a sequence of &lt;strong&gt;local transactions&lt;/strong&gt;, one per service. Each step commits in its own database and triggers the next. If a step fails, the saga runs &lt;strong&gt;compensating transactions&lt;/strong&gt; that semantically undo the steps already completed. Sagas give microservices business-level consistency without a distributed transaction.&lt;/p&gt;</description></item><item><title>Idempotency: Safe Retries for APIs and Consumers</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/reliability/idempotency/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/reliability/idempotency/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;An operation is &lt;strong&gt;idempotent&lt;/strong&gt; if performing it several times has the same effect as performing it once. Idempotency is what makes &lt;strong&gt;retries safe&lt;/strong&gt;: and in distributed systems retries are unavoidable, because a timeout never tells you whether the operation happened.&lt;/p&gt;</description></item><item><title>Transactional Outbox and Idempotent Inbox</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/data-consistency/transactional-outbox/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/data-consistency/transactional-outbox/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The &lt;strong&gt;transactional outbox&lt;/strong&gt; pattern publishes events reliably from a service that owns a database. Instead of writing to the database &lt;strong&gt;and&lt;/strong&gt; sending to a broker (two systems that cannot share a transaction), the service writes the business change &lt;strong&gt;and an outbox row&lt;/strong&gt; in &lt;strong&gt;one local transaction&lt;/strong&gt;. A separate relay later reads the outbox and publishes to the broker. The matching &lt;strong&gt;inbox&lt;/strong&gt; pattern lets consumers process each message once, even when it is delivered several times.&lt;/p&gt;</description></item><item><title>CQRS and Event Sourcing</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/data-consistency/cqrs-and-event-sourcing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/data-consistency/cqrs-and-event-sourcing/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;CQRS (Command Query Responsibility Segregation)&lt;/strong&gt; uses &lt;strong&gt;different models for writing and reading&lt;/strong&gt;. Commands change state through a write model that enforces business rules; queries read from one or more read models shaped for the screens and APIs that use them.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Event sourcing&lt;/strong&gt; stores an entity&amp;rsquo;s state as the &lt;strong&gt;sequence of events&lt;/strong&gt; that happened to it (&lt;code&gt;OrderPlaced&lt;/code&gt;, &lt;code&gt;ItemAdded&lt;/code&gt;, &lt;code&gt;OrderShipped&lt;/code&gt;) instead of its current values. Current state is derived by replaying the events.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;They are independent patterns that combine naturally: event sourcing produces a stream of events, and CQRS projections consume it to build read models.&lt;/p&gt;</description></item><item><title>Service Discovery with Eureka, Consul and Kubernetes</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/fundamentals/service-discovery/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/fundamentals/service-discovery/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Service discovery&lt;/strong&gt; lets a service find the &lt;strong&gt;current network locations&lt;/strong&gt; of the instances of another service, by &lt;strong&gt;logical name&lt;/strong&gt; (&lt;code&gt;inventory-service&lt;/code&gt;) instead of hard-coded hosts. A &lt;strong&gt;service registry&lt;/strong&gt; keeps track of which instances are alive.&lt;/p&gt;</description></item><item><title>API Gateway with Spring Cloud Gateway</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/fundamentals/api-gateway/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/fundamentals/api-gateway/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;An &lt;strong&gt;API gateway&lt;/strong&gt; is the &lt;strong&gt;single entry point&lt;/strong&gt; for clients into a set of backend services. It &lt;strong&gt;routes&lt;/strong&gt; each request to the right service and applies &lt;strong&gt;cross-cutting edge concerns&lt;/strong&gt;: authentication, rate limiting, TLS, CORS, request shaping and observability. &lt;strong&gt;Spring Cloud Gateway&lt;/strong&gt; is Spring&amp;rsquo;s gateway, configured with &lt;strong&gt;routes&lt;/strong&gt;, &lt;strong&gt;predicates&lt;/strong&gt; and &lt;strong&gt;filters&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Centralized Configuration with Spring Cloud Config</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/fundamentals/centralized-configuration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/fundamentals/centralized-configuration/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Centralized configuration&lt;/strong&gt; stores the configuration of many services in &lt;strong&gt;one versioned, audited place&lt;/strong&gt; and serves it to them at startup (and optionally at runtime). &lt;strong&gt;Spring Cloud Config&lt;/strong&gt; provides a &lt;strong&gt;Config Server&lt;/strong&gt; (an HTTP API in front of Git, Vault or other backends) and a client that plugs into Spring Boot&amp;rsquo;s &lt;a href="https://samirsahoo.github.io/design-patterns-hub/spring/boot/externalized-configuration/"&gt;externalized configuration&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>