<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: WarpStream</title>
    <description>The latest articles on DEV Community by WarpStream (@warpstream).</description>
    <link>https://dev.to/warpstream</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1592365%2Ff4f5c5d8-b4a0-493c-9aee-fc505b53ef66.jpg</url>
      <title>DEV Community: WarpStream</title>
      <link>https://dev.to/warpstream</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/warpstream"/>
    <language>en</language>
    <item>
      <title>WarpStream Newsletter #5: Dealing with Rejection, Schema Validation, and Time Lag</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Fri, 16 Aug 2024 14:12:10 +0000</pubDate>
      <link>https://dev.to/warpstream/warpstream-newsletter-5-dealing-with-rejection-schema-validation-and-time-lag-3b15</link>
      <guid>https://dev.to/warpstream/warpstream-newsletter-5-dealing-with-rejection-schema-validation-and-time-lag-3b15</guid>
      <description>&lt;p&gt;Welcome to the fifth issue of the WarpStream newsletter where we share our latest blogs on:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Backpressure in distributed systems.&lt;/li&gt;
&lt;li&gt;WarpStream schema validation.&lt;/li&gt;
&lt;li&gt;Measuring consumer group lag in time instead of offsets.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As well as our most recent product updates. Connect with us on social media and other platforms to stay up to date via the links in the social footer at the bottom of this email.&lt;/p&gt;

&lt;h3&gt;
  
  
  New Blog Posts
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_y0e187kq23" rel="noopener noreferrer"&gt;Dealing with rejection (in distributed systems)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;At its core, backpressure is a really simple concept. When the system is nearing overload, it should start “saying no” by slowing down or rejecting requests. Of course, the big question is: How do we know when we should reject a request? &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_7kvd5oxq2j" rel="noopener noreferrer"&gt;The latest version&lt;/a&gt; of the WarpStream BYOC Agent includes backpressure support for Product and Fetch requests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Froe0444bby9lr1ff14ty.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Froe0444bby9lr1ff14ty.png" width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_2nyq2mod67" rel="noopener noreferrer"&gt;Announcing WarpStream schema validation&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;We are excited to announce that users can now connect WarpStream Agents to any Kafka-compatible Schema Registry and validate that records conform to the provided schema. WarpStream validates not only that the schema ID encoded in a given record matches the schema ID in the Schema Registry, but also that the record actually conforms with the provided schema (field level validation).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwaj3irltv1v37ikoegyu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwaj3irltv1v37ikoegyu.png" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_be5qmxldo0" rel="noopener noreferrer"&gt;The Kafka metric you’re not using: stop counting messages, start measuring time&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Monitoring consumer groups can be a challenge. We explain why the usual way of measuring consumer group lag (using offsets) isn’t always the best and show you an alternative approach (time lag) that makes it much easier to monitor and troubleshoot them. The best part? Time lag measurement is built directly into WarpStream — no third-party tooling is needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4eqgbzbfkurj0xjx0k5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4eqgbzbfkurj0xjx0k5s.png" width="800" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Recent Product Updates
&lt;/h3&gt;

&lt;p&gt;In addition to our blog about schema validation, which we shared above, you can also check out our related doc pages on &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_kv0dnnrdr3" rel="noopener noreferrer"&gt;Agent schema validation&lt;/a&gt; and &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_xv71l9j1ob" rel="noopener noreferrer"&gt;connecting to an external schema registry&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can upgrade to the latest version of the WarpStream BYOC Agents to benefit from our new-and-improved backpressuring system. Check out &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_mw3do5y15x" rel="noopener noreferrer"&gt;our official changelog&lt;/a&gt; to see the full list of Agent updates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://console.warpstream.com/signup" rel="noopener noreferrer"&gt;&lt;strong&gt;Try WarpStream With $400 in Free Credits&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WarpStream is free to try. After you create your account, it will be loaded with $400 in free credits so you can test how easy it is to set up and use WarpStream.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://console.warpstream.com/signup" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Started For Free&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Connect With Us
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_4n01b2n1rb" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_mw3do5515x" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt; &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_5m0q9p213x" rel="noopener noreferrer"&gt;Facebook&lt;/a&gt; &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_3pb1x051wm" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_4n01b291rb" rel="noopener noreferrer"&gt;Slack&lt;/a&gt; &lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/bz8vjar37n8xx8yupwxzlnz18/v2_rxkdk6bq0p" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>datastreaming</category>
      <category>apachekafka</category>
      <category>livestreamingdata</category>
    </item>
    <item>
      <title>Dealing with rejection (in distributed systems)</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Wed, 14 Aug 2024 17:45:51 +0000</pubDate>
      <link>https://dev.to/warpstream/dealing-with-rejection-in-distributed-systems-3ilh</link>
      <guid>https://dev.to/warpstream/dealing-with-rejection-in-distributed-systems-3ilh</guid>
      <description>&lt;p&gt;by Richard Artoul&lt;/p&gt;

&lt;h3&gt;
  
  
  Distributed systems: theory vs. practice
&lt;/h3&gt;

&lt;p&gt;There are two ways to learn about distributed systems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reading academic and industry papers.&lt;/li&gt;
&lt;li&gt;Operating them in production.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The best distributed systems practitioners have done both extensively because they teach you different things.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv1vtgzqmtdwc3b3rg43q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv1vtgzqmtdwc3b3rg43q.png" width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Traditionally, when people want to learn about distributed systems, they start (as they should) with the literature where they’ll learn about:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Algorithms.&lt;/li&gt;
&lt;li&gt;Data structures.&lt;/li&gt;
&lt;li&gt;Replication strategies.&lt;/li&gt;
&lt;li&gt;Consensus.&lt;/li&gt;
&lt;li&gt;Trade-offs between consistency and availability in the face of partition failures.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This helps people build a great foundation, but there are some topics that simply aren’t well covered by the literature. These topics include things like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Instrumenting the system to make it &lt;em&gt;observable&lt;/em&gt; and &lt;em&gt;debuggable&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Maintaining quality of service in the face of multi-tenancy.&lt;/li&gt;
&lt;li&gt;Backpressure.&lt;/li&gt;
&lt;li&gt;Designing the system to be operable by humans.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I’ve spent the last 10 years of my life operating building and operating distributed systems in production. I’ve been on-call for (almost) every major open-source database on the market:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://cassandra.apache.org/_/index.html" rel="noopener noreferrer"&gt;Cassandra&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.elastic.co/elasticsearch" rel="noopener noreferrer"&gt;Elasticsearch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://etcd.io/" rel="noopener noreferrer"&gt;Etcd&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://zookeeper.apache.org/" rel="noopener noreferrer"&gt;ZooKeeper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.mysql.com/" rel="noopener noreferrer"&gt;MySQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.postgresql.org/" rel="noopener noreferrer"&gt;Postgres&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://redis.io/" rel="noopener noreferrer"&gt;Redis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.mongodb.com/" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.foundationdb.org/" rel="noopener noreferrer"&gt;FoundationDB&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition, I’ve built from scratch (along with my colleagues) and operated several distributed databases in production: &lt;a href="https://github.com/m3db/m3" rel="noopener noreferrer"&gt;M3DB&lt;/a&gt;, &lt;a href="https://www.datadoghq.com/blog/engineering/introducing-husky/" rel="noopener noreferrer"&gt;Husky&lt;/a&gt;, and most recently, &lt;a href="https://www.warpstream.com/" rel="noopener noreferrer"&gt;WarpStream&lt;/a&gt;. During this time, I learned a lot of practical knowledge about what it takes to convert a design &lt;em&gt;that works on paper&lt;/em&gt; into an implementation &lt;em&gt;that works in production&lt;/em&gt; at massive scale.&lt;/p&gt;

&lt;p&gt;For example, Husky’s design was heavily inspired by industry-leading systems like &lt;a href="https://www.snowflake.com/en/" rel="noopener noreferrer"&gt;Snowflake&lt;/a&gt;, &lt;a href="https://research.google/pubs/procella-unifying-serving-and-analytical-data-at-youtube/" rel="noopener noreferrer"&gt;Procella&lt;/a&gt;, and the wealth of available academic knowledge about leveraging columnar storage and vectorized query processing to analyze huge volumes of data in a short period of time.&lt;/p&gt;

&lt;p&gt;But there is &lt;em&gt;so much more&lt;/em&gt; that went into making Husky a scalable, cost-efficient, and reliable system than just what can be found in the academic literature. For example, while there are hundreds of excellent academic and industry papers about how to make a highly efficient vectorized query engine, there are &lt;em&gt;shockingly few&lt;/em&gt; papers (rooted in actual experience with sufficient detail to replicate) about how to make that query engine multi-tenant, scale to thousands of concurrent queries, with more than 10 orders of magnitude difference in the cost of individual queries, while still maintaining good quality of service &lt;em&gt;and&lt;/em&gt; letting your engineers sleep through the night.&lt;/p&gt;

&lt;p&gt;That is an incredibly difficult problem to solve, and many teams &lt;em&gt;have&lt;/em&gt; solved it (including us when we were at Datadog), but almost no one has &lt;em&gt;documented&lt;/em&gt; how they solved it.&lt;/p&gt;

&lt;p&gt;Unfortunately for readers stuck deep in the mud of building vectorized query engines, I will not be discussing how we solved that problem at Datadog in this post. Instead, I want to focus on a related problem that we confronted when building WarpStream: backpressure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Backpressure
&lt;/h3&gt;

&lt;p&gt;Backpressure is one of the most important practical details that every good distributed system has to get right if it’s going to stand a chance at survival in production. Without a good backpressuring system, a small increase in load or an errant client can easily knock over the entire system and leave it stuck in a death spiral from which it will never recover without manual intervention — usually by shutting off all the clients.&lt;/p&gt;

&lt;p&gt;At its core, backpressure is a really simple concept. When the system is nearing overload, it should start “saying no” by slowing down or rejecting requests. This applies pressure back toward the client (hence the term) and prevents the system from tipping over into catastrophic failure. This works because, in most real systems, the cost of rejecting a request is several orders of magnitude cheaper than actually processing it.&lt;/p&gt;

&lt;p&gt;Backpressure should happen &lt;em&gt;as early as possible&lt;/em&gt; in the request-processing lifecycle. The less work the system has to do before rejecting a request, the more resilient it will be.&lt;/p&gt;

&lt;p&gt;Of course, the big question is: How do we know when we should reject a request? We could trivially create a system that is incredibly difficult to knock over by only allowing it to process one request concurrently and rejecting all other requests, but that system wouldn’t be of much use to anyone. However, if we start backpressuring &lt;em&gt;too late&lt;/em&gt;, well, then our window may have already passed to prevent the system from self-destructing.&lt;/p&gt;

&lt;p&gt;Unfortunately, this is one of those scenarios where we need to strive for a difficult-to-quantify Goldilocks zone where the backpressuring system kicks in at &lt;em&gt;just the right time&lt;/em&gt;. That’s the art of dealing with rejection (in distributed systems). Let’s clarify by defining what failure and success might look like.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Failure&lt;/strong&gt; of the backpressuring system is easy to define: it looks like catastrophic failure. For example, if an increase in load or traffic can cause the system to run out of memory, that’s a pretty bad failure of the backpressuring system. In this case, backpressure is happening too late.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fav8gby1acisnvq1piebv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fav8gby1acisnvq1piebv.png" width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly, if the number of requests processed by the system drops significantly below the peak throughput the system is capable of &lt;em&gt;when it isn’t overloaded&lt;/em&gt;, that can also be a form of catastrophic failure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7c6hegcfuir3q92kmb2s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7c6hegcfuir3q92kmb2s.png" width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ideal behavior regarding latency is more use-case dependent. For some latency-critical workloads, an ideal system will maintain consistently low latency for requests it chooses to accept and immediately reject all requests that it can’t serve within a tight latency budget. These use cases are more of an exception than the norm, though, and in most scenarios, operators prefer higher latency (within reason) over requests being rejected.&lt;/p&gt;

&lt;p&gt;As a concrete example, Amazon would almost certainly prefer an incident where the latency to add an item to a user’s cart increases from 100ms to 2 seconds over one where 95% of add-to-cart operations are rejected immediately, but those that are accepted complete in under 100ms.&lt;/p&gt;

&lt;p&gt;Something like this might be considered acceptable, for example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fotxe2vb2i789bg614k6i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fotxe2vb2i789bg614k6i.png" width="663" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of course, all of these examples are “within reason”. If you recruit a thousand servers to do nothing but DDOS a single server, no amount of intelligent programming will save you if the victim server’s network is completely saturated.&lt;/p&gt;

&lt;p&gt;OK, enough abstract discussion; let’s dive into a concrete use case now.&lt;/p&gt;

&lt;h3&gt;
  
  
  Backpressure in the WarpStream Agents
&lt;/h3&gt;

&lt;p&gt;WarpStream is a &lt;a href="https://www.warpstream.com/blog/kafka-is-dead-long-live-kafka" rel="noopener noreferrer"&gt;drop-in replacement for Apache Kafka®&lt;/a&gt; that is built directly on-top of object storage and deployed as a single, stateless binary. Nodes in a WarpStream cluster are called “Agents”, and while the Agents perform many different tasks, primarily they’re responsible for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Writes (Kafka Produce requests)&lt;/li&gt;
&lt;li&gt;Reads (Kafka Fetch requests)&lt;/li&gt;
&lt;li&gt;Background jobs (compactions)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each of these functions needs a reasonable backpressure mechanism, and if a WarpStream Agent is handling multiple roles, those backpressure systems may need to interact with each other. For now, let’s just focus on writes / Produce requests.&lt;/p&gt;

&lt;p&gt;Processing every Produce request requires some memory (at least as much data as is being written by the client), a dedicated Goroutine (which consumes memory and has scheduling overhead), and a variety of other resources. If the Agents blindly accept every Produce request they receive, with no consideration for how fast other Produce requests are being completed or how many are currently in-flight, then a sufficiently high number of Produce requests will eventually overwhelm the Agents &lt;a href="https://www.warpstream.com/blog/dealing-with-rejection-in-distributed-systems#notes" rel="noopener noreferrer"&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now, queuing theory tends to deal in concepts like arrival rates and average request processing time. That could lead us to consider using a rate limiter to implement backpressure. For example, we could do some benchmarking and conclude that, on average, Agents can only handle X throughput/s/core, and thus configure a global rate limit for the entire process to X * NUM_CORES &lt;a href="https://www.warpstream.com/blog/dealing-with-rejection-in-distributed-systems#notes" rel="noopener noreferrer"&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That would work, but it would be pretty annoying to tune. What &lt;em&gt;is&lt;/em&gt; a reasonable rate-limit for write throughput per core?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We could benchmark it, but the performance will vary heavily from one workload to another. Also, what if we improve the performance of the Agents in the future?&lt;/li&gt;
&lt;li&gt;We could measure it empirically at runtime, and then back that out into a dynamically adjusted rate-limit, but that’s likely to be brittle and complex.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In general, rate limits make a lot of sense for limiting the amount of resources that individual tenants can consume in a multi-tenant environment (which is one aspect of backpressuring), but they’re not a great solution for making sure that systems don’t tip over into catastrophic failure.&lt;/p&gt;

&lt;p&gt;Instead, I’ve always found the best results by tracking &lt;strong&gt;something that correlates&lt;/strong&gt; with the system becoming overloaded and falling behind. Inevitably, if the system is overloaded, &lt;em&gt;something&lt;/em&gt; will begin to pile up: memory usage, inflight requests, queue depth, etc.&lt;/p&gt;

&lt;p&gt;These things are easy to track and they relieve us from the burden of thinking in terms of rates (mostly). The threshold for “this is too many things in-flight” is usually much easier to tune and reason about than a pure rate-limit and will automatically adapt to a much wider variety of workloads. As a bonus, if the system gets more efficient over time, the backpressure mechanism will automatically adjust because it will require more load to make things pile up, and so the backpressure system will kick in later. Anytime we can make something self-tuning like this, that’s a huge win.&lt;/p&gt;

