Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Probabilistic Data Structures
Search
cnu
September 03, 2017
Programming
830
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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.2k
The Rocky Road from Monolithic to Microservices Architecture
cnu
0
1.3k
AWS Lambda - Pycon India 2016
cnu
0
690
ZeroMQ - PyCon India 2013
cnu
2
1.7k
Other Decks in Programming
See All in Programming
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Jetpack Compose Mechanisms
skydoves
3
800
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
740
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
Workers Cache を知る
syumai
0
360
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
140
Simple Storage Service(S3) is not simple
iwatsukayura
0
280
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
sbt 2.0: takeoff
eed3si9n
0
160
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
464
34k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Building AI with AI
inesmontani
PRO
1
1.3k
Optimizing for Happiness
mojombo
378
71k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
The Pragmatic Product Professional
lauravandoore
37
7.5k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
Docker and Python
trallard
47
4.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Paper Plane
katiecoart
PRO
5
54k
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