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

推荐订阅源

博客园 - 三生石上(FineUI控件)
月光博客
月光博客
人人都是产品经理
人人都是产品经理
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
Vercel News
Vercel News
MyScale Blog
MyScale Blog
爱范儿
爱范儿
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
H
Help Net Security
Last Week in AI
Last Week in AI
阮一峰的网络日志
阮一峰的网络日志
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
宝玉的分享
宝玉的分享
博客园 - 聂微东
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
博客园 - 叶小钗
D
Docker

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.