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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.8k
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
3.2k
Spec-Driven Development with AI Agents (Workshop, May 2026)
antonarhipov
3
400
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
390
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
150
🦞OpenClaw works with AWS
licux
1
370
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
370
空間オーディオの活用
objectiveaudio
0
160
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
0
190
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
460
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
1
190
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
3.2k
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
How to Ace a Technical Interview
jacobian
281
24k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
350
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
330
Odyssey Design
rkendrick25
PRO
2
620
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
310
WCS-LA-2024
lcolladotor
0
590
Testing 201, or: Great Expectations
jmmastey
46
8.1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
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