<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Reactor on tsvinc</title>
    <link>https://tsvinc.dev/tags/reactor/</link>
    <description>Recent content in Reactor on tsvinc</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 06 Jul 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://tsvinc.dev/tags/reactor/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Every Route Registered. Every Request 404&#39;d.</title>
      <link>https://tsvinc.dev/posts/mono-zip-empty-404/</link>
      <pubDate>Mon, 06 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://tsvinc.dev/posts/mono-zip-empty-404/</guid>
      <description>&lt;p&gt;Thirty-three routes registered. Startup log confirms it. The &lt;code&gt;/routes&lt;/code&gt; management endpoint lists every one. And under load, every single request returns 404.&lt;/p&gt;&#xA;&lt;p&gt;This is the reactive Micronaut branch of the &lt;a href=&#34;https://tsvinc.dev/series/micronaut-256mb/&#34;&gt;space observatory benchmark&lt;/a&gt; — 28 upstream API calls, 10 HTTP clients, all pointed at a Go mock server that deliberately injects failures (HTTP 500, 504-after-delay, abrupt connection close). The imperative sibling branch works. The lighter synth variant works. This one: 100% 404.&lt;/p&gt;</description>
    </item>
    <item>
      <title>flatMap&#39;s Second Argument Saved 1.7 Million Requests</title>
      <link>https://tsvinc.dev/posts/flatmap-backpressure/</link>
      <pubDate>Mon, 15 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://tsvinc.dev/posts/flatmap-backpressure/</guid>
      <description>&lt;p&gt;Midway through a code review of the reactive pipeline, staring at this line in &lt;code&gt;NeoService.java&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;flatMap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;neo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;saveAsteroidWithApproaches&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sessionId&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;neo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s &lt;code&gt;Flux.flatMap()&lt;/code&gt; with one argument. The function. No concurrency limit. Reactor&amp;rsquo;s default: 256 concurrent inner subscriptions.&lt;/p&gt;&#xA;&lt;p&gt;The R2DBC connection pool has 20 connections. Netty has 4 worker threads. &lt;code&gt;flatMap&lt;/code&gt; will cheerfully create 256 concurrent database save operations on 20 connections and 4 threads, queuing 236 of them in memory. Every one holds a &lt;code&gt;NeoAsteroidRecord&lt;/code&gt; entity, a &lt;code&gt;NeoCloseApproach&lt;/code&gt; list, and whatever intermediate state Reactor needs for the inner publisher chain.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Seven Fixes, Zero Errors</title>
      <link>https://tsvinc.dev/posts/seven-fixes-zero-errors/</link>
      <pubDate>Fri, 12 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://tsvinc.dev/posts/seven-fixes-zero-errors/</guid>
      <description>&lt;p&gt;The fix for &amp;ldquo;JVM dies at 256 MB under load&amp;rdquo; was not a JVM flag.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://tsvinc.dev/posts/every-gc-failed-256mb/&#34;&gt;Part 4&lt;/a&gt; ended with Serial GC — the only GC that fits in 256 MB — serving 4,550 requests before the OOM killer showed up. 81% error rate. Same flags, same container, same load profile. Seven code changes later: 1,740,000 requests. Zero errors.&lt;/p&gt;&#xA;&lt;p&gt;No GC tuning. No new JVM flags at all. The problem was never the runtime. It was the code asking the runtime to hold things it didn&amp;rsquo;t need to hold.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
