<?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: Macky</title>
    <description>The latest articles on DEV Community by Macky (@macky_eb7f7eecd6680ad7772).</description>
    <link>https://dev.to/macky_eb7f7eecd6680ad7772</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4097524%2F74ad360f-1807-4859-a6b2-9d8a4cac3f26.png</url>
      <title>DEV Community: Macky</title>
      <link>https://dev.to/macky_eb7f7eecd6680ad7772</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/macky_eb7f7eecd6680ad7772"/>
    <language>en</language>
    <item>
      <title>Did You Know? Kafka Stores Your Messages on Disk 🤔</title>
      <dc:creator>Macky</dc:creator>
      <pubDate>Tue, 15 Sep 2026 13:18:37 +0000</pubDate>
      <link>https://dev.to/macky_eb7f7eecd6680ad7772/did-you-know-kafka-stores-your-messages-on-disk-3g3n</link>
      <guid>https://dev.to/macky_eb7f7eecd6680ad7772/did-you-know-kafka-stores-your-messages-on-disk-3g3n</guid>
      <description>&lt;p&gt;Most people assume that a high-performance messaging system like Kafka must be keeping everything in memory to stay fast.&lt;/p&gt;

&lt;p&gt;But here's the truth — every single message you produce to Kafka gets written to disk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First, let's go step by step — I'll start by creating a topic using this command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe6nmbd6fenm9sio649yf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe6nmbd6fenm9sio649yf.png" alt=" " width="798" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next, let's try producing a message using this command — I'll send the word "hellooooooo" to Kafka:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7ydhf9wr0xhhxtdki57t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7ydhf9wr0xhhxtdki57t.png" alt=" " width="796" height="81"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kafka will then store that message inside the container at this path:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/var/lib/kafka/data/test-topic-0/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frc7cpyms2st026yj814h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frc7cpyms2st026yj814h.png" alt=" " width="800" height="116"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;00000000000000000000.log&lt;/strong&gt;&lt;br&gt;
The actual data file. This is where Kafka stores your messages — including the "hellooooooo" we just produced. Every message gets appended here sequentially.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;00000000000000000000.index&lt;/strong&gt;&lt;br&gt;
An index file that maps offset → position in the .log file. So when a consumer wants message at offset 5, Kafka looks here first to find exactly where to jump in the .log file — without scanning the whole thing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;00000000000000000000.timeindex&lt;/strong&gt;&lt;br&gt;
Similar to .index but maps timestamp → offset. Useful when you want to find messages from a specific point in time, like "give me all messages after 10:00 AM."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;leader-epoch-checkpoint&lt;/strong&gt;&lt;br&gt;
Tracks which leader epoch this partition is on. Think of it as a version counter — every time a new leader is elected (e.g. after a broker crash), the epoch increments. This helps prevent data inconsistency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;partition.metadata&lt;/strong&gt;&lt;br&gt;
Stores basic metadata about this partition — like which topic ID it belongs to. Kafka uses this internally to manage the partition correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finally, let's peek inside the .log file to see what the actual stored data looks like:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fovcvglg568yfxljmp5ej.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fovcvglg568yfxljmp5ej.png" alt=" " width="798" height="31"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ET???????j???j&amp;amp;helloooooooooo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see the word "helloooooooooo" is right there — but it's not stored as plain text. The message is wrapped with binary metadata (the weird ET???????j???j&amp;amp; part) which includes things like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Offset&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Timestamp&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Checksum&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Message size&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So Kafka doesn't just dump your raw text — it wraps it in a binary format called a Record Batch before writing to disk. That's why you see those strange characters around your actual message.&lt;/p&gt;

</description>
      <category>kafka</category>
      <category>programming</category>
      <category>architecture</category>
      <category>testing</category>
    </item>
    <item>
      <title>How and why : introduce</title>
      <dc:creator>Macky</dc:creator>
      <pubDate>Tue, 15 Sep 2026 06:10:39 +0000</pubDate>
      <link>https://dev.to/macky_eb7f7eecd6680ad7772/how-and-why-introduce-9p8</link>
      <guid>https://dev.to/macky_eb7f7eecd6680ad7772/how-and-why-introduce-9p8</guid>
      <description>&lt;p&gt;Hey everyone! 👋&lt;/p&gt;

&lt;p&gt;I'm starting a new series where I'll be sharing things about the technology behind banking systems — what they use, how they handle massive loads, and why certain tech choices are made.&lt;/p&gt;

&lt;p&gt;But here's the thing — this series isn't just about the fancy stuff. I actually want to focus on the simple, foundational concepts that most people overlook, especially in the AI era where everyone just searches for a quick answer and moves on.&lt;/p&gt;

&lt;p&gt;And that's kind of the point. When we stop digging into how and why things work, we slowly lose that understanding. A search result gives you an answer — but it doesn't always give you the intuition behind it.&lt;/p&gt;

&lt;p&gt;That said — I'm not against AI at all. In fact, I'll be using AI to help me write code and speed up the process of experimenting with different approaches. AI is a great tool for moving faster, but understanding the fundamentals is what helps you actually know what to build and why it works.&lt;/p&gt;

&lt;p&gt;So whether you're a developer, someone curious about fintech, or just want to understand what's actually running under the hood of your banking app — this series is for you.&lt;/p&gt;

&lt;p&gt;Stay tuned, and feel free to follow along. More coming soon! 🚀&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>learning</category>
      <category>systemdesign</category>
    </item>
  </channel>
</rss>
