<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mert Çetin on Medium]]></title>
        <description><![CDATA[Stories by Mert Çetin on Medium]]></description>
        <link>https://medium.com/@mertcetiin?source=rss-8d7a77c5a327------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SfVu9mVW8vrnh7f3P94HcQ@2x.jpeg</url>
            <title>Stories by Mert Çetin on Medium</title>
            <link>https://medium.com/@mertcetiin?source=rss-8d7a77c5a327------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:34:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mertcetiin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Searching for a Needle in a Billion-Sized Haystack: Understanding Bloom Filters]]></title>
            <link>https://medium.com/@mertcetiin/searching-for-a-needle-in-a-billion-sized-haystack-understanding-bloom-filters-a5a61d6575d7?source=rss-8d7a77c5a327------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5a61d6575d7</guid>
            <dc:creator><![CDATA[Mert Çetin]]></dc:creator>
            <pubDate>Thu, 16 Apr 2026 07:58:18 GMT</pubDate>
            <atom:updated>2026-04-16T07:58:18.292Z</atom:updated>
            <content:encoded><![CDATA[<p>As developers, we often face the ultimate engineering trade-off: <strong>Speed, Accuracy, or Memory?</strong> Usually, we reach for a HashSet to check for an item&#39;s existence. But when your dataset grows to millions or billions, that &quot;legendary&quot; O(1) complexity starts devouring your RAM.</p><p>This is where the <strong>Bloom Filter</strong> — a probabilistic data structure from 1970 that still powers modern giants like Cassandra, RocksDB, and Google Chrome — comes to the rescue.</p><h3>What exactly is a Bloom Filter?</h3><p>A Bloom Filter is a memory-efficient, <strong>probabilistic</strong> data structure used to test whether an element is a member of a set. It is designed to tell you one of two things:</p><ol><li><strong>“Definitely Not”:</strong> The element is 100% not in the set.</li><li><strong>“Maybe”:</strong> The element might be in the set (but there’s a small chance it’s a False Positive).</li></ol><h3>The Engineering Logic: How It Works</h3><p>A Bloom Filter relies on two main components: an <strong>m-sized bit array</strong> and <strong>k independent hash functions</strong>.</p><ul><li><strong>Adding an Item:</strong> When you add a piece of data (e.g., a username), it is passed through k different hash functions. Each function outputs an index in the bit array, and those bits are set to 1.</li><li><strong>Querying:</strong> To check if an item exists, you hash it again using the same k functions.</li><li>If any of the bits at those indices are 0, the item is <strong>definitely not</strong> in the set.</li><li>If all bits are 1, the item <strong>might</strong> be there.</li></ul><h3>Why Use It? (Real-World Use Cases)</h3><p>It’s not just theory; it’s a backbone of modern distributed systems:</p><ul><li><strong>Preventing Unnecessary Disk I/O:</strong> Before hitting a database (DB) with a “Does this user exist?” query, you check the Bloom Filter. If it says “No,” you save a costly disk read.</li><li><strong>Malicious URL Filtering:</strong> Instead of downloading a massive list of millions of dangerous sites, your browser keeps a small Bloom Filter in memory to flag suspicious URLs.</li><li><strong>Medium’s Recommendation Engine:</strong> To avoid suggesting articles you’ve already read, Medium can use a per-user Bloom Filter. It’s far more efficient than storing every “Read Article ID” in RAM.</li></ul><h3>The Catch: “No Free Lunch”</h3><p>In engineering, every optimization has a cost:</p><ul><li><strong>No Deletions:</strong> In a standard Bloom Filter, you cannot delete an item. Setting a bit back to 0 might accidentally &quot;delete&quot; other items that share that same hash bit.</li><li><strong>False Positives:</strong> As the bit array fills up, the probability of false positives increases. Balancing <strong>m</strong> (array size) and <strong>k</strong> (number of hashes) is the key to a reliable filter.</li></ul><h3>Final Thoughts</h3><p>If your system involves expensive lookups (network requests, disk I/O) and you can tolerate an occasional “false alarm” in exchange for massive performance gains, the Bloom Filter is one of the most elegant tools in your arsenal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5a61d6575d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>