惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
博客园_首页
雷峰网
雷峰网
V
Visual Studio Blog
爱范儿
爱范儿
A
About on SuperTechFans
量子位
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
S
SegmentFault 最新的问题
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
🌸 Bloom Filters Explained Like You're 5
Sreekar Redd · 2026-05-14 · via DEV Community

Sreekar Reddy

Probably yes or definitely no

Day 139 of 149

👉 Full deep-dive with code examples


The Nightclub Bouncer Analogy

Imagine a nightclub bouncer with a list:

  • "Is this person on the banned list?"
  • Instead of checking the whole list, they have a quick mental system
  • Sometimes they might say "maybe on the list" when they're not
  • In a standard Bloom filter (with consistent hashing and only additions), they won't say "definitely not" when someone actually is in the set

Bloom Filters work like this bouncer!

Fast to check, might have false positives, and (in the standard version) no false negatives.

More precisely: in standard use (only adding items, consistent hashing, no corruption), Bloom filters are designed to avoid false negatives.


The Problem They Solve

Checking if something is in a huge set can be expensive (especially if the data lives on disk or across the network):

  • "Has this user already seen this article?"
  • "Is this email address in our database?"
  • "Is this URL malicious?"

Bloom filters help you quickly rule out "definitely not present" so you can skip unnecessary expensive lookups.


How Bloom Filters Work

Simple idea:

  1. Create a bit array (lots of zeros and ones)
  2. When adding item: run it through hash functions, set those bits to 1
  3. When checking item: run through same hashes, are all bits 1?
    • All ones? → Probably in the set
    • Any zeros? → Definitely NOT in the set

The Trade-Off

What you give up:

  • Can't be completely certain something IS in the set
  • Standard bloom filters don't support reliable deletion without extra bookkeeping

What you get:

  • Incredibly fast lookups
  • Very memory efficient
  • Certain when something is NOT in the set (as long as you only add items)

Note: Bloom filters are typically used as a fast pre-check. If it says "maybe", you still verify with the real data.


Real Uses

  • Web browsers → Is this URL in the malware list?
  • Databases → Is this key probably in this file?
  • Spell checkers → Is this probably a real word?
  • Social media → Has user already seen this post?

The Key Insight

Bloom filters are about speed vs certainty:

  • Traditional: Slow but exact
  • Bloom filter: Super fast, false positives possible, no false negatives

Perfect when "probably yes" is good enough!


In One Sentence

Bloom Filters quickly tell you if something is definitely not in a set, or maybe (but not certainly) is.


🔗 Enjoying these? Follow for daily ELI5 explanations!

Making complex tech concepts simple, one day at a time.