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
730
0
Share
Probabilistic Data Structures
Learn how to use Probabilistic Data Structures and modules in Redis v4 to analyse logs.
cnu
September 03, 2017
More Decks by cnu
See All by cnu
Redisconf 2018: Probabilistic Data Structures
cnu
1
1.1k
The Rocky Road from Monolithic to Microservices Architecture
cnu
0
1.2k
AWS Lambda - Pycon India 2016
cnu
0
600
ZeroMQ - PyCon India 2013
cnu
2
1.6k
Other Decks in Programming
See All in Programming
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
340
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.8k
Symfony AI in Action - SymfonyLive Berlin 2026
chr_hertel
1
140
🦞OpenClaw works with AWS
licux
1
350
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
200
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
20k
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
AIと共に生きる技術選定 2026
sgash708
0
140
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
140
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1k
【ディップ|26年新卒研修資料】TDD実装演習
dip_tech
PRO
0
180
20260514_its_the_context_window_stupid.pdf
heita
0
920
Featured
See All Featured
Claude Code のすすめ
schroneko
67
220k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
260
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Odyssey Design
rkendrick25
PRO
2
610
Faster Mobile Websites
deanohume
310
31k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
350
Code Reviewing Like a Champion
maltzj
528
40k
A Tale of Four Properties
chriscoyier
163
24k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Why Our Code Smells
bkeepers
PRO
340
58k
Visualization
eitanlees
150
17k
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