<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reactive-Web on despatches</title><link>https://icle.es/tags/reactive-web/</link><description>Recent content in Reactive-Web on despatches</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 18 Mar 2026 15:13:17 +0000</lastBuildDate><atom:link href="https://icle.es/tags/reactive-web/index.xml" rel="self" type="application/rss+xml"/><item><title>Microservices vs Monolith: Real World Tradeoffs</title><link>https://icle.es/2024/07/17/microservices-vs-monolith-real-world-tradeoffs/</link><pubDate>Wed, 17 Jul 2024 09:48:25 +0100</pubDate><guid>https://icle.es/2024/07/17/microservices-vs-monolith-real-world-tradeoffs/</guid><description>&lt;p>When starting a new backend system for a contract I was on, one of the early
decisions I had to make was whether to lean into a monolith or adopt a
microservices approach. While common wisdom offers strong opinions on both ends
of the spectrum, in reality, the choice often hinges on organizational
constraints as much as on technical purity.&lt;/p>
&lt;h3 id="reactive-vs-traditional-spring-web">Reactive vs Traditional Spring Web&lt;/h3>
&lt;p>I began by reviewing
&lt;a href="https://filia-aleks.medium.com/microservice-performance-battle-spring-mvc-vs-webflux-80d39fd81bf0">performance comparisons&lt;/a>
between Spring MVC and WebFlux. Reactive Web generally comes out ahead in
benchmarks, but that doesn’t tell the whole story.&lt;/p></description><content:encoded><![CDATA[<p>When starting a new backend system for a contract I was on, one of the early
decisions I had to make was whether to lean into a monolith or adopt a
microservices approach. While common wisdom offers strong opinions on both ends
of the spectrum, in reality, the choice often hinges on organizational
constraints as much as on technical purity.</p>
<h3 id="reactive-vs-traditional-spring-web">Reactive vs Traditional Spring Web</h3>
<p>I began by reviewing
<a href="https://filia-aleks.medium.com/microservice-performance-battle-spring-mvc-vs-webflux-80d39fd81bf0">performance comparisons</a>
between Spring MVC and WebFlux. Reactive Web generally comes out ahead in
benchmarks, but that doesn’t tell the whole story.</p>
<p>In our use case—web notifications—the benefit of reactive patterns depends
heavily on how data is delivered. If we were polling, the advantage would be
limited. However, with Server-Sent Events (SSE), Spring’s support aligns
directly with Reactive Web, making WebFlux the more appropriate choice for this
part of the system.</p>
<h3 id="the-deployment-constraint">The Deployment Constraint</h3>
<p>Ideally, I would have started with a monolith: a single deployable artifact
combining both the Kafka Streams logic and the API. This option would have
simplified initial development and allowed us to iterate quickly. But at the
client, the platform does not allow deploying a Kafka Streams app and an API
within the same Kubernetes deployment.</p>
<p>This effectively rules out a true monolith, even for a prototype.</p>
<h3 id="options-considered">Options Considered</h3>
<h4 id="shared-library-with-thin-deployments">Shared Library with Thin Deployments</h4>
<p>A middle ground was to build the core logic in a shared library and have
lightweight deployments wrap around it. This would allow the streams app and the
API to share code without needing to make HTTP calls between them.</p>
<p>The downside: these services are no longer independently deployable. But given
our team size and velocity goals, this compromise might be acceptable.</p>
<h4 id="full-microservices">Full Microservices</h4>
<p>Another option was to separate the services entirely:</p>
<ul>
<li><strong>Streams service</strong> (Kafka, plus domain-specific logic)</li>
<li><strong>Web API</strong> (for delivering notifications)</li>
<li><strong>Subscription API</strong> (managing notification subscriptions)</li>
</ul>
<p>This adheres more closely to the single responsibility principle, especially as
we move from PoC to MVP. However, it adds deployment and coordination overhead.</p>
<h4 id="application-profiles">Application Profiles</h4>
<p>A third hacky option was to control which parts of the app run using
environment-based profiles. For example, we could disable Kafka in dev or use
conditional beans to keep deployments clean. While not ideal long-term, it
offers flexibility for early stages.</p>
<h3 id="conclusion">Conclusion</h3>
<p>Constraints matter. While I lean toward monoliths for rapid delivery in small
teams, platform limitations forced a hybrid approach. We intend to evolve into
microservices over time, but only when the benefits clearly outweigh the cost.</p>
<p>Have you faced similar deployment constraints that shaped your architecture? I&rsquo;d
love to hear how you navigated them.</p>
]]></content:encoded></item></channel></rss>