<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://kroxylicious.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://kroxylicious.io/" rel="alternate" type="text/html" /><updated>2026-09-08T01:47:57+00:00</updated><id>https://kroxylicious.io/feed.xml</id><title type="html">Kroxylicious</title><subtitle>Network proxy framework for Apache Kafka</subtitle><entry><title type="html">Kroxylicious release 0.24.0</title><link href="https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/09/04/release-0_24_0.html" rel="alternate" type="text/html" title="Kroxylicious release 0.24.0" /><published>2026-09-04T03:00:00+00:00</published><updated>2026-09-04T03:00:00+00:00</updated><id>https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/09/04/release-0_24_0</id><content type="html" xml:base="https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/09/04/release-0_24_0.html"><![CDATA[<p>Kroxylicious 0.24.0 has snapped 🐊 into existence!</p>

<p>0.24.0 delivers <strong>SASL Termination</strong> and a significant evolution of the Filter/Router APIs.</p>

<p>The API change is a breaking one: if you’ve written your own filter or router, you’ll need to make small/easy code changes before adopting this release — we’ve shipped tooling to help. As maintainers, we are genuinely disappointed to have to introduce breaking changes; we never take them lightly. You can read more about why we needed to do this below.</p>

<blockquote>
  <p><strong>Release Highlights at a Glance:</strong></p>
  <ul>
    <li><strong>New Feature:</strong> SASL Termination (OAUTHBEARER, SCRAM-SHA-256/512) directly at the proxy layer.</li>
    <li><strong>Breaking API Change:</strong> Relocated core API types from <code class="language-plaintext highlighter-rouge">org.apache.kafka.*</code> to <code class="language-plaintext highlighter-rouge">io.kroxylicious.kafka.*</code>.</li>
    <li><strong>Automated Upgrade:</strong> OpenRewrite recipes available to migrate your codebase automatically.</li>
    <li><strong>Community Feedback:</strong> Active discussion open on upcoming design proposals.</li>
  </ul>
</blockquote>

<hr />

<h3 id="introducing-sasl-termination">Introducing SASL Termination</h3>

<p>Kroxylicious 0.24.0 adds built-in <strong>SASL Termination</strong>, allowing the proxy to authenticate incoming client connections directly rather than forwarding authentication handshakes to upstream Kafka brokers.</p>

<p><strong>Why SASL Termination?</strong></p>

<p>Filters that rely on client identity (such as custom authorization or dynamic routing) need to know who is making a request. While SASL Inspection handles direct downstream-to-upstream connections easily enough, it finds itself out of depth across multiple upstreams. PLAIN and OAUTHBEARER require identical credentials across all upstreams, while SCRAM fails entirely because each upstream expects its own unique handshake token.</p>

<p>SASL Termination resolves this by authenticating requests downstream at the proxy. This opens up support for mixed authentication: with this release, you can accept SCRAM from a downstream client while using mTLS upstream (where the proxy authenticates using its own certificate). While dynamically selecting an identity and how to present it upstream isn’t supported yet, termination provides the baseline needed to build that flexibility.</p>

<p><strong>What it does in 0.24.0:</strong></p>

<ul>
  <li><strong>Authenticates clients directly</strong> — terminates SASL at the proxy for OAUTHBEARER, SCRAM-SHA-256, and SCRAM-SHA-512. The broker never sees the client’s authentication exchange.</li>
  <li><strong>Exposes a verified principal to downstream filters</strong> — after authentication, the identity is available to any filter further down the chain, such as the new <a href="https://kroxylicious.io/documentation/0.24.0/html/authorization-guide">Authorization filter</a>.</li>
  <li><strong>Works without a broker connection</strong> — authentication completes before any upstream connection is made, which is a prerequisite for routing decisions that depend on who the client is.</li>
  <li><strong>Credential isolation</strong> — the proxy holds only PBKDF2-derived keys, not plaintext passwords. Client credentials never reach the broker.</li>
  <li><strong>KIP-368 reauthentication</strong> — enforces session lifetimes and handles periodic reauthentication transparently.</li>
</ul>

<p><strong>Getting started</strong></p>

<p>For SCRAM mechanisms, credentials are managed using the bundled <code class="language-plaintext highlighter-rouge">scram-credential-tool</code>, which ships in the Kroxylicious distribution at <code class="language-plaintext highlighter-rouge">bin/scram-credential-tool.sh</code>. The tool creates and manages a proxy SCRAM credential file—a PKCS#12 file containing only derived keys, never plaintext passwords. Use it to create the credential file and provision users before starting the proxy.</p>

<p>The filter is also hardened against timing side-channel attacks by default: a <code class="language-plaintext highlighter-rouge">fixedAuthDelay</code> (200 ms by default) ensures authentication responses take consistent time regardless of whether a username exists or a password is correct. Phantom SCRAM challenges are generated for unknown usernames so that an attacker cannot distinguish a missing user from a failed authentication by counting protocol round-trips.</p>

<p>The filter works in both standalone and Kubernetes deployments. In Kubernetes, credentials are stored in a Secret and referenced using <code class="language-plaintext highlighter-rouge">${secret:...}</code> interpolation in the <code class="language-plaintext highlighter-rouge">KafkaProtocolFilter</code> resource—the operator mounts the secret entries automatically.</p>

<p>For full configuration details, see the <a href="https://kroxylicious.io/documentation/0.24.0/html/authentication-guide">Authentication Guide</a>. To explore the architecture and design behind this feature, see <a href="https://github.com/kroxylicious/design/blob/main/proposals/124-sasl-termination.md">Design Proposal 124</a>.</p>

<hr />

<h3 id="the-api-shift-decoupling-the-kroxylicious-public-api-from-kafka-internal-apis">The API Shift: Decoupling the Kroxylicious Public API from Kafka Internal APIs.</h3>

<p>Until now, the Kroxylicious filter API has depended directly on classes from Apache Kafka’s <code class="language-plaintext highlighter-rouge">kafka-clients</code> JAR — types like <code class="language-plaintext highlighter-rouge">*Data</code> message classes, protocol infrastructure, and record classes that appear directly in filter method signatures. In Kafka 4.3, the Kafka maintainers did something entirely reasonable: they moved classes they consider implementation details into internal packages to make that boundary explicit. That’s good API hygiene on their part. The uncomfortable truth it forced us to confront is that Kroxylicious was depending on things Kafka never intended as public API — and those classes lived in Kafka’s codebase, under Kafka’s package naming, on Kafka’s timeline. That’s not a stable foundation for a 1.0.</p>

<p>So in 0.24.0 we took source ownership of every type that appears in the Kroxylicious public API. The classes previously imported from <code class="language-plaintext highlighter-rouge">org.apache.kafka.*</code> now live under <code class="language-plaintext highlighter-rouge">io.kroxylicious.kafka.*</code>, mechanically translated so the sub-package hierarchy is preserved. The original Apache Software Foundation copyright headers are retained, as is appropriate for code redistributed under the Apache 2.0 licence. We now own the source, which means we can evolve it where appropriate for Kroxylicious going forward.</p>

<p>The practical upshot for filter developers: <code class="language-plaintext highlighter-rouge">kafka-clients</code> is no longer a compile or runtime dependency of <code class="language-plaintext highlighter-rouge">kroxylicious-api</code>. If your filter depends on <code class="language-plaintext highlighter-rouge">kafka-clients</code> directly, that’s still fine — it’s your dependency to manage. But the proxy core no longer drags it in transitively. The separation is real at the artifact level, not just cosmetic.</p>

<p><strong>One break, then stable</strong></p>

<p>We made a deliberate choice to do this in a single, clean migration rather than absorb the changes piecemeal. Drip-feeding breaking changes across releases is worse than one honest “here’s what moved, here’s how to update.” Our goal for 1.0 is a stable, predictable API that we control — this is the last time we expect to move these types.</p>

<p><strong>Wire compatibility</strong></p>

<p>Owning the source raises an obvious question: how do you know the classes you copied still produce byte-identical wire output to Kafka’s originals? The answer is that we prove it on every build. We ship a suite of byte-level round-trip fidelity tests that serialise a message with our generated classes, deserialise with Kafka’s, and assert equality — then run the same test in reverse. Every protocol message type, every supported protocol version. If something drifts, CI breaks before it ships.</p>

<p>The wire format is governed by KIPs and is genuinely stable. The Java classes representing it were not. We’ve separated those two concerns.</p>

<p>If you encounter any gaps or missing classes in your custom filters after upgrading, please <a href="https://github.com/kroxylicious/kroxylicious/issues">open an issue on GitHub</a> — we moved what was required, but we may have missed something in the long tail.</p>

<hr />

<h3 id="automated-migration-with-openrewrite">Automated Migration with OpenRewrite</h3>

<p>To make updating your codebase as smooth as possible, we are providing automated migration recipes powered by <strong>OpenRewrite</strong>. While we make it sound like a simple <code class="language-plaintext highlighter-rouge">x -&gt; y</code> transition, a bash one-liner isn’t going to cut it (no matter how good your Perl is—yes, I’m looking at you, Claude).</p>

<p><strong>Maven</strong></p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mvn org.openrewrite.maven:rewrite-maven-plugin:run <span class="se">\</span>
  <span class="nt">-Drewrite</span>.recipeArtifactCoordinates<span class="o">=</span>io.kroxylicious:kroxylicious-migrations:0.24.0 <span class="se">\</span>
  <span class="nt">-Drewrite</span>.activeRecipes<span class="o">=</span>io.kroxylicious.migrations.rewrite.v0_24.MigrateTo0_24
</code></pre></div></div>

<p><strong>Gradle</strong></p>

<div class="language-kotlin highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nf">plugins</span> <span class="p">{</span>
    <span class="nf">id</span><span class="p">(</span><span class="s">"org.openrewrite.rewrite"</span><span class="p">)</span> <span class="n">version</span> <span class="s">"6.x.x"</span>
<span class="p">}</span>

<span class="nf">dependencies</span> <span class="p">{</span>
    <span class="nf">rewrite</span><span class="p">(</span><span class="s">"io.kroxylicious:kroxylicious-migrations:0.24.0"</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div></div>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./gradlew rewriteRun <span class="nt">-Drewrite</span>.activeRecipe<span class="o">=</span>io.kroxylicious.migrations.rewrite.v0_24.MigrateTo0_24
</code></pre></div></div>

<p>Further details around running these migrations can be found on <a href="https://github.com/kroxylicious/kroxylicious/tree/main/kroxylicious-proxy-core/kroxylicious-migrations">GitHub</a>.</p>

<hr />

<h3 id="design-proposals--shaping-the-future">Design Proposals &amp; Shaping the Future</h3>

<p>We explored the trade-offs and options for this migration in <a href="https://github.com/kroxylicious/design/blob/main/proposals/116-kafka-api-migration.md">Design Proposal 116</a>.</p>

<p>If you read Proposal 116, you will notice it originally suggested a simple <code class="language-plaintext highlighter-rouge">sed</code> script for migration. Design proposals are point-in-time snapshots of our thinking, not unchangeable commandments. As we got into implementation, OpenRewrite offered a far superior, AST-aware refactoring experience.</p>

<p>This shift highlights the importance of our proposal process. If API stability or new proxy features impact how you use Kroxylicious, we strongly encourage you to review and participate in active design proposals on the <a href="https://github.com/kroxylicious/design">Kroxylicious Design Repository</a>. Your feedback helps shape the project as we head toward 1.0.</p>

<h3 id="community-contributions">Community Contributions</h3>

<p>This release included commits from:</p>
<ul>
  <li><a href="https://github.com/AdityaThakur1998">AdityaThakur1998</a></li>
  <li><a href="https://github.com/DragonFSKY">DragonFSKY</a></li>
  <li><a href="https://github.com/jjj-n">jjj-n</a></li>
  <li><a href="https://github.com/k-wall">k-wall</a></li>
  <li><a href="https://github.com/lntutor">lntutor</a></li>
  <li><a href="https://github.com/lukman48">lukman48</a></li>
  <li><a href="https://github.com/matheusandre1">matheusandre1</a></li>
  <li><a href="https://github.com/oozan">oozan</a></li>
  <li><a href="https://github.com/piotrpdev">piotrpdev</a></li>
  <li><a href="https://github.com/RafaelReia">RafaelReia</a></li>
  <li><a href="https://github.com/robobario">robobario</a></li>
  <li><a href="https://github.com/SamBarker">SamBarker</a></li>
  <li><a href="https://github.com/tamikikoz">tamikikoz</a></li>
  <li><a href="https://github.com/TheDarkniteFalls">TheDarkniteFalls</a></li>
  <li><a href="https://github.com/tombentley">tombentley</a></li>
</ul>

<p>Thank you all, your hard work is massively appreciated by the PMC!</p>

<h3 id="artefacts">Artefacts</h3>

<p>Download binary distributions and container images from the <a href="https://kroxylicious.io/download/0.24.0/">download</a> page.</p>

<h3 id="feedback">Feedback</h3>

<p>Drop by and say hello on <a href="https://kroxylicious.slack.com">Slack</a>, <a href="https://github.com/kroxylicious/kroxylicious/issues">GitHub</a>, or <a href="https://bsky.app/profile/kroxylicious.io">bsky</a>. You can also join us in person at a <a href="/join-us/community-call/">community call</a>.</p>]]></content><author><name>Sam Barker</name></author><category term="blog" /><category term="kroxylicious-proxy" /><category term="releases" /><category term="releases" /><category term="kroxylicious-proxy" /><summary type="html"><![CDATA[Kroxylicious 0.24.0 has snapped 🐊 into existence!]]></summary></entry><entry><title type="html">kroxylicious-junit5-extension release 0.16.0</title><link href="https://kroxylicious.io/releases/junit5-extension/2026/08/12/release-0_16_0-junit-extension.html" rel="alternate" type="text/html" title="kroxylicious-junit5-extension release 0.16.0" /><published>2026-08-12T00:00:00+00:00</published><updated>2026-08-12T00:00:00+00:00</updated><id>https://kroxylicious.io/releases/junit5-extension/2026/08/12/release-0_16_0-junit-extension</id><content type="html" xml:base="https://kroxylicious.io/releases/junit5-extension/2026/08/12/release-0_16_0-junit-extension.html"><![CDATA[<p>The Kroxylicious project is very pleased to announce the <a href="https://github.com/kroxylicious/kroxylicious-junit5-extension/releases/tag/v0.16.0">0.16.0</a> release of our Junit5 Extension.</p>

