Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Probabilistic Data Structures
Search
cnu
September 03, 2017
Programming
0
660
Probabilistic Data Structures
Learn how to use Probabilistic Data Structures and modules in Redis v4 to analyse logs.
cnu
September 03, 2017
Tweet
Share
More Decks by cnu
See All by cnu
Redisconf 2018: Probabilistic Data Structures
cnu
1
1k
The Rocky Road from Monolithic to Microservices Architecture
cnu
0
1.1k
AWS Lambda - Pycon India 2016
cnu
0
540
ZeroMQ - PyCon India 2013
cnu
2
1.6k
Other Decks in Programming
See All in Programming
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2k
AtCoder Conference 2025
shindannin
0
880
AIエージェントの設計で注意するべきポイント6選
har1101
6
2.9k
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.3k
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
190
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.4k
[AI Engineering Summit Tokyo 2025] LLMは計画業務のゲームチェンジャーか? 最適化業務における活⽤の可能性と限界
terryu16
2
220
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
130
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
180
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
230
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
180
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
160
Featured
See All Featured
Information Architects: The Missing Link in Design Systems
soysaucechin
0
730
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
220
Odyssey Design
rkendrick25
PRO
0
450
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
390
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
65
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
New Earth Scene 8
popppiees
0
1.3k
Side Projects
sachag
455
43k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
590
Transcript
Probabilistic Data Structures in Redis
Srinivasan Rangarajan Head of Engineering
Srinivasan Rangarajan @cnu https://cnu.name
Agenda • Log Analysis • Redis V4 • Probabilistic Data
Structures
Log Analysis
Challenges • 100s of Millions of events processed every day
• Peak of ~10 Million events in an hour • Needs Realtime processing • Memory/Storage Requirements
Cost Accuracy Scale
None
Sample Event Data { "ip": "123.123.123.123", "client_id": 232, "user_id": "35827",
"email": "
[email protected]
", "product_id": "ABC-12345", "image_id": 3, "action": "pageview", "datetime": "2017-06-29T12:42:53Z", }
None
Redis Version 4 • Module system • Better Replication •
Cache eviction Improvements • Non-Blocking DEL and FLUSH* commands • Mixed RDB-AOF persistence format • MEMORY DOCTOR
Modules mikicon NounProject
Loading Modules • ./redis-server --loadmodule /path/to/module.so • redis.conf loadmodule /path/to/module.so
• MODULE LOAD /path/to/module.so
Execute a custom command
Probabilistic Data Structures
There are three kinds of people in the world. 1.
Those who can count. 2. Those who can’t count.
There are three kinds of people in the world. data
structures 1. Those who can count. 2. Those who can’t count. 3. Those who count approximately.
None
Advantage: Huge Memory Savings
3 Data Structures
HyperLogLog Count the Cardinality of a Set http://antirez.com/news/75
Count Unique Visitor / hour
Merge Hourly into Daily
TopK Get Top k Elements in a set https://github.com/RedisLabsModules/topk
Top k IP Addresses
None
CountMinSketch Count the frequency of items https://github.com/RedisLabsModules/countminsketch
User Pageview counter
Bloom Filters Test membership in a set https://github.com/RedisLabsModules/rebloom
Bloom Filters False Positives False Negatives
User Session checking
~3 Data Structures • HyperLogLog • TopK • CountMinSketch •
BloomFilter
Thank you
Follow me @cnu