&lt;p&gt;For Produce requests in the WarpStream Agents, the best criteria we found for triggering backpressure were two metrics:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The number of in-flight bytes that had not yet been flushed to object storage.&lt;/li&gt;
&lt;li&gt;The number of in-flight files that had not yet been flushed to object storage.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Intuitively this makes sense: if the Agents are overloaded, then pretty quickly requests will begin piling up in-memory, and the value of those two metrics will spike. It’s pretty easy to do the equivalent of the following in the WarpStream code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func (h *Handler) HandleProduceRequest(
 ctx context.Context,
 req ProduceRequest,
) (ProduceResponse, error) {
 if h.numberOfOutstandingBytesOrFilesTooHigh() {
  return nil, ErrBackpressure
 }

 // Process request.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we’re done, right?&lt;/p&gt;

&lt;p&gt;Unfortunately, this is a woefully inadequate solution. The WarpStream Agents process every Kafka protocol request in a dedicated Goroutine, and there is a pretty big risk here that a flood of Produce requests will come in at the same time, all individually pass the h.numberOfOutstandingBytesOrFilesTooHigh() check at the same time, and then immediately throw the Agent way over the target limit.&lt;/p&gt;

&lt;p&gt;We could fix that by making that method atomically check the metrics &lt;em&gt;and increment them&lt;/em&gt;, but we actually have a bigger problem: by the time HandleProduceRequest() is called, we’ve already done &lt;em&gt;a lot&lt;/em&gt; of work:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copied the data to be written off the network.&lt;/li&gt;
&lt;li&gt;Copied it into temporary buffers.&lt;/li&gt;
&lt;li&gt;Spawned (or reused) an existing goroutine.&lt;/li&gt;
&lt;li&gt;Emitted a bunch of metrics.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At this point, it’s almost worth just accepting the request because the incremental cost of actually processing the request at this point is not &lt;em&gt;that much&lt;/em&gt; higher than the work we’ve already performed.&lt;/p&gt;

&lt;p&gt;It would be a lot better if we could have rejected this request earlier. Like, way earlier, before we allowed it to consume almost any memory in the first place. Thankfully, this is possible! We wrote the TCP server that powers the WarpStream Kafka protocol from scratch, so we have full control over it. At a very high level, the server code looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
for {
 conn = listener.Accept()
 go func() {
  handleConnection(conn)
 }()
}

func handleConnection(conn net.Conn) {
 for {
  header = ReadHeader(conn)
  message = ReadMessage(conn)
  go func() {
   response, err = handler.HandleRequest(message)
   sendOutcome(response, err)
  }()
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I’m glossing over a &lt;em&gt;lot&lt;/em&gt; of details, but you get the gist. In a really busy WarpStream cluster, a single Agent might have thousands or tens of thousands of active connections, and each of those connections will have Goroutines that are reading bytes off the network, allocating messages, and spawning new Goroutines as fast as they can.&lt;/p&gt;

&lt;p&gt;In that scenario, it doesn’t matter that the HandleRequest() method will start returning backpressure errors. There’s too much concurrency and the Goroutines handling the Kafka client connections will eventually overwhelm the VM’s resources and trigger an out of memory error.&lt;/p&gt;

&lt;p&gt;Ideally, once the Agent detected that it was overloaded, all these connection handler Goroutines would stop processing messages for a while to allow the system to recover. This is the difference between &lt;em&gt;load-shedding&lt;/em&gt; and &lt;em&gt;backpressuring&lt;/em&gt;. The handler in the above code is &lt;em&gt;shedding load&lt;/em&gt; (by rejecting requests), but it’s not &lt;em&gt;applying pressure backward&lt;/em&gt; to the rest of the system.&lt;/p&gt;

&lt;p&gt;So how do we fix this? Well, the first thing we can do is make a tiny modification to the handleConnection function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
for {
 conn = listener.Accept()
 go func() {
  handleConnection(conn)
 }()
}

func handleConnection(conn net.Conn) {
 for {
  for {
   throttleDuration = handler.ShouldThrottle()
   if throttleDuration &amp;gt; 0 {
    time.Sleep(throttleDuration)
    continue
   }
   break
  }

  header = ReadHeader(conn)
  message = ReadMessage(conn)
  go func() {
   response, err = handler.HandleRequest(message)
   sendOutcome(response, err)
  }()
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again I’m oversimplifying, but this is already much better than just the previous solution. Now, it will be &lt;em&gt;much harder&lt;/em&gt; for misbehaving clients to knock an Agent over because if the Agent is overloaded, it will &lt;em&gt;stop reading bytes from the network entirely&lt;/em&gt;. It’s pretty hard to do less work than that.&lt;/p&gt;

&lt;p&gt;Even better, TCP incorporates the concept of backpressure deeply into its design, so this simple trick will apply backpressure back into the networking stack and eventually all the way back to the client VMs.&lt;/p&gt;

&lt;p&gt;Finally, we can take this one step further and make the Agents refuse to even accept new connections when they’re overloaded:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for {
 // Stop accepting new connections if overloaded.
 sleepUntilHealthy()
 conn = listener.Accept()
 go func() {
  handleConnection(conn)
 }()
}

func handleConnection(conn net.Conn) {
 for {
  // Stop accepting new requests on existing connections
  // if overloaded.
  sleepUntilHealthy()
  header = ReadHeader(conn)
  message = ReadMessage(conn)
  go func() {
   response, err = handler.HandleRequest(message)
   sendOutcome(response, err)
  }()
 }
}

func sleepUntilHealthy() {
 for {
  throttleDuration = handler.ShouldThrottle()
  if throttleDuration &amp;gt; 0 {
   time.Sleep(throttleDuration)
   continue
  }
  break
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a bit heavy-handed, but that’s OK. It will only kick in during very dire circumstances where the only alternative would be catastrophic failures and/or running out of memory &lt;a href="https://www.warpstream.com/blog/dealing-with-rejection-in-distributed-systems#notes" rel="noopener noreferrer"&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Sounds good on paper. But does it work? Let’s find out!&lt;/p&gt;

&lt;p&gt;At WarpStream we don’t like to coddle our software. Production is a messy place where terrible things happen daily, so we try to simulate that as much as possible in all of our test environments.&lt;/p&gt;

&lt;p&gt;One of our most aggressive environments is a test cluster that runs 24/7 with three WarpStream Agents. The benchmark workload is configured such that all three Agents are pegged at 80–100% CPU utilization all the time. The benchmark itself consists of eight different test workloads, using four different Kafka clients, and varying batch sizes, partition counts, throughput, number of client instances, etc.&lt;/p&gt;

&lt;p&gt;In total, there are hundreds of producer and consumer instances, thousands of partitions, four different client compression algorithms, a mix of regular and compacted topics, and almost all the producers are configured to use the &lt;a href="https://www.warpstream.com/blog/warpstream-benchmarks-and-tco#taking-it-further" rel="noopener noreferrer"&gt;most difficult partitioning strategy&lt;/a&gt; where they round-robin records amongst all the partitions.&lt;/p&gt;

&lt;p&gt;In addition, the benchmark workloads periodically delete topics and recreate them, rewind and begin reading all of the data from the beginning of retention for the compacted topics, manually trigger consumer group rebalances, and much more. It’s just absolute chaos. Great for testing!&lt;/p&gt;

&lt;p&gt;When we iterate on WarpStream’s backpressure system, we use a very simple test: we aggressively scale the cluster down from three Agents to one. This triples the load on the sole remaining Agent that was already running at almost 100% CPU utilization.&lt;/p&gt;

&lt;p&gt;Before our most recent improvements, this is what would happen:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fispd9p1mw2w4xk7r2qig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fispd9p1mw2w4xk7r2qig.png" width="800" height="663"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not fun.&lt;/p&gt;

&lt;p&gt;But with the new build and all of our latest tricks?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6loafhcnvt33cuhrkfun.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6loafhcnvt33cuhrkfun.png" width="800" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not perfect, but it is pretty decent considering the Agent is running at 100% CPU utilization:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu13g6udmxycjugi5917w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu13g6udmxycjugi5917w.png" width="800" height="664"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Importantly, the struggling Agent &lt;em&gt;immediately&lt;/em&gt; recovers as soon as we provide additional capacity by adding a node. That is &lt;em&gt;exactly&lt;/em&gt; the behavior you want out of a distributed system like this: the system should feel “springy” such that it immediately “bounces back” as soon as additional resources are provided or load is removed.&lt;/p&gt;

&lt;p&gt;Another counter-intuitive outcome here is that the Agent continues to function reasonably &lt;em&gt;even while pegged at 100% CPU utilization for a sustained period of time&lt;/em&gt;. This is very difficult to accomplish in practice, but it represents the best case scenario for backpressuring: the Agent is able to utilize 100% of the available resources on the machine without ever becoming unstable or unresponsive.&lt;/p&gt;

&lt;p&gt;Any operator (or auto-scaler) can look at that graph and immediately determine the right course of action: scale up! Contrast that with a system that starts backpressuring while the underlying resources are under-utilized (say at 40% CPU utilization). That’s going to be a lot more difficult to understand, debug, and most importantly, react to in an automated manner.&lt;/p&gt;

&lt;p&gt;Of course, that’s just how we manage backpressure for Produce requests. The Fetch code path is even more nuanced and required some novel tricks that we’d never employed in any previous system we ever worked on before. But this post is already way too long, so that’ll have to wait until next time!&lt;/p&gt;

&lt;p&gt;If you like sleeping through the night and letting your infrastructure auto-scale and protect itself automatically, check out WarpStream.&lt;/p&gt;

&lt;p&gt;¹ This is true “by definition” of the most basic principles of queuing theory.&lt;/p&gt;

&lt;p&gt;² It’s usually best to define limits as a function of the available resources. This way, the application automatically scales to different instance types without modifying the underlying configuration.&lt;/p&gt;

&lt;p&gt;³ Note that all of this is independent of the quota / throttling system that is native to Apache Kafka. We’ll discuss that more in a different post.&lt;/p&gt;

&lt;p&gt;To learn more about WarpStream Schema Validation, read the &lt;a href="https://docs.warpstream.com/warpstream/configuration/schema-registry-beta" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, or &lt;a href="https://www.warpstream.com/contact-us" rel="noopener noreferrer"&gt;contact us&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a free WarpStream account and start streaming with $400 in free credits.&lt;/strong&gt; &lt;a href="https://console.warpstream.com/signup" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Started&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>datastreaming</category>
      <category>apachekafka</category>
      <category>dataengineering</category>
      <category>kafka</category>
    </item>
    <item>
      <title>Announcing WarpStream Schema Validation</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Thu, 18 Jul 2024 16:54:07 +0000</pubDate>
      <link>https://dev.to/warpstream/announcing-warpstream-schema-validation-4kg8</link>
      <guid>https://dev.to/warpstream/announcing-warpstream-schema-validation-4kg8</guid>
      <description>&lt;p&gt;by Brian Shih&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do we need schemas?
&lt;/h3&gt;

&lt;p&gt;Schemas in Apache Kafka® enable operators to ensure that their data conforms to the expected schema and prevent data quality and compliance issues, such as rogue producers writing data to Kafka topics that shouldn’t be there. This can be problematic in cases where downstream applications expect only to receive records that conform to a specific schema and a specific format, e.g., ETL applications that write to a database.&lt;/p&gt;

&lt;p&gt;Schemas have become ubiquitous in Kafka and are a key component of any data governance, compliance, and platform management regime.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Schemas Work in Kafka
&lt;/h3&gt;

&lt;p&gt;Historically, schemas in Kafka have been implemented as a client-side feature to reduce the load on the stateful Kafka Brokers. Kafka uses an external server (a Schema Registry) to store schemas, and the producer client periodically polls the registry and caches the schemas and their IDs. Before writing to Kafka, the producer client serializes the data and validates that the record is compatible with the schema retrieved from the Schema Registry. If the record is incompatible with the schema, the serializer throws an error, and the producer does not produce the record for Kafka, which protects against incorrect data being written to Kafka from our producer. If the record is compatible, the producer writes the data with a schema ID and prepends the schema to the record. On the other side, consumers look up the schema from the Schema Registry, and if the schema on the record is compatible with the schema in the Schema Registry, the consumer deserializes the record. If not, the consumer throws an error.&lt;/p&gt;

&lt;p&gt;While this implementation satisfies the basic requirement to add schemas to records in Kafka, it lacks broker-side validation, meaning schemas are entirely a client-side feature. That’s problematic because it relies on clients to always do the right thing. The Kafka broker will happily accept whatever it’s given by any Kafka client, so while the client can validate that its own writes and reads conform to the proper schema, there is nothing that prevents &lt;em&gt;another&lt;/em&gt; client from writing data that does not conform to the schema defined by a well-behaved producer. Broker-side validation is necessary to implement centralized data governance policies.&lt;/p&gt;

&lt;p&gt;Various data governance products have been launched that enable the Kafka broker to do some schema validation, however these features are limited in their utility because they can only validate that the schema &lt;em&gt;ID&lt;/em&gt; matches the schema ID from the Schema Registry, not that the schema of the &lt;em&gt;record&lt;/em&gt; actually matches the expected schema.&lt;/p&gt;

&lt;h3&gt;
  
  
  Announcing WarpStream Schema Validation
&lt;/h3&gt;

&lt;p&gt;WarpStream is excited to announce that users can now connect WarpStream Agents to any Kafka-compatible Schema Registry &lt;em&gt;and&lt;/em&gt; validate that &lt;em&gt;records&lt;/em&gt; conform to the provided schema!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd69pqb6vtj64t5xigjxo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd69pqb6vtj64t5xigjxo.png" width="800" height="406"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The WarpStream Agent connects to an external Schema Registry&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;WarpStream Schema Validation validates not only that the schema ID encoded in a given record matches the schema ID in the Schema Registry but also that the &lt;em&gt;record&lt;/em&gt; actually conforms with the provided schema. In addition, WarpStream Schema Validation adds a “warning-only” configuration property, which, when enabled, emits a metric to identify rejected records instead of rejecting them, providing easier testing and monitoring during schema migrations without implementing separate dead-letter queues or risking data loss. WarpStream Schema Validation is built into the WarpStream Agent, so the Agent does this validation in the customer’s environment, and no data is exfiltrated.&lt;/p&gt;

&lt;p&gt;To connect the WarpStream Agents with a Schema Registry, specify the optional -schemaRegistryURL flag in the Agent configuration. WarpStream supports Basic, TLS, and mTLS authentication between the Agent and the Schema Registry.&lt;/p&gt;

&lt;p&gt;Once the Agents are connected to a compatible Schema Registry, WarpStream Schema Validation can be enabled with the following topic-level configurations:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwv0po82znspo1l89nbs2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwv0po82znspo1l89nbs2.png" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enabling record-level validation with an external schema registry increases the CPU load for the Agents. But unlike Kafka brokers, which cannot be auto-scaled without significant operational toil and risk of data loss, WarpStream Agents are completely stateless and can be scaled elastically based on basic parameters like CPU utilization. This means that, unlike Kafka, a WarpStream cluster can be scaled automatically on the fly, so there’s no need to permanently provision more Agents in anticipation of increased CPU utilization.&lt;/p&gt;

&lt;p&gt;In addition, using &lt;a href="https://docs.warpstream.com/warpstream/configuration/deploy/splitting-agent-roles" rel="noopener noreferrer"&gt;Agent Roles&lt;/a&gt;, WarpStream can isolate parts of a workload to a specific set of Agents, which reduces the impact of increased load caused by Schema Validation. Schema Validation uses the &lt;strong&gt;proxy-produce&lt;/strong&gt; role, so Agents handling &lt;strong&gt;Produce()&lt;/strong&gt; requests can be isolated from the rest of the cluster and scaled independently.&lt;/p&gt;

&lt;p&gt;Currently, WarpStream supports validating JSON and Avro schemas, with support for Protobuf coming soon. While the current implementation of WarpStream Schema Validation utilizes external Schema Registries, we are also currently working on building our own WarpStream-native schema registry.&lt;/p&gt;

&lt;p&gt;To learn more about WarpStream Schema Validation, read the &lt;a href="https://docs.warpstream.com/warpstream/configuration/schema-registry-beta" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, or &lt;a href="https://www.warpstream.com/contact-us" rel="noopener noreferrer"&gt;contact us&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a free WarpStream account and start streaming with $400 in free credits.&lt;/strong&gt; &lt;a href="https://console.warpstream.com/signup" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Started&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>apachekafka</category>
      <category>dataengineering</category>
      <category>realtimestreamingdat</category>
      <category>datastreaming</category>
    </item>
    <item>
      <title>The Kafka Metric You’re Not Using: Stop Counting Messages, Start Measuring Time</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Tue, 16 Jul 2024 18:03:30 +0000</pubDate>
      <link>https://dev.to/warpstream/the-kafka-metric-youre-not-using-stop-counting-messages-start-measuring-time-2e57</link>
      <guid>https://dev.to/warpstream/the-kafka-metric-youre-not-using-stop-counting-messages-start-measuring-time-2e57</guid>
      <description>&lt;p&gt;by Aratz Manterola Lasa&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/yBia8pnDKYg" rel="noopener noreferrer"&gt;Companion video&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Consumer groups are the backbone of data consumption in Kafka. Consumer groups are logical groupings of consumers who work together to read data from topics, dividing the workload by assigning partitions to individual group members. Each group member then reads messages from its assigned partitions independently. Consumer groups also keep track of consumption progress by storing offset positions for every topic partition that the group is consuming. This ensures that when a member leaves the group (because it was terminated or crashed), a new member can pick up where the last one left off without interruption.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo4t645xq34br6ejil512.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo4t645xq34br6ejil512.png" width="800" height="825"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Depiction of a Kafka consumer group. Consumers read from their respective partitions, and commit their progress (as Kafka offsets) back to the cluster.&lt;/p&gt;

&lt;p&gt;Consumer groups are great, but monitoring them can be a challenge. Specifically, it can be tricky to determine if your consumers are keeping up with the incoming data stream (i.e., are they “lagging”) and, if not, why. In this post, we’ll explain why the usual way of measuring consumer group lag (using Kafka offsets) isn’t always the best and show you an alternative approach that makes it much easier to monitor and troubleshoot them.&lt;/p&gt;

&lt;p&gt;The most common way to monitor consumer groups is to alert on the delta between the maximum offset of a topic partition (i.e., the offset of the most recently produced message) and the maximum offset committed by the consumer group for that same topic partition. We’ll call this metric “offset lag.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdihytrk331u5qb7dclbt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdihytrk331u5qb7dclbt.png" width="800" height="767"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Offset lag is the delta between the committed offset and the offset of the last produced record for each topic-partition.&lt;/p&gt;

&lt;p&gt;Consumer groups track their own progress using Kafka offsets, so intuitively, it makes sense to reuse the same mechanism to monitor whether they’re keeping up. High offset lag indicates that your consumers can’t keep up with the incoming data, necessitating action like increasing the number of consumers, partitions, or both. In addition, the &lt;em&gt;rate of change&lt;/em&gt; of consumer group lag is an important early indicator of potential problems and a good indicator that attempts to mitigate observed increases in lag are working.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem with Consumer Offset Lag
&lt;/h3&gt;

&lt;p&gt;Tracking consumer group offset lag can be a really useful way to monitor an individual Kafka consumer. However, converting offset lag into a value that is meaningful &lt;em&gt;to humans&lt;/em&gt; or that can be compared with other workloads is difficult.&lt;/p&gt;

&lt;p&gt;Let’s use a concrete example to make this more clear. Imagine you’re an infrastructure engineer responsible for managing your company’s data streaming platform. In a recent incident, one team’s consumer application fell so far behind that customer data was delayed for hours. No monitors were fired, and you only discovered the issue when some of your (rightfully angry!) customers complained.&lt;/p&gt;

&lt;p&gt;As a remediation item, you’ve been tasked with ensuring that all Kafka consumers are monitored, so alarms will go off if any consumers fall “too far” behind.&lt;/p&gt;

&lt;p&gt;Great! We just learned about the concept of offset lag, so you can create a monitor on the offset lag metric and group by consumer group name, right? All you have to do is pick the offset lag “threshold” beyond which the monitor should fire.&lt;/p&gt;

&lt;p&gt;You run the query in a dashboard to see the current values, and you are shocked to find that the current offset lag for your various consumer groups varies wildly, from 10 (no extra zeros!) to 12 &lt;em&gt;million&lt;/em&gt;. You freeze in panic. “Are we having an incident &lt;em&gt;right now!?&lt;/em&gt;”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9skmze304433ghtrly1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9skmze304433ghtrly1.png" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Two different consumer groups with wildly varying offset lag.&lt;/p&gt;

&lt;p&gt;After some investigation and talking to other teams, you realize this is normal. Some of these consumer groups naturally have much higher throughput than others, so their baseline offset lag is higher because there’s more data “in-flight” at any given moment. Other consumer groups process data in large batches, accumulating large amounts of offset lag, consuming it all at once, and then repeating that process.&lt;/p&gt;

&lt;p&gt;Every team’s use case makes sense in isolation, but now you’re stuck. How in the world will you pick one threshold that makes sense for all of these different workloads? You could pick different thresholds for each workload, but even then, you’ll probably get woken up in the middle of the night with false alarms when some of these workloads grow in throughput and their baseline offset lag increases, even if the actual consumers are keeping up just fine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Time Lag: A More Intuitive Metric
&lt;/h3&gt;

&lt;p&gt;To overcome the limitations of offset-based lag, the Kafka community has introduced a more intuitive metric called “time lag”. While intuitive, this concept wasn’t immediately available in Open Source Kafka’s native tooling. Companies like Agoda and AppsFlyer recognized its value and developed their own solutions, with Agoda notably &lt;a href="https://medium.com/agoda-engineering/adding-time-lag-to-monitor-kafka-consumer-2c626fa61cfc" rel="noopener noreferrer"&gt;sharing their insights in a blog post&lt;/a&gt; that inspired many in the community (including us!). Since then, tools like Burrow have emerged, offering time lag calculation as part of their Kafka monitoring tools.&lt;/p&gt;

&lt;p&gt;Imagine once again that you’re an infrastructure engineer, and you’re in the middle of an incident where one of your consumer groups has fallen behind. Your customers are asking you how delayed their data will be. They’re likely to look at you with a blank stare if you tell them: “your data is delayed 30 million offsets”, but they’ll understand immediately if you tell them the maximum data delay is 17 minutes.&lt;/p&gt;

&lt;p&gt;Time lag is calculated using the following function:&lt;/p&gt;

&lt;p&gt;Time Lag = CurrentTime — LastTimeConsumedOffsetWasLatest&lt;/p&gt;

&lt;p&gt;Where LastTimeConsumedOffsetWasLatest is defined as the moment when the last consumed message was also the most recently produced message.&lt;/p&gt;

&lt;p&gt;Let’s illustrate that with an example. Imagine a Kafka topic where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The latest produced message has offset 15 and was generated at 3:15 PM.&lt;/li&gt;
&lt;li&gt;A consumer group processes messages up to offset 10 by 3:20 PM.&lt;/li&gt;
&lt;li&gt;The message with offset 11 was produced at 3:10 PM.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this scenario, LastTimeConsumedOffsetWasLatest is 3:10 PM. This is because at 3:09:59 PM, offset 10 was still the latest message on the topic. However, at 3:10 PM, offset 11 was produced, meaning the consumer started to fall behind at that exact moment. So we round this up to 3:10 PM.&lt;/p&gt;

&lt;p&gt;Therefore, at 3:20 PM, the time lag is calculated as:&lt;/p&gt;

&lt;p&gt;Time Lag = 3:20 PM — 3:10 PM = 10 minutes&lt;/p&gt;

&lt;p&gt;This means the consumer group is 10 minutes behind the most recent message.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdpgly19fqx5bo6hry230.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdpgly19fqx5bo6hry230.png" width="800" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another way to put it: “ &lt;strong&gt;time lag” is the time elapsed since the next-message-to-be-consumed was produced.&lt;/strong&gt; This definition is simple but also deceptively elegant: by making it relative to the &lt;em&gt;current time&lt;/em&gt;, the metric keeps increasing if there are &lt;em&gt;any&lt;/em&gt; unprocessed records, even if producers and consumers have stopped entirely. It acts as an alarm, alerting you to unprocessed messages even when the system appears idle.&lt;/p&gt;

&lt;h3&gt;
  
  
  An Integrated Approach to Time Lag Calculation
&lt;/h3&gt;

&lt;p&gt;While monitoring time lag can be a game-changer, accessing this metric isn’t always straightforward. If you search online resources, you’ll find the primary method involves third-party tooling that calculates this metric for you, like Burrow. These tools are great; they really make monitoring trivial. However, Burrow is yet another piece of software that has to be deployed, maintained, and troubleshooted.&lt;/p&gt;

&lt;p&gt;At WarpStream, we like to make things easy. Asking our users to install third-party tooling just to know if their consumer applications were caught up didn’t sit right with us. So, we decided to build time lag measurement directly into WarpStream so that all our users would benefit from it out of the box.&lt;/p&gt;

&lt;p&gt;This is probably a good time to briefly review WarpStream’s architecture. If you’re not familiar with it, WarpStream is a drop-in replacement for Apache Kafka built directly on top of object storage. WarpStream has many different architectural differences from Apache Kafka, but the one most relevant to the current topic is that in addition to separating computing from storage, WarpStream also separates &lt;em&gt;data from metadata&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dvfxuzdzacktp5oj0vd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dvfxuzdzacktp5oj0vd.png" width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WarpStream architecture diagram. Agents (stateless thick proxies) run in the customers cloud account, and the metadata store runs in WarpStream’s cloud account.&lt;/p&gt;

&lt;p&gt;Customers’ raw data is stored exclusively in their own S3 buckets, accessible only to them. Meanwhile, WarpStream Cloud stores metadata in a highly available, quadruply-replicated metadata store.&lt;/p&gt;

&lt;p&gt;The fact that WarpStream stores all of the cluster’s metadata in a centralized metadata store makes calculating time lag (relatively) straightforward. Unlike Apache Kafka, we don’t have to read or load any raw records or their headers; we can just query the timestamp index in the metadata store directly. This has the added benefit that it doesn’t rely on potentially unreliable record header timestamps (the client can set custom timestamps in the records). Instead, WarpStream maintains its own accurate timestamps in the metadata store and uses optimized data structures for time-based searches.&lt;/p&gt;

&lt;p&gt;There was one challenge we had to solve, though: metrics are published by the Agents (data plane), which run in the customer’s environment and expose metrics via a Prometheus endpoint. However, the time lag calculation was running in WarpStream’s cloud control plane, so we needed a mechanism to make the time lag metrics the control plane generated available as Prometheus metrics in the Agents.&lt;/p&gt;

&lt;p&gt;To solve this, we came up with a very simple solution: leverage WarpStream’s existing job queueing system. WarpStream’s architecture includes a centralized scheduler on the control plane that orchestrates various operational tasks. Agents, deployed within the customer’s environment, regularly poll this scheduler to receive and execute tasks, including functions like data compaction and object storage cleanup. Leveraging this existing infrastructure, we introduced a new job dedicated to calculating time lag metrics. This job runs on the control plane, periodically computing the metrics and making them accessible for the agents to retrieve during their polling cycles, who then emit them. We liked this solution because it’s simple and allows us to provide more metrics easily in the future.&lt;/p&gt;

&lt;p&gt;We leverage this metadata to provide the &lt;strong&gt;warpstream_consumer_group_estimated_lag_very_coarse_do_not_use_to_measure_e2e_seconds&lt;/strong&gt; metric. Why such a weird name? As you’ll see later in our more detailed explanation, this value is coarse-grained and imprecise. For example, while the actual end-to-end latency for a workload may be 500ms, this metric could report that the consumer group time lag is as high as 5 seconds. We wanted to clarify that while this metric is valuable for monitoring and alerting, it should not be used for &lt;em&gt;benchmarking&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This metric is an approximation, so it’s not perfect, but it’s great for getting a general idea of how things are going and catching bigger problems. If an incident happens and someone tries to use this metric to explain a one-millisecond delay, they’re using the wrong tool for the job. We want people to feel comfortable setting alerts for more substantial delays (e.g., several minutes) because this metric excels at that. Think of it as a coarse-grained tool for catching big problems, not a fine-tuned instrument for performance tuning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvga0ufedn1s0uggol2sr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvga0ufedn1s0uggol2sr.png" width="800" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15vlg7kgvuofutthnly6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15vlg7kgvuofutthnly6.png" width="800" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Offset lag for the blue consumer is more than 20x higher, but time lag is less than 2x higher.&lt;/p&gt;

&lt;p&gt;The graph above showcases the difference between offset lag and time lag for two consumer groups. One group has a much larger offset lag of 20,000, while the other has a smaller lag of a few hundred. However, when we switch to the time lag, we see a different picture: both groups have very similar lags of 2 and 4.5 seconds. This shows how offset lag alone can be misleading and how time lag provides a more understandable overview of consumer group health.&lt;/p&gt;

&lt;p&gt;Imagine trying to set alerts based on these metrics. With time lag, a single alert threshold (e.g., 2 minutes) could easily cover both consumer groups. With offset lag, you’d need to set different thresholds for each, carefully considering the nature of each workload and potentially missing alerts for the group with the “smaller” lag.&lt;/p&gt;

&lt;h3&gt;
  
  
  Behind the Scenes: The Mechanics of Time Lag Metrics
&lt;/h3&gt;

&lt;p&gt;Having established the benefits of time lag over offset lag, let’s delve into the technical implementation. Understanding this implementation will also show how WarpStream calculates the time lag we introduced earlier: Time Lag = CurrentTime—LastTimeConsumedOffsetWasLatest.&lt;/p&gt;

&lt;p&gt;WarpStream continuously tracks when messages are produced, associating each message offset with its corresponding timestamp. This data is stored internally in a way that allows us to efficiently query for offsets based on timestamps. To optimize storage, we aggregate this data into minute-level intervals. For each minute, we record the earliest offset produced (baseOffset) and the total number of offsets produced (offsetCount), effectively creating a compact time-series representation of message production.&lt;/p&gt;

&lt;p&gt;When we need to know LastTimeConsumedOffsetWasLatest for a specific offset consumed by a consumer group, we use this index:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We first locate the relevant minute-level interval that contains that offset.&lt;/li&gt;
&lt;li&gt;Within that interval, we divide the time by the offsetCount to estimate how frequently messages were produced within that time range.&lt;/li&gt;
&lt;li&gt;Using the production rate and the offset’s position within the interval, we calculate an estimated timestamp for when that specific message was produced. This gives us the LastTimeConsumedOffsetWasLatest, which we then subtract from the current time to obtain the time lag.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As mentioned earlier, a dedicated background job within WarpStream’s control plane periodically calculates each cluster’s time lag and other relevant metrics for every consumer group. This involves querying the committed offsets for every consumer group and partition and then utilizing the timestamp index to compute the corresponding time lag values. These calculated values are subsequently transmitted to the WarpStream Agents operating within the customer’s environment. And finally the Agents expose these time lag metrics via their Prometheus endpoint, under the name &lt;strong&gt;warpstream_consumer_group_estimated_lag_very_coarse_do_not_use_to_measure_e2e_seconds&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;However, keeping a record of every minute would consume excessive storage space for clusters with many topic-partitions and high (or infinite) retention. To address this, we merge the index entries periodically. This involves merging multiple entries into one, updating the baseOffset and offsetCount, and introducing an additional field called minuteCount to keep track of the number of minutes the compacted entry represents.&lt;/p&gt;

&lt;p&gt;This merging does sacrifice some timestamp precision, but we prioritize the most recent entries, ensuring we maintain their original accuracy untouched. Older entries are the only ones subject to merging. We prioritize recent entries because the more recent an offset is, the more crucial it is for consumers to have precise lag information. If a consumer is 10 minutes behind, a 30-second difference isn’t a major concern. But for a consumer who’s only 1 minute behind, that level of precision becomes much more important. In this way, we balance optimizing storage efficiency and maintaining the level of precision that matters most for effective monitoring.&lt;/p&gt;

&lt;p&gt;Now, it’s clear why this metric is an approximation designed for monitoring and alerting, not precise benchmarking. The “very coarse” part of the metric’s name highlights a few key limitations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Interpolation:&lt;/strong&gt; The metric is calculated by interpolating &lt;strong&gt;at least&lt;/strong&gt; 1-minute level entries in the timestamp index, which can introduce inaccuracies compared to the true message production time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Committed Offsets:&lt;/strong&gt; The metric relies on committed offsets, which may only sometimes reflect the most up-to-date consumption progress. Consumers can commit offsets at varying intervals, either immediately after processing a message or after processing an entire batch. This leads to potential discrepancies between the committed offset and the actual latest consumed message.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These factors make the metric less suitable for precise performance measurements but perfectly adequate for identifying significant delays in consumer group processing. Moreover, the utility of the timestamp index extends beyond just calculating the time lag. It also enables internal Kafka APIs to query for offsets based on specific timestamps, which is useful for features like time-based data retrieval and analysis.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F14rdfb7sdcqfa2xbexo4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F14rdfb7sdcqfa2xbexo4.png" width="800" height="639"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Depiction of timestamp index compaction and subsequent interpolation.&lt;/p&gt;

&lt;p&gt;In conclusion, monitoring Kafka consumer groups doesn’t need to be a guessing game. By shifting the focus from the message counts (offset lag) to time (time lag), understanding how consumers perform becomes trivial. With Warpstream’s built-in time lag metrics, this insight is readily available, ensuring you can monitor and react timely in case your data pipeline consumers start to fall behind.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a free WarpStream account and start streaming with $400 in free credits.&lt;/strong&gt; &lt;a href="https://console.warpstream.com/signup" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Started&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>apachekafka</category>
      <category>dataengineering</category>
      <category>realtimestreamingdat</category>
    </item>
    <item>
      <title>WarpStream Newsletter #4: Data Pipelines, Zero Disks, BYOC and More</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Wed, 10 Jul 2024 17:20:40 +0000</pubDate>
      <link>https://dev.to/warpstream/warpstream-newsletter-4-data-pipelines-zero-disks-byoc-and-more-2ded</link>
      <guid>https://dev.to/warpstream/warpstream-newsletter-4-data-pipelines-zero-disks-byoc-and-more-2ded</guid>
      <description>&lt;p&gt;Welcome to the fourth issue of the WarpStream newsletter. A lot has happened since our last newsletter: we’ve released five new blogs, made a bunch of product updates, and added new social channels (like &lt;a href="https://www.facebook.com/warpstream" rel="noopener noreferrer"&gt;Facebook&lt;/a&gt; and &lt;a href="https://www.youtube.com/@warpstreamlabs" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;. Connect with us on social media and other platforms to stay updated via the links in the social footer at the bottom of this email.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lots of New Blog Posts
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.warpstream.com/blog/introducing-warpstream-managed-data-pipelines-for-byoc-clusters" rel="noopener noreferrer"&gt;Introducing WarpStream Managed Data Pipelines for BYOC clusters&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;For WarpStream BYOC clusters, Managed Data Pipelines provide a fully-managed SaaS user experience for &lt;a href="https://warpstreamlabs.github.io/bento/" rel="noopener noreferrer"&gt;Bento&lt;/a&gt;, a lightweight stream processing framework that offers much of the functionality of Kafka Connect, without sacrificing any of the cost benefits, data sovereignty, or deployment flexibility of the BYOC deployment model and comes with version control.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96mer350uhpdl9opcu5v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96mer350uhpdl9opcu5v.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.warpstream.com/blog/pixelfederation-powers-mobile-analytics-platform-with-warpstream" rel="noopener noreferrer"&gt;Pixel Federation Powers Mobile Analytics Platform with WarpStream, saves 83% over MSK&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Pixel Federation’s mobile games have millions of users, so you can imagine how many events and Kafka topics they have. By swapping MSK for WarpStream, they not only drastically reduced their costs, but were able to ditch complex VPC peering in favor of simpler agent groups.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb3307adqcrjbrcacj5dh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb3307adqcrjbrcacj5dh.png" width="800" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interested in Learning More About WarpStream?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://calendly.com/d/3x5-79z-zc6/warpstream-demo-45-minutes" rel="noopener noreferrer"&gt;&lt;strong&gt;Book a call&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.warpstream.com/blog/zero-disks-is-better-for-kafka" rel="noopener noreferrer"&gt;Zero Disks is Better (for Kafka)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;In a prior blog, we discussed how &lt;a href="https://www.warpstream.com/blog/tiered-storage-wont-fix-kafka" rel="noopener noreferrer"&gt;tiered storage won’t fix Kafka&lt;/a&gt;. The end goal is not some disks but zero disks. We cover how WarpStream’s Zero Disk Architecture (ZDA) allows you to do things like trivial or dead-simple auto-scaling of Kafka brokers (“agents” in WarpStream terminology), isolate workloads with agent groups, and easily run your entire data pipeline in your virtual private cloud (VPC) without the need for custom code or additional services.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9t4hn0qj8fyci5j81xn7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9t4hn0qj8fyci5j81xn7.png" width="800" height="698"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.warpstream.com/blog/secure-by-default-how-warpstreams-byoc-deployment-model-secures-the-most-sensitive-workloads" rel="noopener noreferrer"&gt;Secure by default: How WarpStream’s BYOC deployment model secures the most sensitive workloads&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;WarpStream’s BYOC model is a hybrid approach that balances the two common cloud deployment models (fully self-managed and fully hosted SaaS). By splitting the software into discrete data and control planes, it ensures data privacy and sovereignty, compliance, cost optimization, and control.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1wjnjxpgtbxlv45vy3mf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1wjnjxpgtbxlv45vy3mf.png" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try WarpStream With $400 in Free Credits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://console.warpstream.com/signup" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Started For Free&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.warpstream.com/blog/multiple-regions-single-pane-of-glass" rel="noopener noreferrer"&gt;Multiple Regions, Single Pane of Glass&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A common problem when building infrastructure-as-a-service products is the need to provide highly available and isolated resources in many different regions while also having the overall product present as a “single pane of glass” to end-users. We review the options available to solve this and what we ultimately used (pushed-based replication).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv3aea5vm7c0mizxl0jj9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv3aea5vm7c0mizxl0jj9.png" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Recent Product Updates
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://docs.warpstream.com/warpstream/configuration/bento" rel="noopener noreferrer"&gt;Managed Data Pipelines&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;BYOC customers can now use Managed Data Pipelines. These combine the power of WarpStream’s control plane with &lt;a href="https://warpstreamlabs.github.io/bento/" rel="noopener noreferrer"&gt;Bento&lt;/a&gt;, an open-source streaming processing platform.&lt;/p&gt;

&lt;p&gt;This provides much of the same functionality as Kafka Connect and additional stream processing functionality like single message transforms, aggregations, multiplexing, enrichments, and native support for WebAssembly (WASM).&lt;/p&gt;

&lt;p&gt;Pipelines run in your VPC and on your VMs, and data is processed in your buckets. WarpStream has zero access to this data. WarpStream provides a helpful UI for creating and editing pipelines, the ability to pause and resume pipelines dynamically, and version control.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://docs.warpstream.com/warpstream/overview/change-log" rel="noopener noreferrer"&gt;Lots of New Metrics&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;We’ve added new metrics (and deprecated unnecessary ones) with nearly every release. We’ve recapped some of these new metrics below. You can check out &lt;a href="https://docs.warpstream.com/warpstream/overview/change-log" rel="noopener noreferrer"&gt;our official changelog&lt;/a&gt; to get the full list.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;warpstream_consumer_group_generation_id&lt;/strong&gt; = This metric indicates the generation number of the consumer group, incrementing by one with each rebalance. It serves as an effective indicator for detecting occurrences of rebalances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;warpstream_agent_kafka_fetch_uncompressed_bytes&lt;/strong&gt; = Tracks the total uncompressed bytes fetched, replacing warpstream_agent_kafka_fetch_bytes_sent metric.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;warpstream_consumer_group_generation_id&lt;/strong&gt; = Uses the consumer_group tag. This metric indicates the generation number of the consumer group, incrementing by one with each rebalance. It serves as an effective indicator for detecting occurrences of rebalances.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Coming Soon: Kafka Transactions
&lt;/h3&gt;

&lt;p&gt;As we announced in our previous newsletter, the team is working on building in support for Kafka Transactions and expects to finish this work soon. If you want to use WarpStream for a workload requiring Transactions, please &lt;a href="https://www.warpstream.com/contact-us" rel="noopener noreferrer"&gt;contact us&lt;/a&gt;! We would love to chat.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://console.warpstream.com/signup" rel="noopener noreferrer"&gt;&lt;strong&gt;Try WarpStream With $400 in Free Credits&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WarpStream is free to try. After you create your account, it will be loaded with $400 in free credits so you can test how easy it is to set up and use WarpStream.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://campaigns-events.was-1.sendpdr.com/track/link/v2_y10xn4ev41/9q67kt2pd8uylyuzfmulr7km0/v2_2nyq2boq67" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Started For Free&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>apachekafka</category>
      <category>datastreaming</category>
      <category>warpstream</category>
    </item>
    <item>
      <title>Multiple Regions, Single Pane of Glass</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Fri, 21 Jun 2024 17:01:44 +0000</pubDate>
      <link>https://dev.to/warpstream/multiple-regions-single-pane-of-glass-1kjj</link>
      <guid>https://dev.to/warpstream/multiple-regions-single-pane-of-glass-1kjj</guid>
      <description>&lt;p&gt;by Emmanuel Pot&lt;/p&gt;

&lt;h3&gt;
  
  
  Multiple Regions, Single Pane of Glass
&lt;/h3&gt;

&lt;p&gt;A common problem when building infrastructure-as-a-service products is the need to provide highly available and isolated resources in &lt;strong&gt;many different regions&lt;/strong&gt; while also having the overall product present as a “single pane of glass” to end-users. Unfortunately, these two requirements stand in direct opposition to each other. Ideally, regional infrastructure is, well, regional, with zero inter-regional dependencies. On the other hand, users really don’t want to have to sign into multiple accounts/websites to manage infrastructure spread across many different regions.&lt;/p&gt;

&lt;p&gt;When we first designed how we would expand WarpStream’s cloud control planes from a single region to many, we searched around for good content on the topic and didn’t find much. Many different infrastructure companies have solved this problem, but very few have blogged about it, so we decided to write about our approach and, perhaps more importantly, some of the approaches we &lt;em&gt;didn’t take&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Let’s start by briefly reviewing WarpStream’s architecture by tracing the flow of a single request through the system. An operation usually begins with a customer’s Kafka client issuing a Kafka protocol message to the Agents, say a Metadata request. Since Kafka Metadata requests don’t interact with raw topic data like Produce and Fetch do, they can be handled solely by the WarpStream control plane. So when the WarpStream Agents receive a Kafka Metadata request, they just proxy it directly to the control plane.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feztdnclqkarbo31o75kt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feztdnclqkarbo31o75kt.png" width="800" height="685"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WarpStream Agents deployed in a customer cloud account, sending metadata requests to WarpStream’s Metadata Store.&lt;/p&gt;

&lt;p&gt;The request will hit a load balancer and then one of WarpStream’s “Gateway” nodes. The Gateway node’s job is to perform light authentication and authorization (basically, verify the request’s API key and map it to the correct customer / virtual cluster), and then forward the request to the Metadata Store for this customer’s cluster.&lt;/p&gt;

&lt;p&gt;Based on this, it’s already clear that WarpStream’s control plane has to deal with two very different types of data:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Platform data&lt;/strong&gt; : everything that users can control from our &lt;a href="https://console.warpstream.com/" rel="noopener noreferrer"&gt;web console and APIs:&lt;/a&gt; users, clusters, API keys, SASL credentials, etc. This data is persisted in a primary Aurora database that runs in us-east-1 and changes very infrequently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cluster metadata&lt;/strong&gt; : all the metadata that enables WarpStream to present the abstraction of Kafka on top of a low-level primitive like commodity object storage. For example, the Metadata Store keeps track of all the topic-partitions (and offsets) that are contained within every file stored in the user’s object storage bucket.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These two different types of data have very different requirements. The cluster metadata is in the critical path of every Kafka operation (both writes and reads), and therefore must be strongly consistent, extremely durable, highly available, and have low latency. As a result, we run every instance of the Metadata Store in a single region, whichever region is closest to the user’s WarpStream Agents. We also run each instance of the Metadata Store quadruply replicated across three availability zones, and we never replicate this metadata across multiple regions (for now).&lt;/p&gt;

&lt;p&gt;The requirements for the platform data, on the other hand, look completely different. This data changes infrequently, and the data being slightly stale is of no consequence (eventual consistency is ok). While platform data like API keys are &lt;em&gt;technically&lt;/em&gt; required in the critical path, since they’re trivially cacheable for arbitrarily long periods of time, they’re not &lt;em&gt;really&lt;/em&gt; in the critical path. Also, unlike the cluster metadata, some of the platform data needs to be available in &lt;em&gt;multiple regions&lt;/em&gt; for the service to function as a single pane of glass.&lt;/p&gt;

&lt;p&gt;When we were evaluating how to add support for additional regions to WarpStream, there wasn’t much to think about for the virtual cluster Metadata Stores. We would just run dedicated instances of it in more regions, and users would connect their Agents to whichever region was closest to their Agents since most (but not all) WarpStream clusters run in a single region anyway.&lt;/p&gt;

&lt;p&gt;The platform data (like API keys) is a different story. We could have used the same approach we did with the Metadata Store for the platform data by running a dedicated (and fully isolated) Aurora instance in every region, but that would have resulted in a poor user experience. Every region would have presented to users as a fully independent “website,” and users who wanted to run clusters in multiple regions would have had to maintain different WarpStream accounts, re-invite their teams, configure billing multiple times, etc, which is not what we wanted.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hub and Spoke
&lt;/h3&gt;

&lt;p&gt;When we looked at these requirements, the architecture that seemed like the best candidate was a “hub and spoke” model. The us-east-1 region that hosts our Aurora cluster would be the primary “hub” region that hosts the WarpStream UI and all of our “infrastructure as code” APIs for creating/destroying virtual clusters. All the other regions would be “spokes” that run fully independent and isolated versions of WarpStream’s Metadata Store, but not the Aurora database that stores the “platform data”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpzechu6kbmxxb24e5sx6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpzechu6kbmxxb24e5sx6.png" width="800" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Three spoke regions running fully isolated Metadata Stores powered by platform data replicated from the hub region.&lt;/p&gt;

&lt;p&gt;CRUD operations to create and destroy virtual clusters would &lt;em&gt;always&lt;/em&gt; be routed to the hub region, but actual customer WarpStream clusters and their Agents would only ever interact with a single “spoke” region and have no cross-regional dependencies.&lt;/p&gt;

&lt;p&gt;This approach would give us the best of both worlds: a single pane of glass where WarpStream customers could manage clusters in any region while still keeping regions independent from each other such that a failure in one region (including the hub region) would never cause a failure in any other region. The one caveat with this approach is that any unavailability of Aurora in the primary hub region would prevent customers from &lt;em&gt;creating new clusters&lt;/em&gt; in &lt;em&gt;all regions&lt;/em&gt;, but &lt;em&gt;existing&lt;/em&gt; &lt;em&gt;clusters&lt;/em&gt; would continue working just fine. We felt like this was an acceptable trade-off.&lt;/p&gt;

&lt;p&gt;However, this architecture did present a conundrum for us. In order for our product to present as a single pane of glass, &lt;em&gt;some&lt;/em&gt; of the data in our primary region (like whether a virtual cluster exists, whether an API key was valid, etc) had to be made available in &lt;em&gt;all&lt;/em&gt; of our spoke regions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5tl30zb06rribo1aebf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5tl30zb06rribo1aebf.png" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The hub region can read the platform data from the primary Aurora database, but where do the spoke regions read it from?&lt;/p&gt;

&lt;p&gt;But we also needed to avoid creating any critical path inter-regional dependencies. Whatever we ended up doing, we had to ensure that the failure of a single region could never impact clusters running in different regions.&lt;/p&gt;

&lt;p&gt;Easier said than done!&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 1: Multi-Region Aurora
&lt;/h3&gt;

&lt;p&gt;The first option we considered was to leverage AWS Aurora’s native multi-region functionality. Specifically, AWS Aurora has support for spawning read replicas in other regions. There are limits on how many additional regions can contain read replicas, and this approach would only work with AWS so we’d need a different solution for multi-cloud, but we thought this solution could be a good enough stop-gap in the short term to scale from a single region to a handful without much engineering work. We also really liked the idea of offloading the tricky problem of replicating a subset of our platform data to the AWS Aurora team.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzw98ugociiyxh57panc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzw98ugociiyxh57panc.png" width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Multi-region AWS Aurora cluster with the primaries in the hub region and read replicas in the spoke regions.&lt;/p&gt;

&lt;p&gt;Unfortunately, when we investigated further, we discovered that any unavailability of the primary Aurora region could result in the unavailability of the secondary region read replicas. If that ever happened to us, we’d end up in a terrible situation: all of our spoke regions and their associated clusters / Metadata Stores would still be running (thanks to the in-memory caches), but restarting or deploying the control plane nodes would cause an incident due to the in-memory caches being dropped and unable to be refilled.&lt;/p&gt;

&lt;p&gt;It turns out that multi-region functionality in Aurora is designed for a completely different use case: failing over regions fast when the primary region fails. Useful for that situation, but we wanted a solution that would never require manual intervention, so we ruled it out.&lt;/p&gt;

&lt;p&gt;We briefly considered migrating to a different database with better multi-region availability support like CockroachDB or Spanner, but we had no previous experience with these technologies, and migrating all of our platform data to a brand-new database technology felt like overkill.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 2: Smart (and durable) Caches
&lt;/h3&gt;

&lt;p&gt;Luckily, the platform data (like which virtual clusters exist and which API keys are valid) changes infrequently. So, another approach we considered was to query the source of truth (our us-east-1 Aurora database) from all subregions and then cache that data aggressively. For example, the first time a gateway node encountered an API key that it had not seen before, it would query Aurora in us-east-1 to determine if it was valid and then cache the result in memory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxdt8c722cs1knxpyegof.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxdt8c722cs1knxpyegof.png" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ap-southeast-1 spoke region querying the AWS Aurora cluster in us-east-1 to fill its in-memory caches.&lt;/p&gt;

&lt;p&gt;This approach was appealing because it would require only minimal code changes, and it took advantage of a strategy we were already employing within the primary region to be resilient against Aurora failures: in-memory caching. The Gateway nodes were already using a custom “smart” cache (internally referred to as the “loading cache”) that would fit the bill perfectly. This cache employs a number of tricks to make it suitable for critical use cases like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It automatically deduplicates cache fills. This eliminates the thundering herd problem.&lt;/li&gt;
&lt;li&gt;It incorporates &lt;em&gt;negative caching&lt;/em&gt; as a first-class concept, so if the Gateway nodes keep receiving requests for API keys that no longer exist, they don’t keep querying Aurora over and over again.&lt;/li&gt;
&lt;li&gt;It limits the &lt;em&gt;concurrency&lt;/em&gt; of cache fills so that a flood of requests with new and unique API keys results in the cache being filled at a continuous (and manageable) rate instead of flooding Aurora with queries.&lt;/li&gt;
&lt;li&gt;It implements &lt;em&gt;asynchronous background refreshes&lt;/em&gt; (again, with limited concurrency) so that changes in Aurora (like invalidating an API key) are eventually reflected back into the state of the in-memory caches. This ensures that in normal circumstances, when Aurora is available, invalidating an API key is reflected within seconds, but in rare circumstances where Aurora is unavailable, the API gateway nodes can keep running more or less indefinitely as long as they aren’t restarted.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This smart caching strategy had served us well within our primary region, but ultimately we decided that it wasn’t an acceptable solution to our multi-region data replication problem. A failure of the primary Aurora database in us-east-1 wouldn’t immediately impair the other regions, but it &lt;em&gt;would&lt;/em&gt; leave us unable to deploy or restart any of the control planes in our other regions until the availability of the Aurora database was restored. In other words, this approach suffered from the same problem as the Aurora read replicas approach.&lt;/p&gt;

&lt;p&gt;Briefly, we considered extending our existing loading cache implementation to be &lt;em&gt;durable&lt;/em&gt; so that we could restart control plane nodes, even when the primary Aurora database was down, without losing the data that had already been cached.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1e3iougcxfnxh0uvr3de.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1e3iougcxfnxh0uvr3de.png" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ap-southeast-1 spoke region querying the AWS Aurora cluster in us-east-1 to fill its in-memory caches, but then persisting the cached data to a local DynamoDB instance so that the Gateway nodes can still be restarted safely even if the primary Aurora cluster is unavailable.&lt;/p&gt;

&lt;p&gt;However, we also decided against that approach because it didn’t feel very stable. The system would function completely differently when the primary Aurora database was available than when it was unavailable, and we didn’t like the idea of relying heavily on an infrequently exercised code path for such critical functionality.&lt;/p&gt;

&lt;p&gt;Ultimately, we decided that while the loading cache was great for caching data &lt;em&gt;within&lt;/em&gt; a region, it was not an acceptable solution for replicating data &lt;em&gt;across&lt;/em&gt; regions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 3: Push-Based Replication (we chose this one)
&lt;/h3&gt;

&lt;p&gt;Both of the models we considered previously were “pull-based” models. Instead, we decided to pursue a “push-based” approach using a technique we’d learned at previous jobs called “contexts”. A Context is a bundle of metadata with the following characteristics:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Its values change slowly (if at all).&lt;/li&gt;
&lt;li&gt;The metadata is associated with specific clusters or tenants.&lt;/li&gt;
&lt;li&gt;The metadata needs to be made available on a large number of machines in a highly available manner.&lt;/li&gt;
&lt;li&gt;Availability is always favored over consistency, i.e., we’d rather use values that are several hours old than have the system fail entirely.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For example, one of the contexts we created is called the “cluster context” and it contains:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The cluster’s ID&lt;/li&gt;
&lt;li&gt;The cluster’s name&lt;/li&gt;
&lt;li&gt;The ID of the tenant (customer) the cluster belongs to&lt;/li&gt;
&lt;li&gt;A few additional internal fields are required for the Metadata Store to begin processing requests&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Building the contexts was straightforward. We wrote a job that scans the Aurora database every 10 minutes, builds the contexts, and then writes them as individual key-value pairs to a durable KV store in the relevant spoke regions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1s7ursk007962z9wxfq1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1s7ursk007962z9wxfq1.png" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Context publisher replicates context from the hub regions to the spoke regions.&lt;/p&gt;

&lt;p&gt;Of course, we pride ourselves on the fact that a new WarpStream cluster can be created in under a second, so forcing users to wait 10 minutes before their clusters were usable after creation wasn’t acceptable. Solving for this was easy though: when a new cluster is created (or any operation is performed that could result in a context being created or an existing one mutated), we submit an asynchronous request to the same job service that will trigger an update for that specific context immediately.&lt;/p&gt;

&lt;p&gt;This gives us the best of both worlds. Changes to the contexts (like a new cluster being created or an API key being revoked) are reflected in their associated subregions almost instantaneously, but in the worst-case scenario where we forget to issue the async update request in some code path (or it fails for some reason), the issue will automatically resolve itself within a few minutes. In other words, this approach is fast in the happy path, and self-healing in the non-happy path. Simple and easy to reason about.&lt;/p&gt;

&lt;p&gt;The primary downside of this approach is that it was a lot more work to implement. But we think it was worth it for a few reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We truly have zero inter-regional dependencies in the critical path. Instead, the primary region pushes updates to the sub-regions proactively, but the sub-regions &lt;em&gt;never&lt;/em&gt; query the primary region or create any external connections. In fact, the spoke regions aren’t even &lt;em&gt;aware&lt;/em&gt; of the hub region in any meaningful way. This makes reasoning about availability, reliability, and failure modes easy. We know the failure of one region will never impact other regions because no region takes dependencies on another region, so it can’t have any impact by definition.&lt;/li&gt;
&lt;li&gt;The context framework we created is broadly useful. For example, in the future we’ll use it to build out support for our own feature flagging system without taking on any additional external dependencies.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With this setup, we have been able to deploy our control plane in three additional new regions all over the world, and we would be ready to spawn more depending on customers’ needs.&lt;/p&gt;

</description>
      <category>streaming</category>
      <category>apachekafka</category>
      <category>datastreaming</category>
      <category>dataengineering</category>
    </item>
    <item>
      <title>Secure by default: How WarpStream’s BYOC deployment model secures the most sensitive workloads</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Mon, 10 Jun 2024 17:21:30 +0000</pubDate>
      <link>https://dev.to/warpstream/secure-by-default-how-warpstreams-byoc-deployment-model-secures-the-most-sensitive-workloads-257d</link>
      <guid>https://dev.to/warpstream/secure-by-default-how-warpstreams-byoc-deployment-model-secures-the-most-sensitive-workloads-257d</guid>
      <description>&lt;p&gt;by Caleb Grillo&lt;/p&gt;

&lt;h3&gt;
  
  
  Fundamentals of BYOC
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F67kuv7wj8bvq5hmlba4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F67kuv7wj8bvq5hmlba4f.png" width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WarpStream’s Zero Disk Architecture&lt;/p&gt;

&lt;p&gt;Typically, cloud data infrastructure products follow one of two deployment models:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Fully self-managed,&lt;/strong&gt; where the customer purchases a software license and support but is ultimately responsible for deploying and managing the software themselves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fully-hosted SaaS model&lt;/strong&gt; in which the vendor manages all the infrastructure in their own cloud environment and the customer simply receives an endpoint.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The Bring Your Own Cloud (BYOC) deployment model is a hybrid approach to cloud infrastructure that strikes a balance between these two extremes. Generally, it works like this: the software is split into two different components, a “data plane” (compute + storage) and a “control plane”. The control plane runs in the provider’s environment, and the data plane runs in the customer’s environment.&lt;/p&gt;

&lt;p&gt;This deployment model has several benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data privacy:&lt;/strong&gt; Because the data never leaves your environment, you have greater control over who has access to it and under what circumstances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data sovereignty:&lt;/strong&gt; Data is always stored on resources that you control, so you don’t need to worry about data finding its way to geographical regions where it shouldn’t be.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compliance:&lt;/strong&gt; The data plane is deployed in the customer environment, so strict compliance requirements can be fulfilled, and all traffic can be audited.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost optimization:&lt;/strong&gt; Because the infrastructure runs in your environment, you can control factors like instance types, networking configurations, and storage classes to optimize costs. You can also take advantage of committed use discounts, reserved instances, and savings plans to further optimize your costs. And perhaps most importantly for a networking-heavy system like Apache Kafka®, the combination of this deployment model and WarpStreams Zero Disk Architecture eliminates virtually all networking fees which can often account for more than 80% of the TCO of a traditional Kafka deployment..&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control:&lt;/strong&gt; You have control over the infrastructure that you deploy the software on, so you can choose your own networking topology, instance types, security settings, and storage services that you use.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;BYOC makes a lot of sense for mission-critical, data-intensive, and networking-heavy systems like Kafka where throughput is often measured in the hundreds or even thousands of MiBs per second. But historically, BYOC for Kafka has been limited to niche use cases because Kafka (and other equivalent systems) are so stateful and difficult to manage that remotely administering them is almost impossible.&lt;/p&gt;

&lt;h3&gt;
  
  
  The problem with BYOC for Kafka
&lt;/h3&gt;

&lt;p&gt;Kafka and its derivatives have stateful architectures, with local disks that store partitions that need to be actively managed in order to prevent a variety of issues like: hot partitions, unbalanced storage, under-replicated topic-partitions, etc. This is why there are so many vendors offering a fully-managed Kafka solution, but relatively few that offer a BYOC variant. Managing Kafka in your own environment is difficult enough, but managing Kafka in someone &lt;em&gt;else’s&lt;/em&gt; environment is even more challenging.&lt;/p&gt;

&lt;p&gt;Since Kafka clusters need to be constantly managed, existing BYOC deployment models for Kafka require providing the vendor with high level access to your environment so their personnel can keep the cluster healthy and mitigate incidents when they inevitably occur. The BYOC vendor often has the ability to manage a huge range of cloud infrastructure, including security policies and resources for your VPC, service accounts, subnetworks, IAM roles, firewall rules, and storage buckets.&lt;/p&gt;

&lt;p&gt;But wouldn’t it be better if external access wasn’t required at all?&lt;/p&gt;

&lt;h3&gt;
  
  
  Zero Access BYOC, secure by default
&lt;/h3&gt;

&lt;p&gt;WarpStream’s primary deployment model is BYOC, but it works a little bit differently from the rest. Unlike most BYOC deployment models, WarpStream was designed to operate with &lt;em&gt;no access&lt;/em&gt; to the environment that the Agents and object storage are running in. The only requirement for running the WarpStream Agents is that they have permission to access an object storage bucket in which they can store data, and that they have the ability to establish an outbound connection to the WarpStream Cloud control plane. That’s it. No IAM roles or permissive security policies are required.&lt;/p&gt;

&lt;p&gt;This is possible because WarpStream was designed from the ground up with a &lt;a href="https://www.warpstream.com/blog/zero-disks-is-better-for-kafka" rel="noopener noreferrer"&gt;Zero Disk Architecture&lt;/a&gt; with not only full separation of compute and storage, but also separation of &lt;a href="https://docs.warpstream.com/warpstream/overview/architecture" rel="noopener noreferrer"&gt;&lt;em&gt;data&lt;/em&gt; &lt;em&gt;from metadata&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt; This architecture makes managing the WarpStream Agents trivial. The Agents are just stateless compute, so there are no leader elections, no partition rebalances, no disk resizing, and no manual operations required to keep the cluster healthy. WarpStream clusters can be seamlessly scaled in, out, up, or down, with virtually no effort, just like a traditional web server.&lt;/p&gt;

&lt;p&gt;WarpStream leverages this Zero Disk Architecture to provide a very high level of service with very little external control by using a shared responsibility model that separates storage, compute, and metadata.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2dix6ss1qonqlhhrnjqp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2dix6ss1qonqlhhrnjqp.png" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The cloud provider manages the storage, the customer manages the stateless compute (I.E the WarpStream Agents), and WarpStream Cloud manages the metadata / consensus layer. This means that only metadata is transferred from your environment to WarpStream’s, and no raw data &lt;em&gt;ever&lt;/em&gt; leaves your environment.&lt;/p&gt;

&lt;p&gt;Of course, this zero-access BYOC deployment model does have a tradeoff: WarpStream users &lt;em&gt;are responsible&lt;/em&gt; for managing their own (stateless) compute. Fortunately, this is the one thing that &lt;em&gt;everyone&lt;/em&gt; running software in the cloud knows how to do: deploy and scale stateless containers! Of course, we do our best to make this easy by providing infrastructure as code primitives like our &lt;a href="https://registry.terraform.io/providers/warpstreamlabs/warpstream/latest/docs" rel="noopener noreferrer"&gt;Terraform Provider&lt;/a&gt; and &lt;a href="https://github.com/warpstreamlabs/charts/tree/main/charts/warpstream-agent" rel="noopener noreferrer"&gt;Helm chart&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In exchange for assuming responsibility for deploying and managing the stateless Agents, WarpStream’s users get a deployment model that exposes them to &lt;em&gt;far less risk&lt;/em&gt; of a data breach than any other cloud-native model. By design, there is &lt;em&gt;no way&lt;/em&gt; for WarpStream Cloud to access your data, even if WarpStream’s cloud account was breached by a hostile actor, or WarpStream was compelled by a government agency.&lt;/p&gt;

&lt;p&gt;In fact, WarpStream’s security model is so strong that we even have customers using it for their production workloads in AWS GovCloud regions. While no system can credibly claim to be 100% safe, WarpStream’s design lends itself to a stronger security posture than any of the BYOC products that came before.&lt;/p&gt;

&lt;h3&gt;
  
  
  Zero trust makes BYOC safe
&lt;/h3&gt;

&lt;p&gt;WarpStream makes the BYOC model safer and more secure than any alternative. This was a deliberate design choice that was made possible by WarpStream’s Zero Disk Architecture. With a zero-trust BYOC model, our customers truly get the best of both worlds: an (almost) fully managed user experience, but with all of the cost and security benefits of running on their own infrastructure.&lt;/p&gt;

&lt;p&gt;To learn more about WarpStream’s secure-by-default BYOC deployment model, &lt;a href="https://www.warpstream.com/contact-us" rel="noopener noreferrer"&gt;contact us&lt;/a&gt;. Or, if you’re ready to get started, you can &lt;a href="https://console.warpstream.com/signup" rel="noopener noreferrer"&gt;sign up&lt;/a&gt; and get up and running with WarpStream in just a few minutes. No credit card is required to get started, and your first $400 is on us.&lt;/p&gt;

</description>
      <category>apachekafka</category>
      <category>dataengineering</category>
      <category>datastreaming</category>
    </item>
    <item>
      <title>Announcing Bento, the open-source fork of the project formerly known as Benthos</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Fri, 31 May 2024 17:36:25 +0000</pubDate>
      <link>https://dev.to/warpstream/announcing-bento-the-open-source-fork-of-the-project-formerly-known-as-benthos-5ac7</link>
      <guid>https://dev.to/warpstream/announcing-bento-the-open-source-fork-of-the-project-formerly-known-as-benthos-5ac7</guid>
      <description>&lt;p&gt;by Richard Artoul&lt;/p&gt;

&lt;h3&gt;
  
  
  tl;dr
&lt;/h3&gt;

&lt;p&gt;Redpanda announced yesterday that they’ve acquired Benthos and immediately made sweeping changes to the project: commercially licensing some of the most important integrations, redirecting all Benthos sites to Redpanda sites, and rebranding the Discord community to Redpanda. So TL;DR — we are (reluctantly) forking the Benthos project, and maintaining it as a 100% free MIT-licensed open-source project, just like Benthos was before the acquisition.&lt;/p&gt;

&lt;h3&gt;
  
  
  Love at First Blob
&lt;/h3&gt;

&lt;p&gt;I first discovered the Benthos project serendipitously. I was browsing the /r/apachekafka subreddit and someone mentioned that they were using Benthos — a lightweight stream processing framework written in Go — as a simpler and more lightweight alternative to Kafka Connect. I was immediately intrigued. Kafka Connect is one of those projects in the data streaming space that &lt;em&gt;everyone&lt;/em&gt; uses and &lt;em&gt;everyone&lt;/em&gt; hates. A simpler and more performant alternative &lt;em&gt;written in Go&lt;/em&gt;, WarpStream’s native language, immediately piqued my interest.&lt;/p&gt;

&lt;p&gt;I Googled the project and fell in love with it pretty much right away. Unfortunately benthos.dev now redirects to a Redpanda docs site, but if you’ve never seen the original Benthos docs before, do yourself a favor and check out the &lt;a href="https://web.archive.org/web/20240520010651/https://benthos.dev/" rel="noopener noreferrer"&gt;old site&lt;/a&gt;. The home page (to me at least) is &lt;em&gt;perfect&lt;/em&gt;: crystal clear concise messaging with a clear explanation of the value proposition, but also cute and &lt;em&gt;hilariously&lt;/em&gt; entertaining in the best way. If that doesn’t immediately make you a fan of the project’s primary author Ashley Jeffs, then check out his Benthos rap video:&lt;/p&gt;

&lt;p&gt;After meeting Ashley in person at Kafka Summit London, we decided to bet on Benthos as the connect layer for WarpStream. We sponsored the project for the maximum amount allowed and (after asking and receiving Ashley’s explicit permission) &lt;a href="https://www.warpstream.com/blog/fancy-stream-processing-made-even-more-operationally-mundane" rel="noopener noreferrer"&gt;embedded Benthos directly into the WarpStream Agents&lt;/a&gt; to make it easy to integrate WarpStream with other systems and perform common lightweight stream processing tasks without needing to run any extra infrastructure. Then, a few weeks later, we &lt;a href="https://www.warpstream.com/blog/introducing-warpstream-managed-data-pipelines-for-byoc-clusters" rel="noopener noreferrer"&gt;launched Managed Data Pipelines&lt;/a&gt;, which brings a fully-managed model for managing streaming pipelines end to end, using the Benthos framework that we had already embedded into the Agents’ single Go binary.&lt;/p&gt;

&lt;p&gt;We know Ashley well and loved working with him. He’s done an incredible amount of work over the last 7 years to build and maintain Benthos. He personally made nearly 3,500 commits on the Benthos repo, built a strong community, and most importantly, wrote some amazing software. He’s earned every cent that Redpanda paid him for the acquisition, and we couldn’t be happier for him.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Acquisition
&lt;/h3&gt;

&lt;p&gt;When we heard that Redpanda was going to acquire Benthos, we thought they were going to continue developing the project the same way (and under the same license) that Ashley had for the last 7 years, and that they would incorporate the already-proprietary Benthos Studio into their product. Instead, in less than 12 hours they:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Changed the name of the project from Benthos to “Redpanda Connect”, and &lt;a href="https://x.com/emaxerrno/status/1796219957589786810" rel="noopener noreferrer"&gt;prohibited anyone from using the term “Benthos&lt;/a&gt;.” 1&lt;/li&gt;
&lt;li&gt;Posted messages in both the Benthos Discord server and the #benthos channel in the Gophers Slack community encouraging community members to migrate to Redpanda’s Slack community instead.&lt;/li&gt;
&lt;li&gt;Rebranded the Benthos Discord server to “Redpanda”.&lt;/li&gt;
&lt;li&gt;Moved the Benthos Github repo to Redpanda’s repo, and split it into two repos with &lt;em&gt;two different licenses&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Started relicensing some of the most critical integrations and connectors as proprietary2 under a completely different license, &lt;em&gt;including some of the integrations that were written by open source contributors&lt;/em&gt; who were not involved in the acquisition.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In just a few hours, Redpanda took a 7 year old open source project with nearly 8,000 stars on GitHub, hundreds of contributors, and thousands of users and began transitioning it to a proprietary software model.&lt;/p&gt;

&lt;p&gt;We don’t really care what the GitHub repository is called, or how the Discord server is branded. In fact, if you go to &lt;a href="https://docs.warpstream.com/warpstream/configuration/integrations" rel="noopener noreferrer"&gt;our docs&lt;/a&gt;, you’ll see Redpanda Console displayed prominently as an integration because it’s a great product that helps our users get the most out of WarpStream, and we’re not afraid to give credit where credit is due_._&lt;/p&gt;

&lt;p&gt;But we &lt;em&gt;do&lt;/em&gt; care about the license change, and making sure that we’re not infringing on any trademarks (real, or imagined). And perhaps most importantly…Benthos rocks. People should be able to continue to use it freely without worrying about when the commercialization bell might toll.&lt;/p&gt;

&lt;p&gt;Back to WarpStream, though: our unique BYOC deployment model means that our customers deploy our code and binaries into &lt;em&gt;their&lt;/em&gt; environments. &lt;em&gt;Some&lt;/em&gt; of the code in the core Redpanda Connect repo is still MIT-licensed, and we &lt;em&gt;technically&lt;/em&gt; could have kept using &lt;em&gt;some&lt;/em&gt; of it, but we couldn’t wait around to find out what the next change would be. We have to ensure that one of our most critical dependencies is being stewarded in a thoughtful and responsible manner. We also cannot, in good conscience, include any software dependencies containing mixed or muddled licensing that could be subject to change (again) at a moment’s notice. Our customers deserve more stability and predictability than that.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Fork
&lt;/h3&gt;

&lt;p&gt;When we started WarpStream, we didn’t see ourselves becoming the maintainers of a major open-source project. In fact, we explicitly decided to &lt;em&gt;not&lt;/em&gt; make WarpStream “open core” or “source available” from Day 1 because we hated the &lt;a href="https://www.warpstream.com/blog/the-original-sin-of-cloud-infrastructure" rel="noopener noreferrer"&gt;perverse incentives&lt;/a&gt; of that business model: hack distribution under the umbrella of “open source” for zero to one, and then pull the rug later by gating features, changing licenses, or crippling the open source project after the fact once critical mass has been achieved.&lt;/p&gt;

&lt;p&gt;I’ll say it explicitly: We &lt;em&gt;really&lt;/em&gt; didn’t want to create a fork. But we think that this is the only responsible thing to do given what’s happened already in just a few hours since the acquisition was announced.&lt;/p&gt;

&lt;p&gt;So, we’re forking Benthos. We’ll be maintaining our fork as a free, open source, 100% MIT licensed project, just like Benthos was before.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg2hkir6ljzj41gr5toc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg2hkir6ljzj41gr5toc.png" width="680" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Benty the Bento Box is not happy about the fork.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We’re calling our fork Bento3, an homage to the Benthos name but separate and distinct from what is now called Redpanda Connect. We were proud to sponsor the Benthos project when it was an independent open-source project, and now we’re looking forward to fostering a new project to carry on where Benthos left off.&lt;/p&gt;

&lt;p&gt;We hope Bento becomes a place where the Benthos community can land and contribute to the project in the same spirit that the Benthos project once had — but if that doesn’t happen, that’s fine by us. We’ll keep maintaining it because our product, WarpStream Managed Data Pipelines, relies on it.&lt;/p&gt;

&lt;p&gt;You can find &lt;a href="https://github.com/warpstreamlabs/bento" rel="noopener noreferrer"&gt;the new Bento repository here&lt;/a&gt;, as well as a hosted version of the &lt;a href="https://warpstreamlabs.github.io/bento/" rel="noopener noreferrer"&gt;original docs&lt;/a&gt; in all their glory.&lt;/p&gt;

&lt;p&gt;You might be thinking, “Wait a minute, isn’t WarpStream just another corporation? Why should I spend my time contributing to &lt;em&gt;their&lt;/em&gt; project if they can just take my contributions at any time and commercialize them?”. Bento is 100% MIT licensed and will stay that way forever. In addition, we want to move to a shared governance model, with other official maintainers, and create an independent structure. However, before we can do that, we first need to find some other maintainers!&lt;/p&gt;

&lt;p&gt;So, if your company has &lt;em&gt;any&lt;/em&gt; commercial interest in Benthos (even if you’re a competitor!) and is worried about the recent ownership and licensing changes, please let us know. We’d love to collaborate on contributions, bring you in as an official maintainer, create an independent Github organization with dedicated CI/Docker infrastructure, and establish a formal governance structure.&lt;/p&gt;

&lt;p&gt;So please, join us: check out &lt;a href="https://github.com/warpstreamlabs/bento" rel="noopener noreferrer"&gt;the new repository&lt;/a&gt;, &lt;a href="https://warpstreamlabs.github.io/bento/" rel="noopener noreferrer"&gt;docs website&lt;/a&gt; (new domain coming soon), or even just &lt;a href="https://www.warpstream.com/contact-us" rel="noopener noreferrer"&gt;get in touch&lt;/a&gt; if you want to learn more about Bento or participate in stewarding the project.&lt;/p&gt;

&lt;p&gt;P.S we hate that Benty is an ai-generated mascot. If you’re a talented illustrator with some ideas, please &lt;a href="https://www.warpstream.com/contact-us" rel="noopener noreferrer"&gt;reach out&lt;/a&gt; as well (we pay well!).‍&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Footnotes&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We’re pretty sure this isn’t how copyrights, software licensing, and trademarks work (like, at all), but we also didn’t feel like arguing about it, or getting the lawyers involved.&lt;/li&gt;
&lt;li&gt;This relicensing was done with the &lt;a href="https://techcrunch.com/2024/05/30/redpanda-acquires-benthos-to-expand-its-end-to-end-streaming-data-platform/?guccounter=1" rel="noopener noreferrer"&gt;justification&lt;/a&gt; that “all the users that are using those services are used to paying for the integration with those services.” This seemed to us like a clear signal of more potentially hostile things to come.&lt;/li&gt;
&lt;li&gt;Yes, this is the best we could come up with. If you’re good at naming things, &lt;a href="https://www.warpstream.com/contact-us" rel="noopener noreferrer"&gt;we’re hiring&lt;/a&gt; our first Product Marketer!&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>benthos</category>
      <category>dataengineering</category>
      <category>datastreaming</category>
      <category>redpanda</category>
    </item>
    <item>
      <title>Zero Disks is Better (for Kafka)</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Tue, 28 May 2024 17:59:34 +0000</pubDate>
      <link>https://dev.to/warpstream/zero-disks-is-better-for-kafka-3eja</link>
      <guid>https://dev.to/warpstream/zero-disks-is-better-for-kafka-3eja</guid>
      <description>&lt;p&gt;by Richard Artoul&lt;/p&gt;

&lt;h3&gt;
  
  
  Zero Disk Architectures
&lt;/h3&gt;

&lt;p&gt;In our previous post, we discussed &lt;a href="https://www.warpstream.com/blog/tiered-storage-wont-fix-kafka" rel="noopener noreferrer"&gt;why tiered storage won’t fix Kafka&lt;/a&gt; and how it will actually make your Kafka workloads &lt;em&gt;more&lt;/em&gt; unpredictable and &lt;em&gt;more&lt;/em&gt; difficult to manage. The fundamental problem with tiered storage is that it only gets rid of &lt;em&gt;some&lt;/em&gt; of the disks. Even if we minimized the amount of time that data was buffered on the local broker disks to &lt;em&gt;1 minute&lt;/em&gt;, all of the issues in our previous post would still remain.&lt;/p&gt;

&lt;p&gt;Tiered storage is all about using fewer disks. But if you could rebuild streaming from the ground up for the cloud, you could achieve something a lot better than fewer disks — zero disks. As we’ll demonstrate in the rest of this post (using WarpStream as a concrete example), the difference between some disks and zero disks is night and day. Zero Disk Architectures (ZDAs), with everything running directly through object storage with no intermediary disks, is better if you can tolerate a little extra latency. Much better.&lt;/p&gt;

&lt;p&gt;Don’t just take it from me, though. Less than one year after our initial product launch and announcement that “&lt;a href="https://www.warpstream.com/blog/kafka-is-dead-long-live-kafka" rel="noopener noreferrer"&gt;Kafka is Dead, Long Live Kafka&lt;/a&gt;”, almost every other vendor on the market (Confluent included) has announced their plans to follow suit and retrofit their existing architectures over the next few years. With Confluent effectively abandoning the official open-source project in favor of their proprietary Kafka-compatible cloud product, it’s safe to say that Apache Kafka is well and truly dying, and what will live on is the protocol itself.&lt;/p&gt;

&lt;p&gt;That said, I think that the industry conversations around Zero Disk Architectures have missed the forest for the trees by focusing exclusively on reducing costs. Don’t get me wrong, reducing the cost of using Kafka by an order of magnitude is a huge deal that cannot be understated, but it’s also only one small part of a much broader story.&lt;/p&gt;

&lt;p&gt;In the rest of this post, I will do my best to tell the rest of the story and explain how WarpStream’s Zero Disk Architecture enables developers to do &lt;em&gt;so much more&lt;/em&gt; than they ever could before, not just because they reduce costs by an order of magnitude, but because the architecture &lt;em&gt;itself&lt;/em&gt; enables radically new functionality and deployment strategies that were previously impossible.&lt;/p&gt;

&lt;p&gt;Specifically, I’ll cover three different topics that have been left out of the conversation so far and explain how Zero Disk Architectures:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;They are radically simpler and eliminate huge amounts of complexity and operational burden.&lt;/li&gt;
&lt;li&gt;Enable completely novel functionality that was previously impossible.&lt;/li&gt;
&lt;li&gt;Heavily tilt the scales in the SaaS vs. BYOC debate in favor of a completely new “Zero Access” BYOC model, at least for Kafka and the data streaming space.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Maximum Simplicity
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Stateless compute enables elastic scaling
&lt;/h3&gt;

&lt;p&gt;Let’s start with the basics. The most obvious benefit of WarpStream’s Zero Disk Architecture is auto-scaling. Since the “brokers” (Agents in WarpStream’s case) are completely stateless with zero local disks, they can be trivially auto-scaled in the same way that a traditional stateless web application can: add containers when CPU usage is high, and take them away when it’s low. No custom tooling, scripts, or Kubernetes operator required. In fact, when deployed in Kubernetes, WarpStream Agents are deployed using a Deployment resource just like a traditional stateless web server, not a StatefulSet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31rp6myd27iipa7b9xll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31rp6myd27iipa7b9xll.png" width="800" height="698"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WarpStream cluster auto-scaling in ECS&lt;/p&gt;

&lt;p&gt;The graph above shows a real WarpStream cluster auto-scaling automatically based on CPU usage. Think about just how many moving parts would be required to pull that off with a stateful system like Apache Kafka that has &lt;em&gt;any&lt;/em&gt; local disks or EBS volumes, and by contrast how it just falls out of the architecture, effectively for free, with WarpStream.&lt;/p&gt;

&lt;p&gt;This operational simplicity completely changes how developers run and use the software. The number of users of existing data streaming products who can actually take advantage of anything remotely resembling actual auto-scaling is infinitesimally small. By contrast, &lt;em&gt;almost every&lt;/em&gt; WarpStream BYOC customer is leveraging auto-scaling. It’s so easy that it becomes the default.&lt;/p&gt;

&lt;h3&gt;
  
  
  Isolate workloads with Agent Groups
&lt;/h3&gt;

&lt;p&gt;Another benefit of WarpStream’s simple architecture is that since no Agent is “special” and any Agent can handle writes or reads for any topic-partition, massively scaling out writes or reads on a moment’s notice &lt;em&gt;is&lt;/em&gt; feasible, just like with a traditional data lake.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz37dfdx06bdetoux9nb1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz37dfdx06bdetoux9nb1.png" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re worried that your massive data lake queries will interfere with your production workloads, you can just deploy an entirely new “group” of dedicated nodes whose only job is to act as thick proxies/caches for the data lake workloads while a completely different (and isolated) set of nodes handles the transactional workloads.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgo3ulw49ja2ezn5nqt5y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgo3ulw49ja2ezn5nqt5y.png" width="800" height="642"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This approach brings the promise of HTAP to the data streaming space, with both transactional and analytical workloads completely isolated from each other but operating on the exact same dataset and with zero replication delay. No ETL is required.&lt;/p&gt;

&lt;p&gt;WarpStream calls this feature &lt;a href="https://docs.warpstream.com/warpstream/configuration/deploy/agent-groups" rel="noopener noreferrer"&gt;Agent Groups&lt;/a&gt; and it underpins a deeper insight about Zero Disk Architectures: they enable radically flexible &lt;strong&gt;topologies and deployment models&lt;/strong&gt;. For example, in addition to using Agent Groups to isolate transactional workloads from analytical ones, you can also use this feature to completely isolate producers from consumers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhsw4cn1ifytpbbxhciy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhsw4cn1ifytpbbxhciy.png" width="800" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Agent Groups can also be used to sidestep networking barriers entirely by deploying different groups of Agents into different VPCs, cloud accounts, or even regions and using the object storage bucket as the shared network layer:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8in4c3fen16y4bjaeatr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8in4c3fen16y4bjaeatr.png" width="800" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This makes it trivial to create single logical clusters that span traditional cloud networking boundaries in an easy, simple, and cost-effective manner. While this may seem “boring”, in practice, many modern organizations need their data to be available across multiple “environments” and without the ability to leverage the object storage layer as a network, they have to resort to a complex, brittle, and &lt;em&gt;expensive&lt;/em&gt; mess of solutions involving VPC peering, NAT gateways, load balancers, private links, and other exotic cloud networking products. With WarpStream, traditional cloud networking can be bypassed entirely in favor of using the object store itself as the network.&lt;/p&gt;

&lt;p&gt;I know what you’re thinking at this point: “Come ON Richie, I thought this was going to be a cool article about some brand new whiz bang tech. Cloud networking!? Really? Who cares!?” And I get it. Cloud networking &lt;em&gt;is&lt;/em&gt; mind-numbingly boring. But it is also &lt;em&gt;really&lt;/em&gt; important, especially for Kafka, because Kafka is the beating heart of many organizations’ tech stack. It powers their internal observability pipelines, enables different teams to share data with each other, serves as the source of truth write ahead log for internal databases, enables CDC from operational datastores to analytical ones, and so much more. At its core, Kafka decouples the producer of a specific piece of data from its (often many) different consumers. None of that is possible if those producers and consumers are separated by an impermeable (technically or financially) network boundary.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integrate All the Things with Managed Data Pipelines
&lt;/h3&gt;

&lt;p&gt;Another great example of how Zero Disk Architectures enable completely novel functionality is that since the WarpStream Agents are completely stateless, they can be made significantly more feature-rich than traditional Kafka brokers. For example, imagine you’re using WarpStream to ingest application and AI/ML inference logs into an external system like ClickHouse. Another team requests that the data be made available as parquet files in object storage so that they can interact with it using a variety of different tools, and also because the security/compliance teams want a historical archive outside of Kafka.&lt;/p&gt;

&lt;p&gt;With WarpStream’s &lt;a href="https://www.warpstream.com/blog/introducing-warpstream-managed-data-pipelines-for-byoc-clusters" rel="noopener noreferrer"&gt;Managed Data Pipelines&lt;/a&gt;, all you have to do to enable this functionality is click a few buttons in the WarpStream UI and paste in this configuration file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input:
    kafka_franz_warpstream:
        topics:
            - logs
output:
    aws_s3:
        batching:
            byte_size: 32000000
            count: 0
            period: 5s
            processors:
                - mutation: |
                    root.value = content().string()
                    root.key = @kafka_key
                    root.kafka_topic = @kafka_topic
                    root.kafka_partition = @kafka_partition
                    root.kafka_offset = @kafka_offset
                - parquet_encode:
                    default_compression: zstd
                    default_encoding: PLAIN
                    schema:
                        - name: kafka_topic
                          type: BYTE_ARRAY
                        - name: kafka_partition
                          type: INT64
                        - name: kafka_offset
                          type: INT64
                        - name: key
                          type: BYTE_ARRAY
                        - name: value
                          type: BYTE_ARRAY
        bucket: $YOUR_S3_BUCKET
        path: parquet_logs/${! timestamp_unix() }-${! uuid_v4() }.parquet
        region: $YOUR_S3_REGION
warpstream:
    cluster_concurrency_target: 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The WarpStream Agents will now automatically consume the logs topic and generate the parquet files in S3. No custom code or additional services are required, and the entire data pipeline will run in &lt;em&gt;your&lt;/em&gt; cloud account, on &lt;em&gt;your&lt;/em&gt; VMs, and store data in &lt;em&gt;your&lt;/em&gt; object storage buckets.&lt;/p&gt;

&lt;p&gt;Now, if you’re an SRE or engineer who has ever been on-call for Apache Kafka, you might be feeling extremely uncomfortable right now. “Won’t that increase CPU usage on the Agents!?” The answer to that question is: “Yes.”, but also: “Who cares?”. The CPU auto-scaler will add more Agents if necessary without any manual intervention, and you can leverage WarpStream’s &lt;a href="https://docs.warpstream.com/warpstream/configuration/deploy/splitting-agent-roles" rel="noopener noreferrer"&gt;Agent Roles&lt;/a&gt; and &lt;a href="https://docs.warpstream.com/warpstream/configuration/deploy/agent-groups" rel="noopener noreferrer"&gt;Agent Groups&lt;/a&gt; functionality to run the data pipelines on isolated pools of Agents for larger workloads.&lt;/p&gt;

&lt;p&gt;Is this the most efficient way to perform this task at a massive scale? Definitely not. Is it a reasonable and extremely cost-effective solution for 99% of use-cases? Absolutely. Unlike Kafka brokers, WarpStream Agents are cattle, not pets, and can be treated as such.&lt;/p&gt;

&lt;h3&gt;
  
  
  Zero Access and BYOC-native
&lt;/h3&gt;

&lt;p&gt;The SaaS vs. BYOC debate has raged in the data streaming industry for a long time, and for good reason. To recap briefly: the BYOC deployment model is unbeatable in terms of unit economics and data sovereignty, which makes it very appealing for the highest scale workloads.&lt;/p&gt;

&lt;p&gt;However, legacy BYOC models come with a lot of trade-offs as well. For example, legacy BYOC doesn’t necessarily present as a “fully managed” service in the way that most customers would expect from a, well, “managed” service. Historically most of the BYOC solutions on the market were just repackaged versions of the same stateful datacenter software that end-users have been struggling with for almost a decade now. Having that stateful datacenter software managed inside the customer’s cloud account / VPC by the vendor certainly helps, but it also doesn’t eliminate all of the fundamental problems associated with running that software in the cloud in the first place.&lt;/p&gt;

&lt;p&gt;In addition, to make it all work, the customer has to grant the vendor high level cross-account IAM access and privileges so that when something inevitably goes wrong with one of the stateful components, the vendor can tunnel into the customer’s environment and manually fix it. This works, but it represents a huge security risk and liability for the customer, since the vendor (and all of their support staff) effectively have root access to the customer’s account and data.&lt;/p&gt;

&lt;p&gt;It’s easy to see why BYOC architectures occupy a unique niche in the space. They can dramatically reduce costs, but they also come with a lot of serious tradeoffs and risks. However, the emergence of Zero Disk Architectures changes the calculus significantly.&lt;/p&gt;

&lt;p&gt;Specifically, since all the tricky problems related to storage (durability, availability, scalability, etc) can be offloaded to the cloud provider’s object store implementation, it’s now feasible for the customer to manage all of the (now stateless) compute / data plane on their own, with zero cross-account IAM access or privileges granted to the vendor. This makes it impossible for the vendor to access the customer’s production environment or data.&lt;/p&gt;

&lt;p&gt;Of course, storage isn’t the only tricky part about running a data streaming system. The other part that can be really hard to manage is the metadata / consensus layer. That’s why WarpStream was designed from Day 1 with a “BYOC-native” architecture that not only separates compute from storage, but also &lt;em&gt;data&lt;/em&gt; from &lt;em&gt;metadata&lt;/em&gt;. This creates a shared responsibility model that looks something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvlglqklbvlh0yyi3m80.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvlglqklbvlh0yyi3m80.png" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Storage scaling is handled by the cloud provider, metadata scaling is handled by WarpStream Cloud, and compute scaling is trivially managed by the customer by auto-scaling on CPU usage. We think that’s a game changer because the end-user is responsible for only one thing: providing compute, and that’s the one thing that &lt;em&gt;everyone&lt;/em&gt; running software in the cloud knows how to do: schedule and run stateless containers.&lt;/p&gt;

&lt;p&gt;When a customer deploys WarpStream into their environment, they don’t grant WarpStream Cloud any permissions or give WarpStream engineers the ability to SSH into their environment in an emergency. Instead, they just deploy the single WarpStream Agent docker image into their environment, however they prefer to deploy containers. Everything “just works” as long as that container has access to an object storage bucket and can reach WarpStream’s control plane to handle metadata operations. There’s really nothing more to it. In fact, this model is so secure that we even have customers leveraging this model in GovCloud environments!&lt;/p&gt;

&lt;p&gt;In summary, this new “Zero Access BYOC-native” approach strengthens all of the core value propositions of existing BYOC deployment models (low costs, full data sovereignty), while also eliminating almost all of their drawbacks (remotely administering/scaling stateful storage services, security holes).&lt;/p&gt;

&lt;h3&gt;
  
  
  Zero Disk Architectures are Changing Everything (about Kafka)
&lt;/h3&gt;

&lt;p&gt;I’ll conclude with this: Zero Disk Architectures are going to transform the entire data streaming space as we know it. Everything from pricing to capabilities and even deployment models is going to be flipped entirely on its head. But right now, WarpStream is the only Zero Disk Architecture streaming system on the market that you can actually buy and use &lt;em&gt;today&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;If you’re an existing Kafka user who’s struggling with operations, costs, or lack of flexibility, there’s never been a better time to try something new. WarpStream’s BYOC product is cheaper to run than self-hosting Apache Kafka, and its Zero Disk Architecture means you’ll never have to deal with partition rebalancing, replacing nodes, broker imbalances, full disks, Zookeeper/Kraft, or fussy cloud networking products.&lt;/p&gt;

&lt;p&gt;‍&lt;a href="https://console.warpstream.com/signup" rel="noopener noreferrer"&gt;Click here&lt;/a&gt; to get started for free. No credit card is required, and your first $400 in platform fees is on us.&lt;/p&gt;

</description>
      <category>kafka</category>
      <category>apachekafka</category>
      <category>dataengineering</category>
      <category>realtimestreamingdat</category>
    </item>
    <item>
      <title>Pixel Federation Powers Mobile Analytics Platform with WarpStream, saves 83% over MSK</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Wed, 22 May 2024 15:31:37 +0000</pubDate>
      <link>https://dev.to/warpstream/pixel-federation-powers-mobile-analytics-platform-with-warpstream-saves-83-over-msk-3o58</link>
      <guid>https://dev.to/warpstream/pixel-federation-powers-mobile-analytics-platform-with-warpstream-saves-83-over-msk-3o58</guid>
      <description>&lt;p&gt;by Caleb Grillo&lt;/p&gt;

&lt;h3&gt;
  
  
  Case Study
&lt;/h3&gt;

&lt;p&gt;‍&lt;a href="https://portal.pixelfederation.com/" rel="noopener noreferrer"&gt;Pixel Federation&lt;/a&gt; is the developer of nearly a dozen highly popular mobile games with players from all over the world. They have millions of monthly active users, and those millions of users generate &lt;em&gt;lots&lt;/em&gt; of events. In fact, Pixel Federation uses an event-driven architecture for almost everything: logging, events, billing, tracking game state, etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxn68c0jq9wij2za2dx9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxn68c0jq9wij2za2dx9.png" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TrainStation2 by Pixel Federation&lt;/p&gt;

&lt;p&gt;Like many other companies, Pixel Federation initially chose Apache Kafka as the message bus to power all of its real-time data streaming infrastructure. Instead of running open-source Kafka themselves, it started with AWS’s managed Kafka offering: MSK.&lt;/p&gt;

&lt;p&gt;Initially, things worked great: developers found that instrumenting their applications to emit new events to Kafka was easy, and once other teams at the company realized how easy it was to tap into the flow of real-time data, they started consuming the data as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgs40o9j3w09yz0k6lwsi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgs40o9j3w09yz0k6lwsi.png" width="800" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before they knew it, Pixel Federation’s Kafka cluster had thousands of different topics, more than forty different consumer applications, and was being accessed by Kafka client libraries in 4 different languages. It’s no exaggeration to say that Kafka was the beating heart of Pixel Federation’s data infrastructure.&lt;/p&gt;

&lt;p&gt;Unfortunately, this is also when they started to run into problems with their MSK setup. The first problem they ran into was that their bill was growing &lt;em&gt;much&lt;/em&gt; faster than their actual data volumes were because they had so many different topics. MSK requires that Kafka brokers are upgraded to larger and larger VMs as the number of topic-partitions increases, even if data volumes remain flat.&lt;/p&gt;

&lt;p&gt;The second issue, besides cost, is that like many organizations, Pixel Federation has a complex production environment with different VPCs and AWS accounts. This works great for isolating teams, enforcing security boundaries, and minimizing blast radiuses, but sometimes data in Kafka needs to be shared across network boundaries. For example, Pixel Federation’s game servers run in a completely different AWS account / VPC than their Flink consumers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftrlyuu8t99gcf4ckds33.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftrlyuu8t99gcf4ckds33.png" width="800" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This meant that they had to peer their VPCs so that the MSK cluster in VPC1 could be connected to VPC2. If you’ve ever had to set up VPC peering before, you know just how difficult and burdensome it can be. MSK does offer an alternative using their multi-VPC private connectivity feature, but it adds an extra &lt;a href="https://aws.amazon.com/msk/pricing/" rel="noopener noreferrer"&gt;$0.006 / GiB of data transferred&lt;/a&gt;&lt;em&gt;.&lt;/em&gt; In addition, Pixel Federation had to pay for inter-zone networking for all the traffic between their producers and the MSK brokers, as well as for the traffic between MSK and their consumers. Their average read amplification was 4x, so this resulted in a lot of inter-zone networking fees.&lt;/p&gt;

&lt;p&gt;When they migrated to WarpStream, Pixel Federation took advantage of of WarpStream’s &lt;a href="https://docs.warpstream.com/warpstream/configuration/deploy/agent-groups" rel="noopener noreferrer"&gt;Agent Groups&lt;/a&gt; functionality to deploy a much more cost effective architecture instead:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsj910fop9eclqq8r2h0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsj910fop9eclqq8r2h0.png" width="800" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They run a group of Agents in the AWS account / VPC that contains their game servers (the data producers) and those Agents write data directly to an object storage bucket that is shared across both of their AWS accounts. In the second AWS account / VPC, they run a second group of Agents that can consume the data written in the other account via the shared object store. In effect, they use a shared object storage bucket as both the storage layer &lt;em&gt;and the networking layer&lt;/em&gt; to flex a single logical “Kafka” cluster across two different AWS accounts / VPCs.&lt;/p&gt;

&lt;p&gt;This architecture is significantly more cost-effective than their previous MSK solution because they don’t have to pay for any EBS volumes or networking fees. In fact, before adopting WarpStream, Pixel Federation was spending more than $60,000/year on AWS MSK. By comparison, their total cost of ownership with WarpStream is &amp;lt; $10,000/year, a 6x savings on top of all the additional benefits they got with the migration, like the ability to use WarpStream Agents to flex their cluster across multiple VPCs, seamless auto-scaling, and no more manual partition rebalancing to keep their brokers evenly loaded.&lt;/p&gt;

&lt;p&gt;Adam Hamsik is the CEO and co-founder of &lt;a href="https://lablabs.io/" rel="noopener noreferrer"&gt;Labyrinth Labs&lt;/a&gt;, an AWS partner that has been working with PixelFederation for years helping them manage their cloud infrastructure. He had this to say:&lt;/p&gt;

&lt;p&gt;“We have been using Kafka in our application infrastructure for years, and I really liked its scalability and versatility, but in cloud environments, the cost of managed Kafka clusters can be quite significant. As good engineers, we are always looking for the newest innovation that can save us AWS costs. Working with WarpStream Labs was an absolute pleasure. They went above and beyond anyone else we have ever worked with and tuned their application to our needs.” — Adam Hamsik, CEO of Labyrinth Labs&lt;/p&gt;

&lt;h3&gt;
  
  
  Get Started
&lt;/h3&gt;

&lt;p&gt;If you’re ready to save money and reduce your operational burden, you can &lt;a href="https://console.warpstream.com/signup?utm_source=warpstream&amp;amp;utm_medium=blog&amp;amp;utm_campaign=pixel-federation-blog" rel="noopener noreferrer"&gt;sign up&lt;/a&gt; for WarpStream and get started in just a few minutes. New signups get $400 in free credit with no expiration, and no credit card is required to get started.&lt;/p&gt;

</description>
      <category>apachekafka</category>
      <category>kafka</category>
      <category>datastreaming</category>
      <category>dataengineering</category>
    </item>
    <item>
      <title>WarpStream Newsletter #3: Always Be Shipping</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Fri, 17 May 2024 14:36:58 +0000</pubDate>
      <link>https://dev.to/warpstream/warpstream-newsletter-3-always-be-shipping-434h</link>
      <guid>https://dev.to/warpstream/warpstream-newsletter-3-always-be-shipping-434h</guid>
      <description>&lt;p&gt;Welcome to the third issue of the WarpStream Newsletter!&lt;/p&gt;

&lt;p&gt;We have added a ton of new features since our last newsletter, and we’re excited to share them all with you in this update. We also started a &lt;a href="https://campaigns-events.was-1.onpdr.com/track/link/v2_y10xn4ev41/d8pqmuz0afdrs4nz25h3n9ljo/v2_bwj1w5l1ey" rel="noopener noreferrer"&gt;YouTube channel&lt;/a&gt; that we’ll be using to share video content. Subscribe to our channel to stay up to date on conference talks, informational videos, interviews, and other content.&lt;/p&gt;

&lt;p&gt;Also, a few of us are in Bangalore for Kafka Summit this week. If you are attending Kafka Summit Bangalore, drop by our booth and say hello!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Join us on&lt;/strong&gt; &lt;a href="https://x.com/warpstream_labs" rel="noopener noreferrer"&gt;&lt;strong&gt;X&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;,&lt;/strong&gt; &lt;a href="https://warpstreamlab-uwt2030.slack.com/join/shared_invite/zt-20nj8a1v7-HVTTV_MCWsCH7pLuMuObvw#/shared-invite/email" rel="noopener noreferrer"&gt;&lt;strong&gt;Slack&lt;/strong&gt;&lt;/a&gt;, &lt;strong&gt;and ** &lt;a href="https://discord.com/invite/rSFx8vqjVY" rel="noopener noreferrer"&gt;&lt;strong&gt;Discord&lt;/strong&gt;&lt;/a&gt; **!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s new
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Blog post: Tiered Storage Won’t Fix Kafka
&lt;/h3&gt;

&lt;p&gt;The tiered storage architecture has been proposed as a solution to many of Kafka’s problems. Unfortunately, it doesn’t really live up to the hype.&lt;/p&gt;

&lt;p&gt;We released a &lt;a href="https://campaigns-events.was-1.onpdr.com/track/link/v2_y10xn4ev41/d8pqmuz0afdrs4nz25h3n9ljo/v2_7kvd54x12j" rel="noopener noreferrer"&gt;blog post&lt;/a&gt; this week discussing the fundamental flaws with tiered storage for Kafka. In this post, we argue in favor of a disk-less architecture, not a bolt-on solution that causes at least as many problems as it aims to solve. Check it out, and let us know what you think.&lt;/p&gt;

&lt;h3&gt;
  
  
  Blog post: Cloud Disks are (Really!) Expensive
&lt;/h3&gt;

&lt;p&gt;It’s a fact: disks are expensive in the cloud. But many Kafka users underestimate just &lt;em&gt;how expensive&lt;/em&gt; the disks actually are. So we wrote a &lt;a href="https://campaigns-events.was-1.onpdr.com/track/link/v2_y10xn4ev41/d8pqmuz0afdrs4nz25h3n9ljo/v2_2nyq2koq67" rel="noopener noreferrer"&gt;blog post&lt;/a&gt; that breaks down the cost of the local storage for a Kafka cluster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Support for multiple control plane regions
&lt;/h3&gt;

&lt;p&gt;You can now configure your BYOC clusters in WarpStream to communicate with an instance of the WarpStream control plane in three additional globally distributed regions in AWS. The supported regions are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;us-east-1&lt;/li&gt;
&lt;li&gt;us-west-2&lt;/li&gt;
&lt;li&gt;eu-central-1&lt;/li&gt;
&lt;li&gt;ap-southeast-1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To reduce round-trip request latency, configure your WarpStream agents to communicate with the control plane region that is geographically closest to where your agents are deployed. Review the documents to learn more.&lt;/p&gt;

&lt;p&gt;We also now support deploying Serverless clusters in both us-east-1 and ap-southeast-1.&lt;/p&gt;

&lt;p&gt;Setting up a new control plane region is straightforward, so you’re interested in another region, &lt;a href="https://campaigns-events.was-1.onpdr.com/track/link/v2_y10xn4ev41/d8pqmuz0afdrs4nz25h3n9ljo/v2_kv0dn8rdr3" rel="noopener noreferrer"&gt;let us know&lt;/a&gt; and we’ll deploy the control plane there.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add your team
&lt;/h3&gt;

&lt;p&gt;You can now invite your team members to your WarpStream account so you can collaborate in the same workspace. Navigate to the Teams page in the console to invite your team.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5j4u45j0l5zgviq4rs14.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5j4u45j0l5zgviq4rs14.png" width="800" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Support for mTLS
&lt;/h3&gt;

&lt;p&gt;WarpStream now supports mTLS between your clients and WarpStream agents. To learn more about how to configure this feature, &lt;a href="https://campaigns-events.was-1.onpdr.com/track/link/v2_y10xn4ev41/d8pqmuz0afdrs4nz25h3n9ljo/v2_xv71l2jqob" rel="noopener noreferrer"&gt;review the docs.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let us know if you have any questions!&lt;/p&gt;

&lt;h3&gt;
  
  
  Benthos integration (beta)
&lt;/h3&gt;

&lt;p&gt;The WarpStream Agent now has built-in support for &lt;a href="https://campaigns-events.was-1.onpdr.com/track/link/v2_y10xn4ev41/d8pqmuz0afdrs4nz25h3n9ljo/v2_mw3doky15x" rel="noopener noreferrer"&gt;Benthos&lt;/a&gt;, an open-source framework for streaming transformations and integrations. You can use Benthos to integrate WarpStream with other systems, such as databases and other messaging systems, using a simple, easy to use configuration.&lt;/p&gt;

&lt;p&gt;You can read more about WarpStream’s built-in Benthos support on our &lt;a href="https://campaigns-events.was-1.onpdr.com/track/link/v2_y10xn4ev41/d8pqmuz0afdrs4nz25h3n9ljo/v2_5m0q9bwd3x" rel="noopener noreferrer"&gt;blog&lt;/a&gt;. Or, check out our &lt;a href="https://campaigns-events.was-1.onpdr.com/track/link/v2_y10xn4ev41/d8pqmuz0afdrs4nz25h3n9ljo/v2_3pb1xvvdwm" rel="noopener noreferrer"&gt;docs&lt;/a&gt; to learn how to configure Benthos on WarpStream. This feature is currently in beta, so feel free to try it out and give us feedback.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interested in learning more about WarpStream?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://campaigns-events.was-1.onpdr.com/track/link/v2_y10xn4ev41/d8pqmuz0afdrs4nz25h3n9ljo/v2_rxkdk56d0p" rel="noopener noreferrer"&gt;&lt;strong&gt;Book a call&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s next
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Kafka Transactions
&lt;/h3&gt;

&lt;p&gt;The team is currently working on support for Transactions for Kafka. This is the last remaining major Kafka protocol feature missing from WarpStream. We expect to release support for Transactions in the next few weeks.&lt;/p&gt;

&lt;p&gt;Transactions are often used in stream processing workloads, so we are excited to be able to onboard those use cases! If you’re interested in learning more about our work in this area, &lt;a href="https://campaigns-events.was-1.onpdr.com/track/link/v2_y10xn4ev41/d8pqmuz0afdrs4nz25h3n9ljo/v2_kv0dn8rdr3" rel="noopener noreferrer"&gt;contact us&lt;/a&gt; and we would be more than happy to tell you about it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Built-in offset preserving replication
&lt;/h3&gt;

&lt;p&gt;One of the biggest hurdles to migrating to WarpStream is the ability to transparently migrate clients from a Kafka cluster to a WarpStream cluster. We are currently working on a solution that will provide replication for both data and metadata, so you can directly mirror a Kafka topic (or topics) from any Kafka (or Kafka-compatible) cluster to your WarpStream cluster. Unlike existing replication solutions, such as MirrorMaker, WarpStream’s built-in replication will also preserve offsets, so you will be able to transparently switch consumer clients from your Kafka cluster to WarpStream.&lt;/p&gt;

&lt;h3&gt;
  
  
  Schema Validation and Schema Registry
&lt;/h3&gt;

&lt;p&gt;We are currently working on building full schema validation into the Agent. This feature will work with an external schema registry. We will then follow up with our own implementation of a WarpStream schema registry, so soon you won’t have to run an external system to ensure that your data conforms to the expected schema.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://console.warpstream.com/signup?utm_source=warpstream_newsletter&amp;amp;utm_medium=blog&amp;amp;utm_campaign=issue_3" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;em&gt;Sign up and try WarpStream for free!&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;WarpStream is free to try.&lt;/em&gt;&lt;a href="https://console.warpstream.com/signup?utm_source=warpstream_newsletter&amp;amp;utm_medium=blog&amp;amp;utm_campaign=issue_3" rel="noopener noreferrer"&gt;&lt;em&gt;Sign up now&lt;/em&gt;&lt;/a&gt; &lt;em&gt;and discover how you can save 80% on your total cost of running Kafka.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>realtimestreamingdat</category>
      <category>dataengineering</category>
      <category>apachekafka</category>
      <category>kafka</category>
    </item>
    <item>
      <title>Introducing WarpStream Managed Data Pipelines for BYOC Clusters</title>
      <dc:creator>WarpStream</dc:creator>
      <pubDate>Tue, 14 May 2024 14:12:06 +0000</pubDate>
      <link>https://dev.to/warpstream/introducing-warpstream-managed-data-pipelines-for-byoc-clusters-2bli</link>
      <guid>https://dev.to/warpstream/introducing-warpstream-managed-data-pipelines-for-byoc-clusters-2bli</guid>
      <description>&lt;h3&gt;
  
  
  Stream processing made even more operationally mundane
&lt;/h3&gt;

&lt;p&gt;We &lt;a href="https://www.warpstream.com/blog/fancy-stream-processing-made-even-more-operationally-mundane" rel="noopener noreferrer"&gt;previously launched&lt;/a&gt; embedded support for Benthos in the WarpStream Agent, which enables WarpStream users to use Benthos without managing any additional infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://console.warpstream.com/signup/?utm_source=medium&amp;amp;utm_medium=blog&amp;amp;utm_campaign=smg" rel="noopener noreferrer"&gt;Sign up for a free WarpStream trial&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Today, we’re excited to announce that we have taken this feature a step further with &lt;a href="https://docs.warpstream.com/warpstream/configuration/benthos" rel="noopener noreferrer"&gt;WarpStream Managed Data Pipelines&lt;/a&gt;. A new feature for WarpStream BYOC clusters, Managed Data Pipelines provide a fully-managed SaaS user experience for Benthos, without sacrificing any of the cost benefits, data sovereignty, or deployment flexibility of the BYOC deployment model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fd4gaj4arusgwztcvg5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fd4gaj4arusgwztcvg5.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deploy multiple Pipelines from the WarpStream console&lt;/p&gt;

&lt;p&gt;Benthos is a lightweight stream processing framework that offers much of the functionality of Kafka Connect, as well as additional stream processing functionality like single message transforms, aggregations, multiplexing, enrichments, and more. It also has native support for WebAssembly (WASM) for more advanced processing.&lt;/p&gt;

&lt;p&gt;Previously, WarpStream was just a replacement for Apache Kafka®, but with Managed Data Pipelines WarpStream can do a lot more out of the box. For example, the WarpStream Agents can now directly connect with external systems, stream data between topics, perform on-the-fly data transformation, stream data into downstream systems, and much more, all with a simple YAML configuration.&lt;/p&gt;

&lt;p&gt;In addition to all the native features of Benthos, WarpStream Managed Data Pipelines also provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A user interface in the WarpStream Console for creating and editing pipelines.&lt;/li&gt;
&lt;li&gt;The ability to pause and resume pipelines on demand.&lt;/li&gt;
&lt;li&gt;Version control and branching allow you to easily deploy changes or roll configurations backwards as needed.&lt;/li&gt;
&lt;li&gt;Automatic handling of SASL authentication, ACLs, AZ-aware routing, and many other WarpStream-native features.&lt;/li&gt;
&lt;li&gt;Control over concurrency, with distribution managed by WarpStream and controlled with a single line in your configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzat0mapvyy1bnqvrqk4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzat0mapvyy1bnqvrqk4.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Control versioning and deployment from within the WarpStream console&lt;/p&gt;

&lt;p&gt;Managed Data Pipelines is the natural evolution of WarpStream’s BYOC product. In the same vein that WarpStream is a novel implementation of an open protocol with no vendor lock-in, Managed Data Pipelines is a cloud-native, BYOC-managed version of a &lt;a href="https://www.benthos.dev/" rel="noopener noreferrer"&gt;popular open-source stream processing framework&lt;/a&gt;, enhanced with WarpStream’s signature data plane/control plane split. Pipeline configuration, version control, clustering, and pipeline deployment are all administered remotely using a SaaS UX, but the actual pipelines &lt;em&gt;run&lt;/em&gt; in your cloud account, using &lt;em&gt;your&lt;/em&gt; compute resources and &lt;em&gt;your&lt;/em&gt; object storage buckets. Raw data never leaves your account.&lt;/p&gt;

&lt;p&gt;To learn more about how to use Managed Data Pipelines, check out the &lt;a href="https://docs.warpstream.com/warpstream/configuration/benthos" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, and if you have any questions, feel free to join our &lt;a href="https://console.warpstream.com/socials/slack" rel="noopener noreferrer"&gt;Slack community&lt;/a&gt;. You can &lt;a href="https://console.warpstream.com/signup" rel="noopener noreferrer"&gt;get started with WarpStream for free&lt;/a&gt;, with no credit card required, and start streaming with Managed Data Pipelines in just a few minutes.&lt;/p&gt;

</description>
      <category>kafka</category>
      <category>apachekafka</category>
      <category>dataengineering</category>
      <category>streamprocessing</category>
    </item>
  </channel>
</rss>