<p>Highlights of this release:</p>

<ul>
  <li>Raised the project’s Java baseline to 21, up from 17. Make sure your build targets Java 21 before you upgrade.</li>
  <li>Bumped the Kafka dependency to 4.3.1.</li>
  <li>Relaxed <code class="language-plaintext highlighter-rouge">@BrokerConfig</code> so you can now override the replication factor of internal topics (offsets, transaction state log, share coordinator state). This helps when testing coordinator failover across multi-broker clusters.</li>
</ul>

<h3 id="feedback">Feedback</h3>

<p>Please let us know, through <a href="https://kroxylicious.slack.com">Slack</a> or <a href="https://github.com/kroxylicious/kroxylicious-junit5-extension/issues">GitHub</a>, if you find the extension interesting or helpful.</p>]]></content><author><name>Robert Young</name></author><category term="releases" /><category term="junit5-extension" /><summary type="html"><![CDATA[The Kroxylicious project is very pleased to announce the 0.16.0 release of our Junit5 Extension.]]></summary></entry><entry><title type="html">Kroxylicious release 0.23.0</title><link href="https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/07/16/release-0_23_0.html" rel="alternate" type="text/html" title="Kroxylicious release 0.23.0" /><published>2026-07-16T00:00:00+00:00</published><updated>2026-07-16T00:00:00+00:00</updated><id>https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/07/16/release-0_23_0</id><content type="html" xml:base="https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/07/16/release-0_23_0.html"><![CDATA[<p>Kroxylicious 0.23.0 has snapped🐊 into existence!</p>

<p>This release adds PEM key material support to the KMS integrations, and adds support for multi-tenancy in the Thales Cipher Trust Manager integration.
Router API integration work continues in incubation.</p>

<p>Check out the full <a href="https://github.com/kroxylicious/kroxylicious/blob/main/CHANGELOG.md#0230">Changelog</a> for everything including deprecations, changes, and removals.</p>

<p>Here are the highlights:</p>

<h3 id="pem-key-material-for-kms-integrations">PEM Key Material for KMS Integrations</h3>

<p>A long-standing request (this one goes all the way back to <a href="https://github.com/kroxylicious/kroxylicious/issues/933">#933</a>!) is finally hatched: the KMS integrations now support PEM format key material for TLS trust and client identity. PKCS#1 and PKCS#8 private key formats are both supported.
You can configure TLS for your KMS provider directly from PEM certificates, without converting to PKCS#12 keystores first.</p>

<h3 id="ciphertrust-manager-multi-tenant-support">CipherTrust Manager Multi-Tenant Support</h3>

<p>The CipherTrust Manager KMS plugin now supports an optional <code class="language-plaintext highlighter-rouge">domain</code> field in <code class="language-plaintext highlighter-rouge">userCredentials</code>.
When set, the password-grant token request is scoped to that domain, enabling multi-tenant CipherTrust deployments where different virtual clusters authenticate against different CipherTrust domains:</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">kms</span><span class="pi">:</span> <span class="s">CipherTrustKmsService</span>
<span class="na">kmsConfig</span><span class="pi">:</span>
  <span class="na">endpointUrl</span><span class="pi">:</span> <span class="s">https://ctm.example.com</span>
  <span class="na">userCredentials</span><span class="pi">:</span>
    <span class="na">username</span><span class="pi">:</span> <span class="s">myuser</span>
    <span class="na">password</span><span class="pi">:</span>
      <span class="na">passwordFile</span><span class="pi">:</span> <span class="s">/path/to/password</span>
    <span class="na">domain</span><span class="pi">:</span> <span class="s">my-tenant-domain</span>
</code></pre></div></div>

<p>If you use client certificate based authentication, domains are supported too.</p>

<h3 id="cross-namespace-strimzi-references">Cross-Namespace Strimzi References</h3>

<p><a href="https://github.com/RafaelReia">Rafael Reia</a> contributed support for cross-namespace Strimzi Kafka references.
<code class="language-plaintext highlighter-rouge">KafkaService.spec.strimziKafkaRef.namespace</code> can now point to a Strimzi <code class="language-plaintext highlighter-rouge">Kafka</code> cluster in any watched namespace, not just the namespace of the <code class="language-plaintext highlighter-rouge">KafkaService</code> itself.
This is particularly useful for organisations that separate their Kafka infrastructure and proxy configurations into different namespaces.</p>

<h3 id="router-api-integration">Router API Integration</h3>

<p>We continued integrating the <a href="https://github.com/kroxylicious/design/blob/main/proposals/070-routing-api.md">Router API</a> into the heart of the proxy.
A <code class="language-plaintext highlighter-rouge">RouterFactory</code> can now create a <code class="language-plaintext highlighter-rouge">Router</code> that fans out requests (<code class="language-plaintext highlighter-rouge">RouterContext.sendRequest()</code>) from a single client connection to multiple upstream clusters based on request content.</p>

<p>This is still an incubating feature and not ready for production, but if you’re curious, unlock the feature flag <code class="language-plaintext highlighter-rouge">KROXYLICIOUS_UNLOCK_ROUTING=true</code> (environment variable) and get routing! We’d love to hear your feedback.</p>

<h3 id="community-contributions">Community Contributions</h3>

<p>This release included commits from:</p>

<p><a href="https://github.com/AdityaThakur1998">AdityaThakur1998</a>, <a href="https://github.com/dahyvuun">Dahyun Woo</a>, <a href="https://github.com/Decluttered">DeCluttered</a>, <a href="https://github.com/gggeon96">Geonhyeon Kim</a>, Keith Wall, <a href="https://github.com/MClavo">M Clavo</a>, <a href="https://github.com/RafaelReia">Rafael Reia</a>, Robert Young, Sam Barker, Tom Bentley, <a href="https://github.com/Uzziee">Urjit Patel</a></p>

<p>Thank you all!</p>

<h3 id="artefacts">Artefacts</h3>

<p>Download binary distributions and container images from the <a href="https://kroxylicious.io/download/0.23.0/">download</a> page.</p>

<h3 id="feedback">Feedback</h3>

<p>Drop by and say hello on <a href="https://kroxylicious.slack.com">Slack</a>, <a href="https://github.com/kroxylicious/kroxylicious/issues">GitHub</a>, or <a href="https://bsky.app/profile/kroxylicious.io">bsky</a>. You can also join us in person at a <a href="/join-us/community-call/">community call</a>.</p>]]></content><author><name>Keith Wall</name></author><category term="blog" /><category term="kroxylicious-proxy" /><category term="releases" /><category term="releases" /><category term="kroxylicious-proxy" /><summary type="html"><![CDATA[Kroxylicious 0.23.0 has snapped🐊 into existence!]]></summary></entry><entry><title type="html">Kroxylicious release 0.22.0</title><link href="https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/07/03/release-0_22_0.html" rel="alternate" type="text/html" title="Kroxylicious release 0.22.0" /><published>2026-07-03T00:00:00+00:00</published><updated>2026-07-03T00:00:00+00:00</updated><id>https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/07/03/release-0_22_0</id><content type="html" xml:base="https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/07/03/release-0_22_0.html"><![CDATA[<p>Kroxylicious 0.22.0 has been released!
This release brings a new Record Encryption KMS implementation for Thales CipherTrust Manager, bumps the minimum Java version to 21, and improves operator resilience.
We’ve also been busy building the foundations for hot reload of virtual clusters.
We’ve taken our first steps towards routing a single client connection to multiple upstream clusters.
Thanks to everyone who contributed!
Check out the full <a href="https://github.com/kroxylicious/kroxylicious/blob/main/CHANGELOG.md#0220">Changelog</a> for everything including deprecations, changes, and removals.</p>

<p>Here are the highlights:</p>

<h3 id="thales-ciphertrust-manager-kms">Thales CipherTrust Manager KMS</h3>

<p>Keith Wall added a new KMS provider for Record Encryption backed by <a href="https://cpl.thalesgroup.com/encryption/ciphertrust-manager">Thales CipherTrust Manager</a>.
Supported authentication mechanisms are username/password and client certificate authentication.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">kms</span><span class="pi">:</span> <span class="s">CipherTrustKmsService</span>
<span class="na">kmsConfig</span><span class="pi">:</span>
  <span class="na">endpointUrl</span><span class="pi">:</span> <span class="s">https://ctm.example.com</span>
  <span class="na">userCredentials</span><span class="pi">:</span>
    <span class="na">username</span><span class="pi">:</span> <span class="s">myuser</span>
    <span class="na">password</span><span class="pi">:</span>
      <span class="na">passwordFile</span><span class="pi">:</span> <span class="s">/path/to/password</span>
</code></pre></div></div>

<h3 id="named-cluster-definitions-clusterdefinitions">Named Cluster Definitions (<code class="language-plaintext highlighter-rouge">clusterDefinitions</code>)</h3>

<p>Previously each virtual cluster had its own inline <code class="language-plaintext highlighter-rouge">targetCluster</code>, duplicating connection details across virtual clusters that share the same upstream.
Now you define the target cluster once under the top-level <code class="language-plaintext highlighter-rouge">clusterDefinitions</code> list and reference it with <code class="language-plaintext highlighter-rouge">target: { cluster: "&lt;name&gt;" }</code> from any virtual cluster.</p>

<p><strong>Before:</strong></p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">virtualClusters</span><span class="pi">:</span>
  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">dev</span>
    <span class="na">targetCluster</span><span class="pi">:</span>
      <span class="na">bootstrapServers</span><span class="pi">:</span> <span class="s">broker1:9092,broker2:9092</span>
  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">test</span>
    <span class="na">targetCluster</span><span class="pi">:</span>
      <span class="na">bootstrapServers</span><span class="pi">:</span> <span class="s">broker1:9092,broker2:9092</span>
</code></pre></div></div>

<p><strong>After:</strong></p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">clusterDefinitions</span><span class="pi">:</span>
  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">my-cluster</span>
    <span class="na">bootstrapServers</span><span class="pi">:</span> <span class="s">broker1:9092,broker2:9092</span>

<span class="na">virtualClusters</span><span class="pi">:</span>
  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">dev</span>
    <span class="na">target</span><span class="pi">:</span>
      <span class="na">cluster</span><span class="pi">:</span> <span class="s">my-cluster</span>
  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">test</span>
    <span class="na">target</span><span class="pi">:</span>
      <span class="na">cluster</span><span class="pi">:</span> <span class="s">my-cluster</span>
</code></pre></div></div>

<p>The <code class="language-plaintext highlighter-rouge">targetCluster</code> field is deprecated and will be removed in a future release, but continues to work unchanged for now.</p>

<h3 id="kafkaproxyingress-infrastructure-annotations">KafkaProxyIngress Infrastructure Annotations</h3>

<p>We added <code class="language-plaintext highlighter-rouge">KafkaProxyIngress.spec.infrastructure.annotations</code> to the KafkaProxyIngress custom resource.
The operator now propagates these custom annotations to the Services and Routes it manages.
For example, on AWS you can request a Network Load Balancer instead of the default Classic Load Balancer:</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">spec</span><span class="pi">:</span>
  <span class="na">infrastructure</span><span class="pi">:</span>
    <span class="na">annotations</span><span class="pi">:</span>
      <span class="na">service.beta.kubernetes.io/aws-load-balancer-type</span><span class="pi">:</span> <span class="s2">"</span><span class="s">nlb"</span>
</code></pre></div></div>

<h3 id="java-21-now-required">Java 21 Now Required</h3>

<p>Java 17 support has been removed. <strong>Java 21 is now the minimum runtime required.</strong></p>

<h3 id="operator-resilience">Operator Resilience</h3>

<p>Sam Barker fixed a class of operator bugs where <code class="language-plaintext highlighter-rouge">KafkaProxy</code>, <code class="language-plaintext highlighter-rouge">KafkaService</code>, and <code class="language-plaintext highlighter-rouge">VirtualKafkaCluster</code> resources could get stuck under API server load or transient unavailability.
The operator watches related resources (such as Secrets and ConfigMaps) and reconciles the owning primary resource when they change.
Previously, each such event triggered a live API server lookup to find the primary resource; under pressure this could fail and leave the resource stuck.
The operator now reads from its local cache instead.</p>

<h3 id="foundations-for-whats-next">Foundations for What’s Next</h3>

<h4 id="hot-reload">Hot Reload</h4>

<p><a href="https://github.com/Uzziee">Urjit Patel</a> completed the hot-reload engine!
What this means is users that embed Kroxylicious can implement their own mechanism for dynamically reloading individual Virtual Clusters without restarting the whole proxy process.
Note that the standalone binary distribution and operator do not yet take advantage of this engine, we are currently shaping this in design proposal <a href="https://github.com/kroxylicious/design/pull/117">#117</a>.
Embedders today can use:</p>
<ul>
  <li>The <code class="language-plaintext highlighter-rouge">KafkaProxy.reconfigure()</code> API to push a new configuration while the proxy is running.</li>
  <li>Add, remove, or replace the filter chains of individual virtual clusters.</li>
  <li>New metrics tracking lifecycle state: <code class="language-plaintext highlighter-rouge">kroxylicious_virtual_cluster_state</code>, <code class="language-plaintext highlighter-rouge">kroxylicious_virtual_cluster_transitions_total</code>, <code class="language-plaintext highlighter-rouge">kroxylicious_reconfigure_total</code> and <code class="language-plaintext highlighter-rouge">kroxylicious_reconfigure_duration_seconds</code>.</li>
</ul>

<p>Big thank you to Urjit for driving this implementation.</p>

<h4 id="routing-api">Routing API</h4>

<p>We have taken our first steps towards implementing the <a href="https://github.com/kroxylicious/design/blob/main/proposals/070-routing-api.md">Routing API</a>!
We recently accepted this proposal which adds powerful capabilities to Kroxylicious.
Currently when a client connects to Kroxylicious, the proxy establishes a single connection to an upstream node.
The Routing API decouples things so that messages received on a single client connection can be routed to multiple upstream nodes.
The new features are not yet user facing, we have published the routing interfaces, enabling developers to start building Router implementations, and have begun implementing the Routing engine.</p>

<h3 id="community-contributions">Community Contributions</h3>

<p>This release included commits from:</p>

<p><a href="https://github.com/dahyvuun">Dahyun Woo</a>, <a href="https://github.com/Decluttered">DeCluttered</a>, <a href="https://github.com/devareddy05">Devendra Reddy Pennabadi</a>, <a href="https://github.com/DragonFSKY">DragonFSKY</a>, Francisco Vila, Keith Wall, <a href="https://github.com/mapan1984">mapan1984</a>, PaulRMellor, <a href="https://github.com/piotrpdev">Piotr Płaczek</a>, <a href="https://github.com/polachandu">polachandu</a>, Robert Young, <a href="https://github.com/Roshr2211">Roshni R</a>, Sam Barker, Tom Bentley, <a href="https://github.com/Uzziee">Urjit Patel</a></p>

<p>Thank you all!</p>

<h3 id="artefacts">Artefacts</h3>

<p>Binary distributions and container images are available on the <a href="https://kroxylicious.io/download/0.22.0/">download</a> page.</p>

<h3 id="feedback">Feedback</h3>

<p>We’d love to hear from you! Whether you’re kicking the tyres, running Kroxylicious in production, or just find the project interesting — drop by and say hello.
You can reach us through <a href="https://kroxylicious.slack.com">Slack</a>, <a href="https://github.com/kroxylicious/kroxylicious/issues">GitHub</a> or even <a href="https://bsky.app/profile/kroxylicious.io">bsky</a>, or tell us in person on one of our upcoming <a href="/join-us/community-call/">community calls</a>.</p>]]></content><author><name>Rob Young</name></author><category term="blog" /><category term="kroxylicious-proxy" /><category term="releases" /><category term="releases" /><category term="kroxylicious-proxy" /><summary type="html"><![CDATA[Kroxylicious 0.22.0 has been released! This release brings a new Record Encryption KMS implementation for Thales CipherTrust Manager, bumps the minimum Java version to 21, and improves operator resilience. We’ve also been busy building the foundations for hot reload of virtual clusters. We’ve taken our first steps towards routing a single client connection to multiple upstream clusters. Thanks to everyone who contributed! Check out the full Changelog for everything including deprecations, changes, and removals.]]></summary></entry><entry><title type="html">How hard can it be??? Maxing out a Kroxylicious instance</title><link href="https://kroxylicious.io/benchmarking/performance/engineering/2026/06/03/benchmarking-the-proxy-under-the-hood.html" rel="alternate" type="text/html" title="How hard can it be??? Maxing out a Kroxylicious instance" /><published>2026-06-03T00:00:00+00:00</published><updated>2026-06-03T00:00:00+00:00</updated><id>https://kroxylicious.io/benchmarking/performance/engineering/2026/06/03/benchmarking-the-proxy-under-the-hood</id><content type="html" xml:base="https://kroxylicious.io/benchmarking/performance/engineering/2026/06/03/benchmarking-the-proxy-under-the-hood.html"><![CDATA[<p>How hard can it be? We started with a laptop, a codebase, and a lot of confidence it was fast. We ended up with a benchmark harness, an eleven-node cluster, and a much more nuanced answer.</p>

<p>Harder than expected. More interesting too.</p>

<p>We gave everyone <a href="/benchmarking/performance/2026/05/28/benchmarking-the-proxy.html">the numbers</a> in a bland, but slide worthy way, already. This one is the engineering story: how we built the harness, what the flamegraphs actually show, the workload design choices that changed the answers, and the bugs we found in our own tooling.</p>

<h2 id="why-not-kafkas-own-tools">Why not Kafka’s own tools?</h2>

<p>Kafka ships with <code class="language-plaintext highlighter-rouge">kafka-producer-perf-test</code> and <code class="language-plaintext highlighter-rouge">kafka-consumer-perf-test</code>. We’d used them before. The problems:</p>

<ul>
  <li><strong>Too noisy</strong>: individual runs produced widely varying results depending on JVM warm-up, scheduling jitter, and GC behaviour. Results were hard to trust and harder to compare across scenarios.</li>
  <li><strong>Producer-only view</strong>: <code class="language-plaintext highlighter-rouge">kafka-producer-perf-test</code> gives you publish latency, but nothing about the consumer side. You can’t see end-to-end latency — which is something operators actually care about.</li>
  <li><strong>Awkward to sweep</strong>: running parametric rate sweeps requires scripting around these tools, and comparing results across scenarios requires manual work.</li>
  <li><strong>Coordinated omission</strong>: under load, kafka-producer-perf-test only measures requests it actually sends! So when things start loading up and applying back pressure the send rate drops and the latency stays looking nice and healthy. Only it’s not healthy in reality, things are queuing up in your producer.</li>
</ul>

<p>And critically, it’s never heard of Kroxylicious… You have though, you’re here!</p>

<p><a href="https://github.com/openmessaging/benchmark">OpenMessaging Benchmark (OMB)</a> is a better fit. It’s an industry-standard tool used by Confluent, the Pulsar team, and others for their published performance comparisons — so who am I to argue? OMB coordinates producers and consumers across separate worker pods, runs a configurable warmup phase before taking measurements, takes latency tracking seriously — correcting for coordinated omission, and outputs structured JSON that’s straightforward to process programmatically. What’s not to like?</p>

<p>Using OMB also means our methodology is directly comparable to other published Kafka benchmarks. The numbers aren’t comparable, of course — it’s not the same hardware, network conditions or phase of the moon.</p>

<h2 id="what-we-built-on-top-of-omb">What we built on top of OMB</h2>

<p>So we just fire up OMB and get some numbers, right? Errr no. OMB just does the measurement part. I work really hard at being lazy, I hate clicking things with a mouse and I knew these tests needed to be repeatable. So we scripted deployment (of all the things) teardown (for isolation), diagnostic collection <em>(WHAT BROKE NOW??)</em>, and last but not least result processing (what does this wall of JSON mean?)</p>

<p>So now all of that lives in <a href="https://github.com/kroxylicious/kroxylicious/tree/main/kroxylicious-openmessaging-benchmarks"><code class="language-plaintext highlighter-rouge">kroxylicious-openmessaging-benchmarks</code></a> in the main tree <em>(mono repo FTW)</em>.</p>

<p>So we have a tool and we think Kroxylicious is fast — but how do we turn that into something we can actually show management? “Fast” is shorthand for “low impact”, and the impact of a proxy shows up along two dimensions:</p>

<ul>
  <li><strong>Latency</strong>: how much extra time does this additional hop add?</li>
  <li><strong>Throughput</strong>: how much does routing traffic through the proxy cost my topic throughput?</li>
</ul>

<p>Two dimensions, two questions — and it turns out they need quite different experimental approaches to answer.</p>

<p><strong>Rate sweep — where does latency start to bite?</strong>
<code class="language-plaintext highlighter-rouge">scripts/rate-sweep.sh</code> holds the connection count fixed and steps the producer rate up in fixed increments, letting the cluster stabilise at each step. We defined saturation as the sustained throughput dropping more than 5% below the target rate. The rate sweep tells you where the cliff edge is and what latency looks like as you approach it.</p>

<p><strong>Connection sweep — is the ceiling per-connection or per-pod?</strong>
<code class="language-plaintext highlighter-rouge">scripts/connection-sweep.sh</code> holds the per-producer rate fixed and steps up the number of producers (1, 2, 4, 8, 16 by default) — consumers scale to match. This tells you the aggregate throughput ceiling of a single proxy pod <em>(need more? help out!)</em>: the point where adding more connections stops increasing total throughput.</p>

<p>Both sweeps use <code class="language-plaintext highlighter-rouge">scripts/run-benchmark.sh</code> under the hood, which:</p>

<ol>
  <li>Deploys the Helm chart for the requested scenario</li>
  <li>Waits for the OMB Job to complete</li>
  <li>Collects results: OMB JSON, a JFR recording, an async-profiler flamegraph, and a Prometheus metrics snapshot</li>
  <li>Tears down</li>
</ol>

<p>The <code class="language-plaintext highlighter-rouge">--skip-deploy</code> flag lets you re-run a probe against an already-deployed cluster — both sweep scripts deploy once and probe many times.</p>

<h3 id="banishing-click-ops">Banishing click-ops</h3>

<p>Coming from Red Hat, my instinct is to reach for an operator — but operators are great at managing cohesive things. The stack we needed to deploy is anything but cohesive: an OMB coordinator, worker pods, a Strimzi-managed Kafka cluster, the Kroxylicious operator, the proxy itself, and HashiCorp Vault for the KMS. It’s less “managed application” and more <em>all your <del>base</del> CRs belong to us</em>.</p>

<p>We could have dumped some YAML in a directory and used <code class="language-plaintext highlighter-rouge">kustomize apply</code>. But I am lazy, and that’s a lot of typing. Helm handles this beautifully — one chart, scenario-specific overrides, and a single command to deploy the whole thing. Scenario-specific configuration lives in <code class="language-plaintext highlighter-rouge">helm/kroxylicious-benchmark/scenarios/</code> as YAML overrides — the base chart stays stable and each scenario adds only what it needs:</p>

<table>
  <thead>
    <tr>
      <th>Scenario file</th>
      <th>What it deploys</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">baseline-values.yaml</code></td>
      <td>Direct Kafka, no proxy</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">proxy-no-filters-values.yaml</code></td>
      <td>Proxy with no user filters</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">encryption-values.yaml</code></td>
      <td>Proxy with AES-256-GCM encryption and Vault</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">rate-sweep-values.yaml</code></td>
      <td>Extended run profiles for sweep experiments</td>
    </tr>
  </tbody>
</table>

<p>If you have your own KMS — and you will run this on your own infrastructure, right?! — you can swap Vault out without touching the base chart.</p>

<h3 id="json-always-comes-in-megabytes">JSON always comes in megabytes</h3>

<p>Each benchmark run produces a blob of structured JSON. Useful in principle; a wall of noise in practice. Three <a href="https://www.jbang.dev/">JBang</a>-runnable Java programs <em>(I’m a dyed in the wool java dev, sue me)</em> pull out the signal:</p>

<ul>
  <li><strong><code class="language-plaintext highlighter-rouge">RunMetadata</code></strong>: captures the run context — git commit, timestamp, cluster node specs (architecture, CPU, RAM), and on OpenShift, NIC speed read from the host via the MachineConfigDaemon pod. Generates <code class="language-plaintext highlighter-rouge">run-metadata.json</code> alongside each result so you can always tell what conditions produced a number. This is what makes run-to-run comparisons meaningful — and when a run takes 12 hours, trust me, you don’t want to re-run it without good reason.</li>
  <li><strong><code class="language-plaintext highlighter-rouge">ResultComparator</code></strong>: answers “did this change hurt?” — reads two scenario result directories and produces a markdown comparison table. Baseline vs encryption is the obvious use, but the tool is generic. Already running a proxy? proxy-no-filters vs encryption tells you the cost of the filter itself, not the proxy hop. Building your own filter? That’s your comparison — measure the chain with and without it.</li>
  <li><strong><code class="language-plaintext highlighter-rouge">ResultSummariser</code></strong>: answers “where does it fall over?” — reads a rate-sweep result directory and prints a summary table: target rate, achieved rate, p99, and whether the probe saturated. Where ResultComparator compares two scenarios at a fixed rate, ResultSummariser tracks one scenario across a range of rates.</li>
</ul>

<p>Getting NIC speed from a Kubernetes node turned out to be non-trivial — you need host filesystem access to read <code class="language-plaintext highlighter-rouge">/sys/class/net/&lt;iface&gt;/speed</code>. On OpenShift, the MachineConfigDaemon pods mount the host at <code class="language-plaintext highlighter-rouge">/rootfs</code>, so we <code class="language-plaintext highlighter-rouge">kubectl exec</code> into the MCD pod and <code class="language-plaintext highlighter-rouge">chroot /rootfs</code> to read the speed file without creating any new privileged resources. Fiddly, but worth it — knowing your NIC speed is the difference between “the ceiling was the NIC” and “the ceiling wasn’t the NIC”.</p>

<h2 id="workload-design">Workload design</h2>

<p>Benchmarks are artificial constructs. Your traffic patterns are never stable — message sizes vary, topic counts grow, producers burst — so there’s always a tension between numbers that are <em>representative</em> and numbers that are actually <em>repeatable</em>. We leaned towards repeatable.</p>

<p>The primary workload makes Kafka experts wince <em>(I had to squirm to type it)</em> — <strong>1 topic, 1 partition, 1 KB messages</strong>. Concentrating everything onto a single TopicPartition means we hit the limits earlier, at lower absolute volumes, which makes the proxy’s contribution easier to isolate. Isolating the proxy is, after all, the goal.</p>

<p>But Kafka is often described as a distributed append-only log, and we can’t ignore the word “distributed” when it comes to latency. With RF=1, the proxy doubles the sequential hops in the critical path: one becomes two. That’s not wrong, but it’s not a fair picture either — nobody runs RF=1 in production. With RF=3, the leader waits for ISR acknowledgements before confirming the produce, so there’s already replication latency in the critical path. The proxy adds a real, sequential hop — we’re not trying to bury that — but it lands alongside a cost that’s already there. One extra hop on top of a multi-hop round trip is a different picture from doubling a single-hop one. Three brokers, hot partition replicated across all of them.</p>

<p>But we didn’t abandon representative entirely. The multi-topic runs (10 and 100 topics) are the reconnection point: load spread across more topics, closer to what production actually looks like, at rates well below any saturation point. You’re measuring the proxy’s baseline tax — the cost you always pay, not just the cost when you’re pushing hard. It holds.</p>

<p>That covers the first dimension — the proxy’s latency tax at normal load. For the second, throughput, the question is: how much does routing through the proxy reduce your maximum sustainable rate? That needs a different approach. We used rate sweeps: hold the connection count fixed, step the rate up incrementally, and watch what happens. Below the ceiling, achieved throughput tracks the target — the system keeps up. Above it, it can’t, and falls behind. The point where achieved throughput diverges from the target rate — where we defined that as dropping below 95% — is the saturation point. That’s the knee of the curve, and that’s what we were hunting.</p>

<h2 id="false-summit">False summit</h2>

<p>The rate-sweep result was in: the encryption scenario hit a ceiling on our original cluster at around 37k msg/s. Summit reached.</p>

<p>Except — the proxy had spare CPU cycles. Not a little: meaningful headroom. If the proxy isn’t CPU-saturated, whatever we hit isn’t the proxy’s ceiling.</p>

<p><strong>Was it the NIC?</strong> At 37k msg/s and 1 KB messages, produce traffic alone is 37 MB/s. Add RF=3 replication: the leader ships two copies outbound, ~74 MB/s more. 111 MB/s total — fine for 10 GbE, obviously broken for 1 GbE. If the NICs had been gigabit, replication traffic would have saturated them long before we got to 37k. Network eliminated.</p>

<p><strong>Was it the proxy pod, or just one connection?</strong> The rate sweep runs with a single producer. We ran four at the same per-producer rate. Aggregate throughput climbed higher than one producer alone could push — the pod had headroom the single connection wasn’t using. We checked proxy metrics: back pressure was minimal. The proxy wasn’t the constraint. Whatever was limiting one connection, it wasn’t us.</p>

<h3 id="we-tried-anti-affinity">We tried anti-affinity</h3>

<p>Then a curveball: could it be node saturation? The original cluster had three worker nodes — and three Kafka brokers. Strimzi, being sensible, spreads brokers evenly: one per node. If the proxy had landed on the same node as a busy broker, that node could be the bottleneck rather than the proxy pod itself.</p>

<p>We added a hard anti-affinity rule to keep the proxy off broker nodes. It wouldn’t schedule.</p>

<p>The penny drops: three worker nodes, three brokers, one per node — there is nowhere for the proxy to go that isn’t already co-located with a broker. Obvious in hindsight. We needed a bigger cluster.</p>

<p>We provisioned one: eight workers, three masters, 16 vCPU per node.</p>

<h3 id="the-baseline-shock">The baseline shock</h3>

<p>Baseline first. Direct Kafka, no proxy.</p>

<p>~19,400 msg/s. The original cluster had been sustaining ~50,000.</p>

<p>The proxy wasn’t in the picture. We checked the obvious suspects: disk I/O — fine, local and unsaturated. OMB worker scaling — correct. Broker CPU: ~1.2 vCPU. Nothing was at a limit.</p>

<p>The answer was in the pipeline arithmetic. A Kafka producer has a maximum number of in-flight requests — batches sent but not yet acknowledged. With real round-trip times between nodes, that in-flight window bounds throughput. We measured: 0.87 ms between worker nodes, with three replication hops before the leader can confirm a produce at RF=3 — roughly 3–4 ms total. Five in-flight requests across that round trip gives a theoretical ceiling in the right ballpark, and the measured ~19,400 msg/s baseline confirmed it.</p>

<p>On the original cluster, those nodes were almost certainly co-located on the same physical host. Inter-node RTTs at that scale are sub-millisecond — effectively free. The original cluster’s 50k baseline wasn’t what a 3-broker Kafka cluster does. It was what a 3-broker Kafka cluster does when the network is a memcpy.</p>

<p>The new cluster was genuinely distributed. Real latency, real pipeline limits, real Kafka — and the cluster we used for everything from here.</p>

<p><em>(The ~37k ceiling is the only figure in this post from the original cluster. Everything that follows — the coefficient, the CPU sweep, the prediction — was measured on the new cluster. The physics are part of what makes those numbers honest.)</em></p>

<p>Another penny dropped. We’d had the same scheduling problem with OMB all along. The producer and consumer worker pods were landing on broker nodes — and when pods share a node, the SDN detects that traffic doesn’t need to leave the node and bypasses the NIC entirely. The producers and consumers weren’t paying for network transit at all.</p>

<p>The proxy pod was on a different node, but on a 3-node cluster where every node already had a broker, the odds of those nodes sharing a physical host on Fyre were high. Almost certainly getting the same benefit, just one layer down.</p>

<h3 id="now-push-harder">Now push harder</h3>

<p>The new cluster had an honest baseline — but RF=3 pipeline limits meant we couldn’t push a single topic past ~17k msg/s. There was no room to find the proxy’s CPU ceiling when Kafka’s pipeline hits the wall first.</p>

<p>RF=1, 10 topics. With no replication hops, the round-trip drops to producer→leader only: 0.87 ms. Spread across 10 partitions, no single one becomes the bottleneck before the proxy does. We validated the workload with the passthrough proxy: throughput scaled well past anything encryption constrains. The ceiling we were now measuring was proxy CPU.</p>

<h3 id="how-much-more">How much more?</h3>

<p>The RF=1 10-topic workload spread load across partitions. At 1000m, the run tells us: comfortable at ~82 MB/s (publish p99: 246 ms, E2E p99: 344 ms), with E2E latency blowing up at ~164 MB/s — the proxy’s CPU budget exhausted. The coefficient comes from JFR CPU data across the non-saturated probes:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Measured: 10.0 mc per MB/s of total proxy traffic (±7.8 stdev, n=6 non-saturated probes)
→ operator formula: 10 mc per MB/s of total proxy traffic
→ for 1:1 produce:consume at 1 KB: 20 mc per MB/s of produce throughput
</code></pre></div></div>

<p>I was proudly showing off some early numbers — baseline vs proxy, looking good — when one of the computer science PhDs on the team asked, “is the difference real?” Best answer I could come up with at the time: “Good question.” So I went and added statistical significance testing.</p>

<p><code class="language-plaintext highlighter-rouge">check-significance.sh</code> runs Mann-Whitney U at p &lt; 0.05, comparing per-window p99 latency samples between baseline and candidate at each rate step. OMB slices the test phase into time windows and records a p99 per window — ~30 samples per 5-minute run — so MWU has enough data to distinguish real signal from noise. It’s not perfect: those per-window samples aren’t entirely uncorrelated — a GC pause can drag multiple adjacent windows — but it gives a principled answer to “is this overhead real, or am I chasing noise?”</p>

<p>The coefficient is a different matter. It’s derived from JFR CPU data across n=6 non-saturated probes; the ±7.8 stdev reflects measurement noise, not a tested confidence interval. It holds at 1, 2, and 4 cores — the linear scaling claim is consistent — but its validity across message sizes or workload shapes is untested.</p>

<p>The mechanism: <code class="language-plaintext highlighter-rouge">cpu: 1000m → availableProcessors()=1 → one Netty event loop thread</code>. At 4000m that’s four threads, each handling its share of connections in parallel. If the ceiling scales linearly with thread count, a 4-core pod should handle roughly four times as much. We ran it.</p>

<table>
  <thead>
    <tr>
      <th>CPU limit</th>
      <th>Comfortable ceiling</th>
      <th>Saturation point</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1000m</td>
      <td>~82 MB/s (publish p99: 246 ms, E2E: 344 ms)</td>
      <td>~164 MB/s</td>
    </tr>
    <tr>
      <td>4000m</td>
      <td>~164 MB/s (publish p99: 259 ms, E2E: 392 ms)</td>
      <td>~329 MB/s</td>
    </tr>
  </tbody>
</table>

<p>At 4000m: comfortable at 164 MB/s, E2E catastrophic at 329 MB/s — ceiling reached. The proxy isn’t hitting a fixed architectural wall — it’s hitting a CPU budget wall, and that wall moves when you give it more CPU.</p>

<h3 id="the-prediction">The prediction</h3>

<p>One validated scaling point isn’t a sizing model. The coefficient predicts that 2-core should sustain well past 82 MB/s and not saturate until well above 164 MB/s. We ran 2-core next.</p>

<table>
  <thead>
    <tr>
      <th>Rate</th>
      <th>Publish p99</th>
      <th>E2E p99</th>
      <th>Verdict</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>~82 MB/s</td>
      <td>307 ms</td>
      <td>396 ms</td>
      <td>Comfortable</td>
    </tr>
    <tr>
      <td>~164 MB/s</td>
      <td>499 ms</td>
      <td>1,200 ms</td>
      <td>Sustaining — not yet saturated</td>
    </tr>
  </tbody>
</table>

<p>At 164 MB/s across 10 partitions, each partition carries 16 MB/s — within the budget of a single Netty thread. The elevated E2E latency reflects the proxy running near but not at its ceiling. The 2-core saturation point sits above 164 MB/s; the model is consistent.</p>

<p>The full picture — coefficient measured across all three core counts and three topic counts:</p>

<table>
  <thead>
    <tr>
      <th> </th>
      <th>1-core (1000m)</th>
      <th>2-core (2000m)</th>
      <th>4-core (4000m)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><strong>1 topic</strong></td>
      <td>15.7 mc/MB/s</td>
      <td>24.3 mc/MB/s</td>
      <td>30.5 mc/MB/s†</td>
    </tr>
    <tr>
      <td><strong>10 topics</strong></td>
      <td>10.0 mc/MB/s</td>
      <td>19.9 mc/MB/s</td>
      <td>25.1 mc/MB/s</td>
    </tr>
    <tr>
      <td><strong>100 topics</strong></td>
      <td>4.3 mc/MB/s</td>
      <td>6.8 mc/MB/s</td>
      <td>8.0 mc/MB/s</td>
    </tr>
  </tbody>
</table>

<p><em>Sizing coefficient (mc per MB/s of total bidirectional proxy traffic). Post 1 uses k=25 mc/MB/s (4-core 10-topic) as the conservative upper bound.</em></p>

<p><em>† 4-core 1-topic: at high producer counts, the Kafka partition limit caps single-partition throughput before the proxy saturates — the high stdev (±18.6) reflects this. Use the 10-topic or 100-topic rows for sizing.</em></p>

<p><em>The coefficient rises with core count, which might seem at odds with the linear scaling claim. The ceiling table above — 4-core sustaining double the throughput of 1-core — is the cleaner test of linearity. The coefficient is measured from a connection-count sweep where each data point adds both more connections and more throughput simultaneously; decomposing those two effects requires a separate rate sweep at fixed connection count, which we have not yet run. Preliminary analysis suggests the per-byte encryption cost is roughly stable across core counts, and the rising coefficient reflects a per-thread baseline overhead that scales with the number of Netty event loop threads.</em></p>

<p>Setting <code class="language-plaintext highlighter-rouge">requests</code> equal to <code class="language-plaintext highlighter-rouge">limits</code> makes this practical: a pod that can burst above its CPU limit introduces headroom uncertainty that breaks the model. Fix the CPU budget; fix the ceiling.</p>

<h2 id="the-flamegraph-where-the-cpu-actually-goes">The flamegraph: where the CPU actually goes</h2>

<p>I care deeply that the proxy does as little work as possible on the hot path. Optimization is often less about swapping algorithms — if you only ever have five items, who cares how you sort them — and more about realising what work not to do, or finding a better time to do it. <a href="https://en.wikipedia.org/wiki/Amdahl%27s_law">Amdahl’s law</a> governs this: the maximum speedup you can get from optimizing a component is bounded by how much of total execution time that component actually owns. If the proxy accounts for 2% of CPU, you can’t optimize your way to a 10% win — not there.</p>

<p>That framing is exactly why flamegraphs matter to me. Not as a debugging tool, but as a way of seeing the shape of the work. I was also hoping to tell a fuller story here — profiles across the full rate sweep, watching the mix shift as the proxy approaches saturation. Getting stable, reproducible numbers turned out to be harder than expected, and the bugs described in the next section cost us more runs than I’d like. So these are two snapshots at a single rate, not the sweep-correlated picture I had in mind. Still enough to see where the CPU goes. I hope to revisit this properly in the future — but right now the proxy’s performance is good enough that I’m focused on functionality, and the benchmarking harness itself still has room to mature.</p>

<p>We captured CPU profiles using async-profiler attached to the proxy JVM via <code class="language-plaintext highlighter-rouge">jcmd JVMTI.agent_load</code>, during the steady-state measurement phase. These are self-time percentages — where the CPU is actually spending cycles, not inclusive call-tree time.</p>

<p>The flamegraphs below are fully interactive: hover over a frame to see its name and percentage, click to zoom in, Ctrl+F to search. Scroll within the frame to explore the full stack depth.</p>

<h3 id="no-filter-proxy">No-filter proxy</h3>

<figure>
<iframe src="/assets/blog/flamegraphs/benchmarking-the-proxy/proxy-no-filters-cpu-profile.html" width="100%" height="600" style="border: 1px solid #ddd; border-radius: 4px;" title="CPU flamegraph: no-filter proxy at 13,600 msg/s">
</iframe>
<figcaption>CPU flamegraph — passthrough proxy (no filters), 13,600 msg/s, 1 topic, 1 KB messages. <a href="/assets/blog/flamegraphs/benchmarking-the-proxy/proxy-no-filters-cpu-profile.html" target="_blank">Open full screen ↗</a></figcaption>
</figure>

<table>
  <thead>
    <tr>
      <th>Category</th>
      <th>CPU share</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Syscalls (send/recv)</td>
      <td>63.2%</td>
    </tr>
    <tr>
      <td>Netty I/O</td>
      <td>14.6%</td>
    </tr>
    <tr>
      <td>Native/VM</td>
      <td>10.8%</td>
    </tr>
    <tr>
      <td>Memory operations</td>
      <td>5.2%</td>
    </tr>
    <tr>
      <td>JDK libraries</td>
      <td>3.8%</td>
    </tr>
    <tr>
      <td>Kroxylicious proxy</td>
      <td>1.7%</td>
    </tr>
    <tr>
      <td>Kafka protocol</td>
      <td>0.6%</td>
    </tr>
    <tr>
      <td>GC</td>
      <td>0.2%</td>
    </tr>
  </tbody>
</table>

<p>The proxy is overwhelmingly I/O-bound. 63% of CPU is in <code class="language-plaintext highlighter-rouge">send</code>/<code class="language-plaintext highlighter-rouge">recv</code> syscalls — the inherent cost of maintaining two TCP connections (client→proxy, proxy→Kafka) with data flowing through the JVM. The proxy itself accounts for 1.7% — and understanding <em>why</em> that number is so small is the interesting part.</p>

<p>Kroxylicious decodes Kafka RPCs selectively: each filter declares which API keys it cares about, and the proxy only deserialises messages that at least one filter needs. Even in the no-filter scenario, the default infrastructure filters are doing genuine L7 work — broker address rewriting, API version negotiation, topic name caching — which means metadata, FindCoordinator, and API version exchanges are fully decoded. But the high-volume produce and consume traffic? The decode predicate skips full deserialisation for those entirely, passing them through at close to L4 speed.</p>

<p>The 1.7% is the cost of a proxy that is <em>selectively</em> L7: doing real Kafka protocol work where it matters, and treating the hot path like a TCP relay where it doesn’t. That’s not a side-effect — it’s what the decode predicate design is for, and this flamegraph validates it.</p>

<h3 id="encryption-proxy-same-13600-msgs">Encryption proxy (same 13,600 msg/s)</h3>

<figure>
<iframe src="/assets/blog/flamegraphs/benchmarking-the-proxy/encryption-cpu-profile-13k.html" width="100%" height="600" style="border: 1px solid #ddd; border-radius: 4px;" title="CPU flamegraph: encryption proxy at 13,600 msg/s">
</iframe>
<figcaption>CPU flamegraph — encryption proxy (AES-256-GCM), 13,600 msg/s, 1 topic, 1 KB messages. <a href="/assets/blog/flamegraphs/benchmarking-the-proxy/encryption-cpu-profile-13k.html" target="_blank">Open full screen ↗</a></figcaption>
</figure>

<table>
  <thead>
    <tr>
      <th>Category</th>
      <th>No-filters</th>
      <th>Encryption</th>
      <th>Delta</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Syscalls (send/recv)</td>
      <td>63.2%</td>
      <td>28.5%</td>
      <td>−34.7%*</td>
    </tr>
    <tr>
      <td>Netty I/O</td>
      <td>14.6%</td>
      <td>6.2%</td>
      <td>−8.4%*</td>
    </tr>
    <tr>
      <td>Native/VM</td>
      <td>10.8%</td>
      <td>17.5%</td>
      <td>+6.7%</td>
    </tr>
    <tr>
      <td>Memory operations</td>
      <td>5.2%</td>
      <td>13.7%</td>
      <td><strong>+8.5%</strong></td>
    </tr>
    <tr>
      <td>JDK libraries</td>
      <td>3.8%</td>
      <td>9.7%</td>
      <td><strong>+5.9%</strong></td>
    </tr>
    <tr>
      <td>GC / JVM housekeeping</td>
      <td>0.2%</td>
      <td>10.5%</td>
      <td><strong>+10.3%</strong></td>
    </tr>
    <tr>
      <td>JCA/AES-GCM crypto</td>
      <td>0.0%</td>
      <td>6.5%</td>
      <td><strong>+6.5%</strong></td>
    </tr>
    <tr>
      <td>Kroxylicious proxy logic</td>
      <td>1.7%</td>
      <td>4.5%</td>
      <td><strong>+2.8%</strong></td>
    </tr>
    <tr>
      <td>Kafka protocol re-encoding</td>
      <td>0.6%</td>
      <td>2.9%</td>
      <td><strong>+2.3%</strong></td>
    </tr>
  </tbody>
</table>

<p><em>* Send/recv and Netty I/O appear to shrink as a percentage share because encryption adds CPU work that grows the total pie. The absolute I/O cost is similar in both scenarios.</em></p>

<p>The direct crypto cost is 9.3%: 6.5% in the AES-GCM cipher itself, with the additional 2.8% in Kroxylicious proxy logic representing the encryption filter’s dispatch and record handling on top of the baseline proxy work. But the more striking result is the indirect costs — encryption’s second-order effects dwarf its first-order cost:</p>

<ul>
  <li><strong>GC pressure (+10.3%)</strong>: encryption creates a stream of short-lived byte buffers — encrypted ciphertext, plaintext copies, re-encoded Kafka record wrappers — most of them dead before the next record arrives. The JVM’s young-gen collector is working hard to keep up.</li>
  <li><strong>Buffer management (+8.5%)</strong>: each record must be read into a buffer, decrypted or encrypted into a new buffer, then re-packed into Kafka protocol format — three buffer lifetimes per record instead of one.</li>
  <li><strong>JDK security infrastructure (+5.9%)</strong>: cipher instance creation, security provider dispatch, key spec handling.</li>
  <li><strong>Kafka protocol re-encoding (+2.3%)</strong>: encrypted records are a different size to their plaintext originals; they must be re-serialised into the Kafka batch format before forwarding.</li>
</ul>

<p>If you wanted to optimise this, the highest-impact areas would be: reducing buffer copies (encrypt in-place or use composite buffers), pooling encryption buffers to reduce GC pressure, and caching <code class="language-plaintext highlighter-rouge">Cipher</code> instances to reduce per-record JDK security overhead.</p>

<p>There are wins inside the proxy we haven’t chased yet — serialisation and deserialisation we could avoid, buffer copies imposed by how memory records are structured. Some would be straightforward; others would require rethinking how Kafka records are modelled in memory. We haven’t gone after them. But to put it plainly: we can optimise all we like inside the proxy, and we’re still not going to make AES faster.</p>

<h2 id="bugs-we-found-in-our-own-tooling">Bugs we found in our own tooling</h2>

<p>During the 4-producer rate sweep, we noticed that JFR recordings and flamegraphs from probes 2 onwards all looked identical to probe 1. They were stale copies. Three bugs.</p>

<p><strong>Bug 1 — wrong JFR settings</strong>: When restarting JFR for a subsequent probe in <code class="language-plaintext highlighter-rouge">--skip-deploy</code> mode, the script was using <code class="language-plaintext highlighter-rouge">settings=default</code> instead of <code class="language-plaintext highlighter-rouge">settings=profile</code>. The default profile omits I/O events including <code class="language-plaintext highlighter-rouge">jdk.NetworkUtilization</code> — the event we were using to read network throughput from JFR. Fixed to always use <code class="language-plaintext highlighter-rouge">settings=profile</code>.</p>

<p><strong>Bug 2 — async-profiler not restarted</strong>: The restart block restarted JFR but never restarted async-profiler. All probes after the first had a flamegraph from probe 1 only.</p>

<p><strong>Bug 3 — wrong guard variable</strong>: The async-profiler restart was guarded by checking <code class="language-plaintext highlighter-rouge">AGENT_LIB</code> (the path to the native library). <code class="language-plaintext highlighter-rouge">AGENT_LIB</code> is always set when the library exists on the image — even when profiling was intentionally skipped on clusters where the <code class="language-plaintext highlighter-rouge">Unconfined</code> seccomp profile couldn’t be applied. The correct guard is <code class="language-plaintext highlighter-rouge">ASYNC_PROFILER_FLAGS</code>, which is only set when the seccomp patch was successfully applied.</p>

<p>Spotting these required noticing that two different probe flamegraphs were pixel-for-pixel identical, then working back through the restart logic. The lesson: when reusing a deployed cluster across multiple probes, validate that diagnostic collection is actually running fresh for each one.</p>

<h2 id="run-it-yourself">Run it yourself</h2>

<p>We’re an open source project — we share our workings. The raw OMB result JSON, JFR recordings, and flamegraph files that back this post are <a href="/redirect/blog/benchmarking-the-proxy-under-the-hood/benchmark-data">available for download</a>. If you want to verify the numbers, reproduce the analysis, or compare against your own runs, everything you need is there.</p>

<p>If you want to run it against your own cluster, everything is in <code class="language-plaintext highlighter-rouge">kroxylicious-openmessaging-benchmarks/</code> in the <a href="https://github.com/kroxylicious/kroxylicious">main Kroxylicious repository</a>. See <code class="language-plaintext highlighter-rouge">QUICKSTART.md</code> for step-by-step instructions. You’ll need a Kubernetes or OpenShift cluster, the Kroxylicious operator installed, and Helm 3. Minikube works for local runs — the quickstart covers recommended CPU and memory settings.</p>

<p>I got so bored re-evaluating everything as I explored anti-affinity that I even scripted the whole exercise for this post — but brace yourself, it has about a 18 hour runtime. tmux and a control node or jump host are your friends here. The <a href="https://gist.github.com/SamBarker/19fd06ac9a8614cc6be89b76a90e006a">full blog post script</a> is available as a gist if you want to reproduce the exact run.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># Run a baseline vs encryption comparison</span>
./scripts/run-benchmark.sh <span class="nt">--scenario</span> baseline
./scripts/run-benchmark.sh <span class="nt">--scenario</span> encryption

<span class="c"># Compare results</span>
jbang src/main/java/io/kroxylicious/benchmarks/results/ResultComparator.java <span class="se">\</span>
  results/baseline results/encryption
</code></pre></div></div>

<h2 id="wait-just-one-more-run">Wait! Just… one… more… run…</h2>

<p>The coefficient is validated at 1, 2, and 4 cores for 1 KB messages. There are more runs I’d like to do:</p>

<ul>
  <li><strong>io_uring</strong>: 63% of the passthrough proxy’s CPU goes to <code class="language-plaintext highlighter-rouge">send</code>/<code class="language-plaintext highlighter-rouge">recv</code> syscalls — each a kernel entry and exit. io_uring batches I/O through a shared ring buffer, eliminating per-operation syscall overhead entirely. Netty has a native io_uring transport. If it halves that 63%, the passthrough proxy becomes genuinely unmeasurable. The flamegraph made this obvious; the run hasn’t happened yet.</li>
  <li><strong>GC tuning</strong>: Netty naturally produces a clean generational profile, and the proxy leans into this rather than fighting it. Per-message allocations don’t outlive their request-response cycle; connection-scoped state lives for the lifetime of the connection. Encryption magnifies the GC cost because it requires more per-message allocations than passthrough, but the memory pressure is expected. That makes it a natural fit for tuning: the collector doesn’t have to guess what’s garbage. Generational ZGC is one well-motivated experiment: designed for high-allocation workloads where most objects die young, which matches exactly. But it runs concurrently, trading stop-the-world pauses for continuous background CPU cost. Whether that helps or hurts a proxy that’s already CPU-bound at saturation — here be dragons.</li>
  <li><strong>Message size variation</strong>: larger messages should show lower overhead as a percentage (fixed per-record costs spread over more bytes); smaller messages the opposite. 1 KB is a reasonable middle ground but not the whole story.</li>
  <li><strong>Horizontal scaling</strong>: multiple proxy pods haven’t been measured; linear scaling is expected but unconfirmed.</li>
  <li><strong>Multi-pass sweeps</strong>: each rate point was measured once. Running each probe three times and taking the median would tighten the bounds in the saturation transition zone.</li>
</ul>

<p>The operator-facing sizing reference and all the key tables are in <code class="language-plaintext highlighter-rouge">SIZING-GUIDE.md</code> in the benchmarks directory.</p>]]></content><author><name>Sam Barker</name></author><category term="benchmarking" /><category term="performance" /><category term="engineering" /><summary type="html"><![CDATA[How hard can it be? We started with a laptop, a codebase, and a lot of confidence it was fast. We ended up with a benchmark harness, an eleven-node cluster, and a much more nuanced answer.]]></summary></entry><entry><title type="html">Does my proxy look big in this cluster?</title><link href="https://kroxylicious.io/benchmarking/performance/2026/05/28/benchmarking-the-proxy.html" rel="alternate" type="text/html" title="Does my proxy look big in this cluster?" /><published>2026-05-28T02:30:00+00:00</published><updated>2026-05-28T02:30:00+00:00</updated><id>https://kroxylicious.io/benchmarking/performance/2026/05/28/benchmarking-the-proxy</id><content type="html" xml:base="https://kroxylicious.io/benchmarking/performance/2026/05/28/benchmarking-the-proxy.html"><![CDATA[<p>Every good benchmarking story starts with a hunch. Mine was that Kroxylicious is cheap to run — I’d stake my career on it, in fact — but it turns out that “trust me, I wrote it” is not a widely accepted unit of measurement. People want proof. Sensibly.</p>

