<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tom Stepp on Medium]]></title>
        <description><![CDATA[Stories by Tom Stepp on Medium]]></description>
        <link>https://medium.com/@tom-stepp?source=rss-65ffa19a1ae5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*mp5prkUbRGoLhkEj</url>
            <title>Stories by Tom Stepp on Medium</title>
            <link>https://medium.com/@tom-stepp?source=rss-65ffa19a1ae5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 07:48:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tom-stepp/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introducing Kafka Offset Deduplication for Dataflow]]></title>
            <link>https://medium.com/google-cloud/dataflow-kafka-offset-deduplication-06770942c325?source=rss-65ffa19a1ae5------2</link>
            <guid isPermaLink="false">https://medium.com/p/06770942c325</guid>
            <category><![CDATA[apache-beam]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[google-cloud-dataflow]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Tom Stepp]]></dc:creator>
            <pubDate>Mon, 27 Oct 2025 21:46:40 GMT</pubDate>
            <atom:updated>2025-11-10T17:49:55.628Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>Overview</h3><p>Achieving <strong>Exactly-Once (EO) semantics</strong> in a streaming pipeline is often a trade-off. You need the guarantee that every message is processed once and only once, but this guarantee traditionally comes at the cost of performance and cost due to atomic checkpointing.</p><p>What if you could have both?</p><p>We’re excited to introduce <strong>Offset Deduplication</strong> for Kafka in Dataflow. This new feature is designed to deliver full Exactly-Once semantics for offset-based sources like Apache Beam’s KafkaIO, all while using the high-performance <strong>checkpointless shuffle</strong> mode. Checkpointless shuffle is an optimization to reduce checkpointing of stage output messages originally used for At-Least-Once (ALO) processing; see this <a href="https://cloud.google.com/blog/products/data-analytics/dataflow-at-least-once-vs-exactly-once-streaming-modes?e=48754805">blog post</a> for more details.</p><p>The results? A massive reduction in both cost and latency.</p><h3>How It Works</h3><p>This feature works by fundamentally modifying the interaction between the Kafka source and the Dataflow Streaming backend. The best part is that these changes are implemented in the backend and <strong>do not require any complex changes</strong> from you.</p><p>Here’s a simplified breakdown:</p><ol><li><strong>Source Augmentation:</strong> The Kafka source is updated to provide monotonically increasing offset IDs to all records. Every record within a source split is ordered and assigned a unique offset.</li><li><strong>Smart Deduplication:</strong> Instead of relying on slow, atomic checkpointing of all output messages, the system shifts its strategy. The receiving stage now performs efficient deduplication of any message replays from the source.</li><li><strong>Resilient Recovery:</strong> In the event of a worker crash or a system reassignment, the system recovers the last completed source state and its offset metadata. This allows the downstream stage to know exactly which messages to deduplicate.</li></ol><figure><img alt="System diagram" src="https://cdn-images-1.medium.com/max/501/1*AOKtoF-4BVir1duuRAovqA.png" /><figcaption>Dataflow system diagram.</figcaption></figure><h3>The Benefits: Performance Gains and Cost Savings</h3><p>By moving away from atomic checkpointing, this feature unlocks significant improvements in two key areas:</p><h4>1. Consistent Performance &amp; Lower Latency</h4><p>Enabling EO semantics in the high-performance checkpointless shuffle mode provides far more consistent performance, resulting in <strong>up to 5x better tail latency</strong>.</p><p>The charts below show the difference. The baseline (blue line) represents a traditional pipeline, while the new feature (green line) shows significantly reduced and more stable watermark lag.</p><figure><img alt="Watermark lag graph" src="https://cdn-images-1.medium.com/max/1024/1*Frh2Oic4Cc1hnzut-Bk4Pw.png" /><figcaption>Updated pipeline shows improved processing latency via watermark lag.</figcaption></figure><h4>2. Drastic Cost Reduction</h4><p>Eliminating the need for costly, atomic source output checkpointing directly translates to major cost savings.</p><p>We’ve observed an <strong>overall processing cost reduction of ~55%</strong>.</p><figure><img alt="Cost comparison graph" src="https://cdn-images-1.medium.com/max/1024/1*YvrpBtZDpSlf1Z1g-v2www.png" /><figcaption>Updated pipeline costs less than half of the original.</figcaption></figure><p>A huge part of this saving comes from a <strong>~97% reduction in storage bytes written</strong>, as the system no longer needs to checkpoint every message.</p><figure><img alt="Persistent storage graph" src="https://cdn-images-1.medium.com/max/1024/1*VtEv_5UMBsFr9EBZuBCMjg.png" /><figcaption>Updated pipeline using less than 3% of the original persistent storage.</figcaption></figure><h3>Get Started</h3><p>You can start using this feature today with:</p><ul><li><strong>Apache Beam Version:</strong> 2.69.0 or newer.</li><li><strong>Pipeline Modification:</strong> Simply add one line to your KafkaIO Read: KafkaIO.Read.withOffsetDeduplication() .</li></ul><p><strong>Note:</strong> This may become the default behavior in a future version of Apache Beam.</p><h3>Monitoring and Observability</h3><p>Dataflow’s <strong>Bottleneck Detector</strong> can help you identify when Kafka source persistence is slow. If you see this, the documentation can guide you on how to use this new feature to resolve the bottleneck.</p><figure><img alt="Bottleneck detection support image" src="https://cdn-images-1.medium.com/max/1024/1*NHAwF-e0-4Aro-5naTcwyg.png" /><figcaption>Bottleneck Detector identifying Kafka source bottleneck.</figcaption></figure><p>Additionally, an insight for the Dataflow <strong>Recommendation Service</strong> is in development to help surface these opportunities automatically. Productionization is pending, with an ETA of Q1 2026.</p><h3>What’s Next</h3><p>This feature is a major step forward for streaming workloads on Dataflow. Future work is to add support for Runner V2 and Splittable DoFns (SDF).</p><p>Ready to get started? Update your pipeline today and see the performance and cost benefits for yourself.</p><h3>Learn More</h3><ul><li><strong>Apache Beam JavaDoc:</strong> <a href="https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/io/kafka/KafkaIO.Read.html">beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/io/kafka/KafkaIO.Read.html</a></li><li><strong>Dataflow Kafka Read Guide:</strong> <a href="https://www.google.com/search?q=https://cloud.google.com/dataflow/docs/guides/read-from-kafka.md%23redistribute">cloud.google.com/dataflow/docs/guides/read-from-kafka.md#redistribute</a></li><li><strong>Troubleshooting Bottlenecks:</strong> <a href="https://www.google.com/search?q=https://cloud.google.com/dataflow/docs/guides/troubleshoot-bottlenecks.md">cloud.google.com/dataflow/docs/guides/troubleshoot-bottlenecks.md</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06770942c325" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/dataflow-kafka-offset-deduplication-06770942c325">Introducing Kafka Offset Deduplication for Dataflow</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>