<p>There’s a practical question underneath the hunch too. The most common thing operators ask us is some variation of: “How many cores does the proxy need?” Which translates, from polite engineering into plain English, as: “is this thing going to slow down my Kafka?” We’d been giving the classic answer: “it depends on your workload and traffic patterns, so you’ll need to test in your environment.” Which is true. And also deeply unsatisfying for everyone involved, including us.</p>

<p>So we stopped saying “it depends” — we built something you can run <strong>yourselves</strong> on your own infrastructure with your own workload, and measured it. Here are some representative numbers from ours.</p>

<p><strong>TL;DR</strong>:</p>
<ul>
  <li>A passthrough proxy adds negligible overhead: publish latency impact is below measurement noise, E2E adds ~2 ms at moderate topic rates, throughput unaffected</li>
  <li>Add record encryption and expect a ~25% throughput reduction; at comfortable rates, E2E latency stays within measurement noise and publish latency adds up to ~10 ms</li>
  <li>The throughput ceiling scales linearly with CPU: budget ~25 mc per MB/s of total proxy traffic (conservative; the <a href="/benchmarking/performance/engineering/2026/06/03/benchmarking-the-proxy-under-the-hood.html">companion post</a> has the full coefficient grid)</li>
  <li>The full benchmark harness is open source — run it on your own cluster for numbers that reflect your workload</li>
</ul>

<h2 id="what-we-measured">What we measured</h2>

<p>We ran three scenarios against the same Apache Kafka® cluster on the same hardware:</p>

<ul>
  <li><strong>Baseline</strong> — producers and consumers talking directly to Kafka, no proxy in the path</li>
  <li><strong>Passthrough proxy</strong> — traffic routed through Kroxylicious with no filter chain configured</li>
  <li><strong>Record encryption</strong> — traffic through Kroxylicious with AES-256-GCM record encryption enabled, using HashiCorp Vault as the KMS</li>
</ul>

<p>We used <a href="https://github.com/openmessaging/benchmark">OpenMessaging Benchmark (OMB)</a> rather than Kafka’s own <code class="language-plaintext highlighter-rouge">kafka-producer-perf-test</code>. OMB is an industry-standard tool that coordinates producers and consumers together, measures end-to-end latency (not just publish latency), and produces structured JSON that makes comparison straightforward. More on why we built a whole harness around it in the <a href="/benchmarking/performance/engineering/2026/06/03/benchmarking-the-proxy-under-the-hood.html">companion engineering post</a>.</p>

<h2 id="test-environment">Test environment</h2>

<p>No, we didn’t run this on a laptop — it’s a realistic deployment: an 11-node OpenShift cluster on Fyre (8 workers, 3 masters), IBM’s internal cloud platform — a controlled environment. Kroxylicious ran as a single proxy pod with a 1000m CPU limit. The cluster is sized so that the Kafka brokers, the proxy, and the benchmark workers each run on separate nodes, ensuring traffic crosses real network links rather than looping back on the same host.</p>

<table>
  <thead>
    <tr>
      <th>Component</th>
      <th>Details</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CPU</td>
      <td>AMD EPYC-Rome, 2 GHz</td>
    </tr>
    <tr>
      <td>Memory</td>
      <td>16 GiB per node</td>
    </tr>
    <tr>
      <td>Cluster</td>
      <td>11-node OpenShift 4.21 (8 workers, 3 masters), RHCOS 9.6</td>
    </tr>
    <tr>
      <td>Kafka</td>
      <td>3-broker Strimzi 0.51.0 (Kafka 3.9) cluster, replication factor 3</td>
    </tr>
    <tr>
      <td>Kroxylicious</td>
      <td>0.21.0, single proxy pod</td>
    </tr>
    <tr>
      <td>KMS</td>
      <td>HashiCorp Vault 2.0.0 (in-cluster)</td>
    </tr>
  </tbody>
</table>

<p>The primary workload used 1 topic, 1 partition, 1 KB messages. We chose single-partition deliberately: it concentrates all traffic on one broker, so you hit ceilings quickly and any proxy overhead is easy to isolate. We also ran 10-topic and 100-topic workloads to make sure the results hold when load is spread more realistically across brokers.</p>

<p>One important caveat: this Kafka cluster is deliberately untuned. We’re not trying to squeeze every message-per-second out of Kafka — we’re using it as a fixed baseline to measure what the proxy adds on top. Kafka experts will find obvious headroom to improve on our baseline numbers; that’s fine and expected. The deltas are what matter here, not the absolutes.</p>

<hr />

<h2 id="the-passthrough-proxy-negligible-overhead">The passthrough proxy: negligible overhead</h2>

<p>Good news first. The proxy itself — with no filter chain, just routing traffic — adds almost nothing. The tables below show all three scenarios side by side.</p>

<p>A quick note on percentiles for anyone not steeped in performance benchmarking: p99 latency is the value that 99% of requests complete within — meaning 1 in 100 requests takes longer. Averages flatter; the p99 is what your slowest clients actually experience, and it’s usually the number that matters.</p>

<p>Two latency metrics appear in the tables. <strong>Publish latency</strong> is measured from the record’s intended send time — as dictated by the target producer rate — to when the producer receives the broker’s acknowledgement. That means it captures any producer-side delay (backpressure, client queuing, batch accumulation) alongside the network round-trip and ISR replication (we run with <code class="language-plaintext highlighter-rouge">acks=all</code>). <strong>End-to-end (E2E) latency</strong> is measured from that same intended send time to when the consumer receives the record, adding consumer-side fetch batching on top of everything publish latency already covers.</p>

<h3 id="10-topics-1-partition-each-1-kb-messages--50000-msgs-50-mbs">10 topics, 1 partition each, 1 KB messages — 50,000 msg/s (50 MB/s)</h3>

<p>At moderate topic counts, traffic is concentrated enough that proxy overhead is more visible.</p>

<table>
  <thead>
    <tr>
      <th>Metric</th>
      <th>Baseline</th>
      <th>Proxy (no filters)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Publish latency avg</td>
      <td>4.3 ms</td>
      <td>4.5 ms (+0.2 ms)</td>
    </tr>
    <tr>
      <td>Publish latency p99</td>
      <td>22.4 ms</td>
      <td>19.6 ms (−2.7 ms)</td>
    </tr>
    <tr>
      <td>E2E latency avg</td>
      <td>96.9 ms</td>
      <td>99.0 ms (+2.1 ms)</td>
    </tr>
    <tr>
      <td>E2E latency p99</td>
      <td>193 ms</td>
      <td>190 ms (−3 ms)</td>
    </tr>
    <tr>
      <td>Throughput</td>
      <td>50,000 msg/s</td>
      <td>50,000 msg/s</td>
    </tr>
  </tbody>
</table>

<p><em>Negative deltas for publish latency are within measurement noise — they indicate the proxy is indistinguishable from baseline, not that it improves latency.</em></p>

<p>The passthrough proxy is not adding measurable per-record overhead at this rate. E2E average overhead is +2.1 ms (p&lt;0.001), but practically negligible for any sizing decision.</p>

<h3 id="100-topics-1-partition-each-1-kb-messages--50000-msgs-50-mbs">100 topics, 1 partition each, 1 KB messages — 50,000 msg/s (50 MB/s)</h3>

<p>At higher topic counts, the same total load is spread across more partitions and brokers. The proxy does identical work per record regardless — there is no cross-partition coordination. The point of this table is simply to confirm the pattern holds when load is distributed more broadly.</p>

<table>
  <thead>
    <tr>
      <th>Metric</th>
      <th>Baseline</th>
      <th>Proxy (no filters)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Publish latency avg</td>
      <td>2.9 ms</td>
      <td>4.1 ms (+1.2 ms)</td>
    </tr>
    <tr>
      <td>Publish latency p99</td>
      <td>6.4 ms</td>
      <td>8.1 ms (+1.7 ms)</td>
    </tr>
    <tr>
      <td>E2E latency avg</td>
      <td>256.7 ms</td>
      <td>254.6 ms (−2.1 ms)</td>
    </tr>
    <tr>
      <td>E2E latency p99</td>
      <td>502 ms</td>
      <td>501 ms (−1 ms)</td>
    </tr>
    <tr>
      <td>Throughput</td>
      <td>50,000 msg/s</td>
      <td>50,000 msg/s</td>
    </tr>
  </tbody>
</table>

<p>Publish latency overhead is statistically significant at 100 topics (proxy-no-filters p99 +27%, p&lt;0.001). But publish latency at 500 msg/s per topic is a small fraction of E2E, and the E2E picture is what operators care about: differences are within measurement noise.</p>

<h3 id="1-topic-1-partition-1-kb-messages--10100-msgs-10-mbs">1 topic, 1 partition, 1 KB messages — 10,100 msg/s (10 MB/s)</h3>

<p>With all traffic on a single topic and partition, Kafka is under the most concentrated load — every record contends for the same broker, the same partition, and the same ISR replication round-trip. The proxy still doesn’t register.</p>

<table>
  <thead>
    <tr>
      <th>Metric</th>
      <th>Baseline</th>
      <th>Proxy (no filters)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Publish latency avg</td>
      <td>7.2 ms</td>
      <td>6.7 ms (−0.5 ms)</td>
    </tr>
    <tr>
      <td>Publish latency p99</td>
      <td>12.6 ms</td>
      <td>11.8 ms (−0.7 ms)</td>
    </tr>
    <tr>
      <td>E2E latency avg</td>
      <td>13.0 ms</td>
      <td>13.5 ms (+0.5 ms)</td>
    </tr>
    <tr>
      <td>E2E latency p99</td>
      <td>21.0 ms</td>
      <td>21.0 ms (0 ms)</td>
    </tr>
    <tr>
      <td>Throughput</td>
      <td>10,100 msg/s</td>
      <td>10,100 msg/s</td>
    </tr>
  </tbody>
</table>

<p><strong>The headline: negligible passthrough overhead — throughput unaffected.</strong></p>

<p>What did I take away from this? We replaced a hunch with data. The remarkable part: the proxy is doing this at Layer 7. Most proxies operate on Kafka at Layer 4 — they shuffle bytes without ever understanding what those bytes mean. Kroxylicious works at Layer 7, parsing every Kafka message, yet still adds only a few milliseconds at the E2E average. That’s the design working.</p>

<p>The overhead staying flat across 1, 10, and 100 topics makes sense for the same reason: the proxy doesn’t contend between topics. Think of the proxy as independent circuits on a distribution board — switching the breaker for lights doesn’t cut power to the fridge. A Kafka broker is more like the mains supply itself — every circuit draws from the same source, so heavy load anywhere reduces what’s available everywhere. In the proxy, topics don’t contend for shared resources: proxy overhead scales linearly across them, and this data validates it.</p>

<hr />

<h2 id="record-encryption-now-were-doing-real-work">Record encryption: now we’re doing real work</h2>

<p>Ok, so let’s make the proxy smarter — make it do something people actually care about! <a href="https://kroxylicious.io/documentation/0.21.0/html/record-encryption-guide">Record encryption</a> uses AES-256-GCM to encrypt each record passing through the proxy. AES-256-GCM is going to ask the CPU to work relatively hard on its own, but it’s also going to push the proxy to parse each record it receives, unpack it, copy it, encrypt it, and re-pack it before sending it on to the broker. With all that work going on we expect some impact to latency and throughput. To answer our original question we need to identify two things: the latency when everything is going smoothly, and the reduction in throughput all this work causes. Monitoring latency once we go past the throughput inflection point isn’t very helpful — it’s dominated by the throughput limits and their erratic impacts on the latency of individual requests (a big hello to batching and buffering effects).</p>

<h3 id="latency-at-sub-saturation-rates">Latency at sub-saturation rates</h3>

<p>So we know encryption is doing a lot of work, but to find out the real impact we need to compare it to a plain Kafka cluster (and yes, people do run Kroxylicious without filters — TLS termination, stable client endpoints, virtual clusters — but that’s a different post). The table below tells us that above a certain inflection point the numbers get really, really noisy — especially in the p99 range.</p>

<p><strong>1 topic, 1 KB messages — baseline vs encryption (selected rates from rate sweep):</strong></p>

<table>
  <thead>
    <tr>
      <th>Rate</th>
      <th>Metric</th>
      <th>Baseline</th>
      <th>Encryption</th>
      <th>Delta</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>14,300 msg/s</td>
      <td>Publish avg</td>
      <td>5.4 ms</td>
      <td>7.6 ms</td>
      <td>+2.2 ms (+41%)</td>
    </tr>
    <tr>
      <td>14,300 msg/s</td>
      <td>Publish p99</td>
      <td>16.3 ms</td>
      <td>19.2 ms</td>
      <td>+2.9 ms (+18%)</td>
    </tr>
    <tr>
      <td>17,100 msg/s</td>
      <td>Publish avg</td>
      <td>6.3 ms</td>
      <td>8.9 ms</td>
      <td>+2.6 ms (+41%)</td>
    </tr>
    <tr>
      <td>17,100 msg/s</td>
      <td>Publish p99</td>
      <td>12.5 ms</td>
      <td>21.9 ms</td>
      <td>+9.4 ms (+75%)</td>
    </tr>
    <tr>
      <td>18,500 msg/s</td>
      <td>Publish avg</td>
      <td>10.5 ms</td>
      <td>13.7 ms</td>
      <td>+3.2 ms (+30%)</td>
    </tr>
    <tr>
      <td>18,500 msg/s</td>
      <td>Publish p99</td>
      <td>22.0 ms</td>
      <td>106.0 ms</td>
      <td>+84.0 ms (+382%)</td>
    </tr>
  </tbody>
</table>

<p>The table shows encryption’s p99 spiking sharply at 18,500 msg/s — but that ~18k figure is roughly where the forwarding proxy itself saturates (close to the bare Kafka baseline of ~19,400). Encryption gives out earlier. The rate sweep finds exactly where.</p>

<h3 id="throughput-ceiling">Throughput ceiling</h3>

<p>A rate-sweep is exactly what it sounds like: pick a starting rate, let OMB run long enough to get a stable measurement, then step up by a fixed increment and repeat until the system can’t keep up. We defined “can’t keep up” as the sustained throughput dropping by more than 5% below the target rate — at that point, something has saturated.</p>

<p>We stepped up from 8k to 22k msg/s in 700 msg/s increments, looking for where throughput drops more than 5% below target. The results:</p>

<ul>
  <li><strong>Baseline</strong>: sustained up to ~19,400 msg/s (the ceiling at RF=3 on our test cluster)</li>
  <li><strong>Encryption</strong>: sustained up to <strong>~14,600 msg/s</strong>, then started intermittently saturating</li>
  <li><strong>Cost: approximately 25% fewer messages per second per partition</strong></li>
</ul>

<p>The transition wasn’t a clean cliff edge — the proxy alternated between sustaining and saturating in a narrow band just above the ceiling. That pattern is characteristic of running right at a limit: it’s not that it suddenly falls over, it’s that small fluctuations (GC pauses, scheduling jitter) are enough to tip it either way. Stay below 14k and you’re fine. Creep above it and you’ll notice. The numbers are not absolute — they are just what we measured on our cluster; your mileage <strong>will vary</strong>.</p>

<h3 id="the-ceiling-scales-with-cpu-budget">The ceiling scales with CPU budget</h3>

<p>The fact the proxy is low latency didn’t surprise me, but this did — and it matters when we think about scaling. We maxed out a single connection, but that didn’t mean we’d maxed out the proxy.</p>

<p>The single-producer ceiling at RF=3 is Kafka-limited, not proxy-limited — the ISR replication round-trip caps single-partition throughput regardless of how much CPU the proxy has. The proxy still had meaningful headroom: we ran four producers and aggregate throughput climbed higher, while proxy CPU sat at 570m/1000m. The proxy wasn’t the constraint.</p>

<p>To find the proxy’s real ceiling, you need a workload that doesn’t hit the Kafka partition limit first: RF=1, spread across multiple topics. With that workload, the ceiling is squarely in the proxy — and it scales linearly with CPU. The mechanism: CPU limit controls <code class="language-plaintext highlighter-rouge">availableProcessors()</code>, which controls how many Netty event loop threads the proxy creates. More threads, more concurrent connections handled in parallel, higher aggregate ceiling.</p>

<p><strong>The practical implication</strong>: the throughput ceiling is not a fixed number — it’s a function of the CPU you allocate. Set <code class="language-plaintext highlighter-rouge">requests</code> equal to <code class="language-plaintext highlighter-rouge">limits</code> in your pod spec; this makes the CPU budget deterministic and the ceiling predictable. The <a href="/benchmarking/performance/engineering/2026/06/03/benchmarking-the-proxy-under-the-hood.html">companion engineering post</a> has the full story of how we found this, including the workload design choices needed to isolate proxy CPU from Kafka’s own limits.</p>

<hr />

<h2 id="sizing-guidance">Sizing guidance</h2>

<p>Numbers without guidance aren’t very useful, so here’s how to translate these results into pod specs.</p>

<p><strong>Passthrough proxy</strong>: size your Kafka cluster as you normally would. The proxy won’t be the bottleneck — but if you want to verify that on your own hardware, the rate sweep — which steps the producer rate up incrementally until the system can’t keep up — is exactly the tool for it. Run the baseline and passthrough scenarios back-to-back and you’ll have your own numbers.</p>

<p><strong>With filters (record encryption is the representative example here):</strong></p>

<ol>
  <li>
    <p><strong>Throughput budget</strong>: record encryption — among the most CPU-intensive filters we can imagine — imposes a CPU-driven throughput ceiling. As a planning formula:</p>

    <blockquote>
      <p><strong><code class="language-plaintext highlighter-rouge">CPU (mc) = k × (P + N × C)</code></strong></p>

      <p>where <em>mc</em> = millicores (the Kubernetes CPU scheduling unit; 1,000 mc = 1 core per second), <em>k</em> = sizing coefficient (mc/MB/s), <em>P</em> = produce throughput (MB/s), <em>N</em> = number of consumer groups, <em>C</em> = consume throughput per group (MB/s)</p>
    </blockquote>

    <p>On our hardware (AMD EPYC-Rome 2 GHz with AES-NI), we measured <em>k</em> = 25 mc/MB/s on a 10-topic workload with record encryption — a conservative estimate: more realistic deployments with 100+ topics show <em>k</em> = 4–8 mc/MB/s, roughly 3× lower. Simpler filters will be cheaper still. <em>k</em> is measured from real workloads, so measure your throughput and validate on your own hardware. The <a href="/benchmarking/performance/engineering/2026/06/03/benchmarking-the-proxy-under-the-hood.html">companion post</a> has the full coefficient grid across topic counts and core allocations.</p>

    <p><em>1:1 (100k msg/s at 1 KB, 1 consumer group)</em>: k=25, P=100, N=1, C=100 → 25 × (100 + 1 × 100) = 5,000m (~5 cores)</p>

    <p><em>Fan-out (same rate, 3 consumer groups)</em>: k=25, P=100, N=3, C=100 → 25 × (100 + 3 × 100) = 10,000m (~10 cores)</p>

    <p>Not running on Kubernetes? Divide the result by 1,000 to get the number of cores to allocate to the proxy process.</p>
  </li>
  <li>
    <p><strong>Latency budget</strong>: well below saturation, expect 2–3 ms additional average publish latency and up to ~15 ms additional p99. The overhead scales with how hard you’re pushing — give yourself headroom and you’ll barely notice it.</p>
  </li>
  <li>
    <p><strong>Scaling</strong>: set <code class="language-plaintext highlighter-rouge">requests</code> equal to <code class="language-plaintext highlighter-rouge">limits</code> in your pod spec — this makes the CPU budget deterministic, which makes the throughput ceiling predictable. To increase throughput, raise the CPU limit. For redundancy, add proxy pods.</p>
  </li>
  <li>
    <p><strong>KMS overhead</strong>: DEK caching means Vault isn’t on the hot path for every record. Our tests triggered only 5–19 DEK generation calls per benchmark run. The KMS is not the thing to worry about.</p>
  </li>
</ol>

<hr />

<h2 id="caveats-and-next-steps">Caveats and next steps</h2>

<p>These are real results from real hardware, but they don’t tell a story for your workload. A few things worth knowing before you put these numbers in a slide deck:</p>

<ul>
  <li><strong>Sub-saturation assumed</strong>: all results assume the system is operating below its throughput ceiling — both the proxy’s and Kafka’s own replication limits. Above either, queueing and batching effects dominate and the numbers in this post no longer apply. The <a href="/benchmarking/performance/engineering/2026/06/03/benchmarking-the-proxy-under-the-hood.html">companion post</a> explains how to identify where those ceilings are.</li>
  <li><strong>Message size</strong>: all results use 1 KB messages. The coefficient is message-size-dependent — encryption overhead as a percentage is likely lower for larger messages.</li>
  <li><strong>Horizontal scaling</strong>: linear scaling has been validated across CPU allocations on a single pod; multi-pod horizontal scaling hasn’t been measured but is expected to follow the same coefficient.</li>
  <li><strong>Memory</strong>: the workloads tested here are CPU-bound before they become memory-bound — we kept container memory settings consistent across all runs (2 Gi request / 4 Gi limit at the pod level) and it was never the constraint. If you’re running larger messages or larger batches, revisit this assumption.</li>
</ul>

<p>For the engineering story — why we built a custom harness on top of OMB, what the CPU flamegraphs actually show, and the bugs we found in our own tooling along the way — that’s in the <a href="/benchmarking/performance/engineering/2026/06/03/benchmarking-the-proxy-under-the-hood.html">companion post</a>.</p>

<p>The full benchmark suite, quickstart guide, and sizing reference are in <code class="language-plaintext highlighter-rouge">kroxylicious-openmessaging-benchmarks/</code> in the <a href="https://github.com/kroxylicious/kroxylicious">main Kroxylicious repository</a>.</p>]]></content><author><name>Sam Barker</name></author><category term="benchmarking" /><category term="performance" /><summary type="html"><![CDATA[Every good benchmarking story starts with a hunch. Mine was that Kroxylicious is cheap to run — I’d stake my career on it, in fact — but it turns out that “trust me, I wrote it” is not a widely accepted unit of measurement. People want proof. Sensibly.]]></summary></entry><entry><title type="html">A proof of concept for Routing</title><link href="https://kroxylicious.io/blog/kroxylicious-proxy/2026/05/21/topic-routing.html" rel="alternate" type="text/html" title="A proof of concept for Routing" /><published>2026-05-21T00:00:00+00:00</published><updated>2026-05-21T00:00:00+00:00</updated><id>https://kroxylicious.io/blog/kroxylicious-proxy/2026/05/21/topic-routing</id><content type="html" xml:base="https://kroxylicious.io/blog/kroxylicious-proxy/2026/05/21/topic-routing.html"><![CDATA[<p><strong>tl;dr</strong>: We’ve built a proof-of-concept (POC) routing capability that allows Kafka clients to produce and consume records to topics in multiple clusters. In other words, clients don’t need to know where their topics live.
This is roughly the Kafka equivalent of what is often called <em>Data Virtualization</em> for databases.</p>

<p>Here’s a demo:</p>

<iframe width="962" height="541" src="https://www.youtube.com/embed/_Ym8ANsftI0" title="Routing Proof of Concept Demo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>

<p>But feel free to run this for yourself by checking out the <a href="https://github.com/tombentley/kproxy/tree/routing/">routing POC branch</a> on GitHub.
In instructions are in <a href="https://github.com/tombentley/kproxy/tree/routing/demo/topic-router#readme"><code class="language-plaintext highlighter-rouge">demo/topic-router/README.md</code></a>.</p>

<h2 id="whats-the-backstory">What’s the backstory?</h2>

<p>Nearly a year ago, I had an idea which I wrote up in what’s become known as <a href="https://github.com/kroxylicious/design/pull/70/changes">The Routing Proposal</a> PR.
(You know something might be important if it gets initial caps).
While a few people commented and it felt like a good concept, it was also a long way from the reality of the proxy codebase at that time. 
And anyway, it’s not as if this is the only good idea that we had, or the only thing we had to work on.
So it got put on The Back Burner, where many an idea sits until its time comes, or it gets forgotten about.</p>

<p>However, for this particular idea it was hard to forget about it for long. Engineers from various companies showed up on our slack channel asking about it. They had use cases similar to some of the use cases described in the proposal. They wanted to know: Was it being worked on? Some were even uttering those words that are music to an open source project’s ears: “How can we help?”</p>

<p>Some of our amazing contributors started the process with some initial refactorings. 
Now, nearly a year later, we’ve found the time (and, I admit the tokens) to throw at building a proof of concept.</p>

<p>Right now the proof of concept branch is an interleaved mishmash of commits in each of these three areas. However, the take-away is that we believe we have an API which is capable of supporting a non-trivial router.</p>

<p>The router we’ve implemented allows clients to talk to multiple clusters.</p>

<h2 id="how-does-it-work">How does it work?</h2>

<p>At its core, the router maintains a map of which topics belong to which cluster. These mappings are validated to be non-overlapping, so there’s never any ambiguity about where a request should go.</p>

<p>When a producer sends a <code class="language-plaintext highlighter-rouge">PRODUCE</code> request, the router groups the topic partitions by their target cluster, fans the request out to each cluster in parallel, then merges the responses back into a single reply. <code class="language-plaintext highlighter-rouge">FETCH</code> requests are handled similarly for consumers. This all happens transparently to the client.</p>

<p>To support incremental <code class="language-plaintext highlighter-rouge">FETCH</code> (where the broker remembers which topic partitions a consumer cares about, saving the consumer from re-sending that list on every poll), the router maintains per-connection session state for both the client-proxy and proxy-broker sides of each connection. This is more complex under the hood, but invisible to the consumer.</p>

<p>Transactions and consumer groups work differently. Both rely on a broker to act as a “coordinator” for multiple participants (brokers or clients) to work together. At the moment the router supports these Kafka features in a more limited way, by only allowing these client interactions when all the topics involved reside in the same target cluster. The target cluster is determined from the client’s authenticated identity - a constraint imposed by how the protocol works. We have a good idea about how this could be solved in a more general way, but for now our focus is on getting the POC into something which could actually run in production.</p>

<h2 id="why-is-this-useful">Why is this useful?</h2>

<p>There are two dimensions to this:</p>

<ul>
  <li>
    <p>Building a topic router is useful in itself for helping address a number of real-life headaches for Kafka users. It means that clients don’t need to know where their topics actually live, and it means Kafka service providers can move topics between clusters without bothering users. The holy grail would be to do this completely transparently. Our POC router has limitations which make it somewhat apparent to users, but it’s a big step forward from where we were.</p>
  </li>
  <li>
    <p>Building a topic router is a great way to validate the Router API itself: That the runtime is providing the right services to the Router implementation, through appropriate abstractions.</p>
  </li>
</ul>

<h2 id="what-happens-next">What happens next?</h2>

<p>This is at a POC stage. This blog post is announcing that we’re in the middle phase of the transition from Vapourware to Software. What’s that called? Condensationware?</p>

<p>The big picture of what we’ve done breaks down like this:</p>

<ul>
  <li>
    <p>The work to add the Router API, and implement the runtime support for it.</p>
  </li>
  <li>
    <p>The work to implement the Topic Router plugin using that API.</p>
  </li>
</ul>

<p>This is where the Kroxylicious community comes in  - turning those three big pieces into something that’s actually usable and supportable.</p>

<p>At this stage none of this is set in stone and we have no idea how long it’s likely to take for us to turn this from a POC into released software that you can actually use. Hopefully it will be less than the year it’s taken to go from idea to POC though, but the truth is no one can say.</p>

<p>Nor can we guarantee that we’ll eventually be able to handle the full gamut of the Kafka protocol. We need to investigate some of the newer functionality (e.g. Two phase commit, Share Groups, and so on). And the whole time the Apache Kafka community are powering onwards adding <em>more</em> functionality.</p>

<h2 id="so-why-all-the-hullabaloo">So why all the hullabaloo?</h2>

<p>We think this is pretty cool, and we wanted to let people know that we’re actively working on this. And being open source, we wanted to remind people that they can <a href="/join-us/">join us</a> and get involved in any of the following ways:</p>

<ul>
  <li>Tell us how you’d use the Router API: We have some ideas for other routers we want to build, but maybe you have an idea that only makes sense in your company. That’s OK — not every router needs to be general-purpose. Kroxylicious is built for exactly that kind of bespoke use case.</li>
  <li>Tell us how you’d use a topic router. What Kafka features does it need to support? What functionality does it need for operators?</li>
  <li>Engage with our process for ironing out all the kinks in the API.</li>
  <li>Help us test this thing! We’re especially interested to hear from people who can test at scale on real workloads.</li>
</ul>]]></content><author><name>Tom Bentley</name></author><category term="blog" /><category term="kroxylicious-proxy" /><category term="kroxylicious-proxy" /><summary type="html"><![CDATA[tl;dr: We’ve built a proof-of-concept (POC) routing capability that allows Kafka clients to produce and consume records to topics in multiple clusters. In other words, clients don’t need to know where their topics live. This is roughly the Kafka equivalent of what is often called Data Virtualization for databases.]]></summary></entry><entry><title type="html">Kroxylicious release 0.21.0</title><link href="https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/05/15/release-0_21_0.html" rel="alternate" type="text/html" title="Kroxylicious release 0.21.0" /><published>2026-05-15T00:00:00+00:00</published><updated>2026-05-15T00:00:00+00:00</updated><id>https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/05/15/release-0_21_0</id><content type="html" xml:base="https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/05/15/release-0_21_0.html"><![CDATA[<p>We’re excited to announce the release of <a href="https://github.com/kroxylicious/kroxylicious/releases/tag/v0.21.0">Kroxylicious 0.21.0</a>! This release brings significant new capabilities for Kubernetes environments, enhanced observability, and improved AWS integration. It’s been a great open source effort, with a lot of features and fixes coming from the community, so thank you all! Check out the full <a href="https://github.com/kroxylicious/kroxylicious/blob/main/CHANGELOG.md#0210">Changelog</a> for everything including deprecations, changes, and removals. We also have a <a href="https://www.youtube.com/watch?v=BuDJfMufm60">video guide</a> to the release.</p>

<p>Here are the highlights:</p>

<h3 id="alpha-kubernetes-admission-webhook-for-sidecar-injection">Alpha: Kubernetes Admission Webhook for Sidecar Injection</h3>

<p>The headline feature is our new Kubernetes admission webhook for automatic sidecar injection. This alpha release enables transparent Kafka protocol proxying without any application code changes. Define your sidecar configuration with the <code class="language-plaintext highlighter-rouge">KroxyliciousSidecarConfig</code> CRD, and the webhook automatically injects the proxy sidecar into matching pods when they are created (note that once created the proxy will not be updated, and must be recreated to reflect changes in the <code class="language-plaintext highlighter-rouge">KroxyliciousSidecarConfig</code>). Perfect for adding encryption, validation, or multi-tenancy capabilities to existing Kafka applications.</p>

<p>See the <a href="https://kroxylicious.io/documentation/0.21.0/html/admission-webhook-guide/">admission webhook guide</a> in the documentation for installation and usage.</p>

<h3 id="graceful-connection-draining">Graceful Connection Draining</h3>

<p>Virtual clusters now support graceful connection draining during shutdown. <a href="https://github.com/kroxylicious/kroxylicious/issues/3968">Configure</a> <code class="language-plaintext highlighter-rouge">drainTimeout</code> on your virtual cluster, and the proxy will stop accepting new connections while waiting for in-flight requests to complete before shutting down. New metrics track whether disconnections completed gracefully or hit the timeout. Essential for zero-downtime deployments and rolling updates in Kubernetes. Sidebar: while we are talking about restarts and deployments, there is also a <a href="https://kroxylicious.io/documentation/0.21.0/html/connection-expiration-guide/">Connection Expiration Filter</a> which will help rebalance your connections over time.</p>

<h3 id="haproxy-proxy-protocol-support">HAProxy PROXY Protocol Support</h3>

<p><a href="https://github.com/hrishabhg">Hrishabh Gupta</a> added HAProxy PROXY protocol support. Configure <code class="language-plaintext highlighter-rouge">proxy.proxyProtocol.mode</code> to <code class="language-plaintext highlighter-rouge">enabled</code>, and the proxy expects the PROXY protocol header before the TLS handshake (or first Kafka RPC if kroxylicious is not terminating TLS). This enables deployment behind HAProxy or other load balancers that use PROXY protocol, and in future could enable new topologies. For example, you could terminate TLS at the load-balancer and pass the SNI hostname information to kroxylicious via the PROXY Protocol. The load balancer would handle TLS computation and certificate rotation, while the Proxy could then offer a single port for all traffic and not terminate TLS.</p>

<h3 id="strimzi-integration-enhancements">Strimzi Integration Enhancements</h3>

<p><a href="https://github.com/ShubhamRwt">Shubham Rawat</a> enhanced the Kubernetes operator with automatic TLS trust discovery for Strimzi-managed Kafka clusters. Set <code class="language-plaintext highlighter-rouge">trustStrimziCaCertificate</code> in your KafkaService, and the operator automatically configures the proxy to trust the Strimzi-signed cluster certificates. One less manual step when integrating with Strimzi. (Note that the Strimzi CA secret must be in the same namespace as the KafkaService)</p>

<p>This release also upgrades Strimzi support to version 1.0.0. If you’re using the Strimzi integration feature (<code class="language-plaintext highlighter-rouge">spec.strimziKafkaRef</code> in KafkaService CR), Strimzi 0.49.0 or later is now required.</p>

<h3 id="aws-kms-improvements">AWS KMS Improvements</h3>

<p><a href="https://github.com/oleksiyp">Oleksiy Pylypenko</a> has extended the Record Encryption AWS KMS, added native support for IRSA (IAM Roles for Service Accounts) and EKS Pod Identity credential providers. The credential configuration has been restructured under a unified <code class="language-plaintext highlighter-rouge">credentials</code> node, with new <code class="language-plaintext highlighter-rouge">credentials.webIdentity</code> and <code class="language-plaintext highlighter-rouge">credentials.podIdentity</code> options for EKS workloads. Existing configurations using top-level <code class="language-plaintext highlighter-rouge">longTermCredentials</code> or <code class="language-plaintext highlighter-rouge">ec2MetadataCredentials</code> continue to work unchanged. See the <a href="https://kroxylicious.io/documentation/0.21.0/html/record-encryption-guide/#proc-aws-kms-setup-application-identity-pod-identity-record-encryption">Proxy Guide</a> for details.</p>

<h3 id="dynamic-tls-credential-selection">Dynamic TLS Credential Selection</h3>

<p><a href="https://github.com/kidpollo">Paco Viramontes</a> implemented a <a href="https://github.com/kroxylicious/design/blob/main/proposals/011-plugin-api-to-select-tls-credentials-for-server-connection.md">new plugin API</a> enabling dynamic TLS credential selection for upstream connections. Implement <code class="language-plaintext highlighter-rouge">ServerTlsCredentialSupplier</code> to select different client certificates for the connection from kroxylicious to a target cluster, based on the TLS certificates sent from the client to kroxylicious. This dynamic selection allows Implementors to build their own complex mutual TLS client certificate selection logic.</p>

<h3 id="schema-validation-enhancements">Schema Validation Enhancements</h3>

<p><a href="https://github.com/carlesarnal">Carles Arnal</a> updated the record validation filter to support Avro and Protobuf schema validation alongside the existing JSON schema support. Validate your records against schemas in Apicurio Registry regardless of serialization format. See the docs for <code class="language-plaintext highlighter-rouge">schemaType</code> <a href="https://kroxylicious.io/documentation/0.21.0/html/record-validation-guide#proc-configuring-record-validation-filter-record-validation">here</a>.</p>

<h3 id="container-image-rename">Container Image Rename</h3>

<p>The primary proxy container image has been renamed from <code class="language-plaintext highlighter-rouge">quay.io/kroxylicious/kroxylicious</code> to <code class="language-plaintext highlighter-rouge">quay.io/kroxylicious/proxy</code>. The operator automatically uses the new image name. If you’re deploying the proxy image directly (without the operator), update your deployment configurations. We will continue publishing new public images to <code class="language-plaintext highlighter-rouge">quay.io/kroxylicious/kroxylicious</code>, but it is deprecated and will be removed in a future release.</p>

<h3 id="community-contributions">Community Contributions</h3>

<p>This release saw exceptional contributions from the community, with commits landed from:</p>

<p>Carles Arnal, Dahyun Woo, Dan Vulpe, Francisco Vila, Hrishabh Gupta, Keith Wall, Ken Huang, Liberty-Swine, m1a2st, Mario Salinas, Matt Van Horn, Mirtunjay Singh, msalinas-se, Oleksiy Pylypenko, Paco Viramontes, PaulRMellor, Piotr Płaczek, Robert Young, Sam Barker, Shubham Rawat, Tanner Smith, Tom Bentley, Trevin Chow, Urjit Patel, ZhangDT</p>

<p>Thank you to everyone who contributed!</p>

<h3 id="artefacts">Artefacts</h3>

<p>Binary distributions and container images are available on the <a href="https://kroxylicious.io/download/0.21.0/">download</a> page.</p>

<h3 id="feedback">Feedback</h3>

<p>We’d love to hear from you! Whether you’re kicking the tyres, running Kroxylicious in production, or just find the project interesting — drop by and say hello.
You can reach us through <a href="https://kroxylicious.slack.com">Slack</a>, <a href="https://github.com/kroxylicious/kroxylicious/issues">GitHub</a> or even <a href="https://bsky.app/profile/kroxylicious.io">bsky</a>, or tell us in person on one of our upcoming <a href="/join-us/community-call/">community calls</a>.</p>]]></content><author><name>Rob Young</name></author><category term="blog" /><category term="kroxylicious-proxy" /><category term="releases" /><category term="releases" /><category term="kroxylicious-proxy" /><summary type="html"><![CDATA[We’re excited to announce the release of Kroxylicious 0.21.0! This release brings significant new capabilities for Kubernetes environments, enhanced observability, and improved AWS integration. It’s been a great open source effort, with a lot of features and fixes coming from the community, so thank you all! Check out the full Changelog for everything including deprecations, changes, and removals. We also have a video guide to the release.]]></summary></entry><entry><title type="html">Kroxylicious release 0.20.0</title><link href="https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/04/01/release-0_20_0.html" rel="alternate" type="text/html" title="Kroxylicious release 0.20.0" /><published>2026-04-01T00:00:00+00:00</published><updated>2026-04-01T00:00:00+00:00</updated><id>https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/04/01/release-0_20_0</id><content type="html" xml:base="https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/04/01/release-0_20_0.html"><![CDATA[<p>We’re excited to announce the release of <a href="https://github.com/kroxylicious/kroxylicious/releases/tag/v0.20.0">Kroxylicious 0.20.0</a>! There’s been a lot of action, check out the full <a href="https://github.com/kroxylicious/kroxylicious/blob/main/CHANGELOG.md#0200">Changelog</a> for everything including deprecations, changes, and removals. We also have a <a href="https://www.youtube.com/watch?v=yRmRCf0-sZw">video guide</a> to the release.</p>

<p>Here are the highlights:</p>

<h3 id="connection-expiration-filter">Connection Expiration Filter</h3>

<p>Thanks to the work of <a href="https://github.com/May-Abo">May-Abo</a>, a new filter joins the family! The Connection Expiration filter closes client connections after a configurable maximum age. This is perfect for dynamic environments like Kubernetes where you want to rebalance connections across proxy instances as pods scale up or down.</p>

<h3 id="entity-isolation-filter">Entity Isolation Filter</h3>

<p>Multi-tenancy gets even better with the Entity Isolation filter. Initially supporting <code class="language-plaintext highlighter-rouge">groupId</code> and <code class="language-plaintext highlighter-rouge">transactionalId</code> entity types, this filter helps you enforce isolation boundaries between tenants sharing a cluster.</p>

<h3 id="record-validation-filter---apicurio-v3-upgrade">Record Validation Filter - Apicurio v3 Upgrade</h3>

<ul>
  <li>Record validation just got a major upgrade with Apicurio v3. The default schema identification has changed from <code class="language-plaintext highlighter-rouge">globalId</code> to <code class="language-plaintext highlighter-rouge">contentId</code> for better interoperability with Confluent-based Kafka clients. To support migrations, you can still use the old behavior by setting <code class="language-plaintext highlighter-rouge">wireFormatVersion</code> to <code class="language-plaintext highlighter-rouge">V2</code>, though this mode is deprecated and will be removed in a future release.</li>
  <li>The schema validation filter can now connect to a schema registry protected by internally signed TLS certificates. One less obstacle for air-gapped or enterprise environments.</li>
</ul>

<h3 id="kubernetes-operator-enhancements">Kubernetes Operator Enhancements</h3>

<p>Two improvements for Kubernetes users:</p>
<ul>
  <li><strong>OpenShift Route Support</strong>: Enable external access to Virtual Clusters via OpenShift Routes using <code class="language-plaintext highlighter-rouge">KafkaProxyIngress.spec.openShiftRoute</code>. Off-cluster client access is now a breeze on OpenShift.</li>
  <li><strong>Server-Side Apply</strong>: The operator now uses Server-Side Apply for all dependent resources. Existing deployments are unaffected, and externally-applied patches (like annotations from observability tooling) will now survive operator reconciles.</li>
</ul>

<h3 id="javadocs-on-the-website">Javadocs on the Website</h3>

<p>Public API Javadocs are now published alongside version-specific documentation on <a href="https://kroxylicious.io/documentation/0.20.0/javadoc/index.html">kroxylicious.io</a>, making it easier to explore our APIs without leaving your browser.</p>

<h3 id="configuration-improvements">Configuration Improvements</h3>

<ul>
  <li><strong>Configurable Netty shutdown</strong>: New <code class="language-plaintext highlighter-rouge">shutdownQuietPeriod</code> and <code class="language-plaintext highlighter-rouge">shutdownTimeout</code> fields give you fine-grained control over Netty shutdown behavior with Go-style durations.</li>
  <li><strong>Duration serialization</strong>: Filter Config classes can now use <code class="language-plaintext highlighter-rouge">Duration</code> types that automatically serialize to/from Go-style strings (e.g., “1h”) without any annotations.</li>
</ul>

<h3 id="artefacts">Artefacts</h3>

<p>Binary distributions and container images are available on the <a href="https://kroxylicious.io/download/0.20.0/">download</a> page.</p>

<h3 id="feedback">Feedback</h3>

<p>We’d love to hear from you! Whether you’re kicking the tyres, running Kroxylicious in production, or just find the project interesting — drop by and say hello.
You can reach us through <a href="https://kroxylicious.slack.com">Slack</a>, <a href="https://github.com/kroxylicious/kroxylicious/issues">GitHub</a> or even <a href="https://bsky.app/profile/kroxylicious.io">bsky</a>), or tell us in person on one of our upcoming <a href="/join-us/community-call/">community calls</a>.</p>]]></content><author><name>Rob Young</name></author><category term="blog" /><category term="kroxylicious-proxy" /><category term="releases" /><category term="releases" /><category term="kroxylicious-proxy" /><summary type="html"><![CDATA[We’re excited to announce the release of Kroxylicious 0.20.0! There’s been a lot of action, check out the full Changelog for everything including deprecations, changes, and removals. We also have a video guide to the release.]]></summary></entry><entry><title type="html">New Video: Understand Kroxylicious in under 3 minutes</title><link href="https://kroxylicious.io/videos/learning/2026/03/09/new-videos-understand-proxy.html" rel="alternate" type="text/html" title="New Video: Understand Kroxylicious in under 3 minutes" /><published>2026-03-09T00:00:00+00:00</published><updated>2026-03-09T00:00:00+00:00</updated><id>https://kroxylicious.io/videos/learning/2026/03/09/new-videos-understand-proxy</id><content type="html" xml:base="https://kroxylicious.io/videos/learning/2026/03/09/new-videos-understand-proxy.html"><![CDATA[<p>Want to see how Kroxylicious simplifies Apache Kafka® governance? We’ve put together a 3-minute visual breakdown of where the proxy sits in your stack and the problems it solves.</p>

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/xLOjKScpJ3Q?si=awi7JDIPsn4sGdqM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>

<p>Key Takeaways:</p>

<ul>
  <li>Zero Client Changes: Kroxylicious is wire-protocol compatible. Your applications keep using their existing Kafka clients without knowing a proxy is in the middle.</li>
  <li>Centralized Control: Instead of chasing down policy updates across different languages and teams, you enforce them at the proxy layer.</li>
  <li>Plug-and-Play Filters: Use the built-in Filter mechanism to intercept and transform traffic. For example, our Record Encryption Filter can automatically handle PII encryption before data ever touches the broker.</li>
</ul>

<p>Ready to see it in action? Head over to <a href="https://kroxylicious.io">kroxylicious.io</a> or jump straight into our <a href="https://kroxylicious.io/quickstarts">quickstarts</a>. We’ve also conveniently recorded a video demonstration of the Proxy Quickstart.</p>

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/7FIU5gHnykg?si=-LxLoyJZeFj_Pzk0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>]]></content><author><name>Rob Young</name></author><category term="videos" /><category term="learning" /><summary type="html"><![CDATA[Want to see how Kroxylicious simplifies Apache Kafka® governance? We’ve put together a 3-minute visual breakdown of where the proxy sits in your stack and the problems it solves.]]></summary></entry></feed>