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
Advanced Redis Techniques
Search
Russ Smith
March 13, 2013
Programming
670
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Advanced Redis Techniques
Talk given at the Las Vegas Ruby Group.
Russ Smith
March 13, 2013
Other Decks in Programming
See All in Programming
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
320
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
310
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.4k
App Intentsのビルドプロセスを支える技術
kntkymt
0
490
iOSDCのペンライトを自動制御したい!
akkeylab
0
340
FreeBSDでZabbixを動かす
kenkino
0
350
wkhtmltopdfの次どうするか問題2026
willnet
2
1.8k
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
170
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
20
20k
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
110
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
330
Documentation Writing (for coders)
carmenintech
77
5.6k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
The SEO Collaboration Effect
kristinabergwall1
1
580
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
320
Deep Space Network (abreviated)
tonyrice
0
350
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
310
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
510
Un-Boring Meetings
codingconduct
0
440
Balancing Empowerment & Direction
lara
6
1.3k
BBQ
matthewcrist
89
10k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
510
Transcript
Advanced Redis Techniques
Redis is an open source, BSD licensed, advanced key-value store.
It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
the basics
ca16403c13fc9 46:count":902} {KEY:VALUE} {"von:counter s:downloads:
lists[milk,egg s,cereal,baco n,salt,plates, oranges,lettu
{name:‘bob’,em ail:‘bob@gmail .com’,passwor d:‘password’} hashsES
So what makes it different?
Deep structural awareness in the storage layer.
push, pop, sets, sorted sets, pub/Sub, unions, intersect, etc
so what about the cool kids
Resque Sidekiq Fnordmetric VON leaderboard instagram spool twitter
USE the built in data structures
LPUSH mylist ‘work’ LPOP mylist => ‘work’
hset myhash count 0 hincrby myhash count 1 hget myhash
count => 1
zadd myzset 1 “jim” zadd myzset 2 “bob” zrange myzset
0 -1
store only what you need
TWEETID:USERID
USE the pipeline FOR roflscale
redis.pipelined do redis.set(‘foo’, ‘bar’) redis.incr(‘baz’) end
Optimize what you are storing
SET user:1234 5678
* 3,000,000 = 21gb
HSET ‘users:100’ ‘1234’ ‘5689’
* 3,000,000 = 5gb
hash-max-zipmap-entries 256 hash-max-zipmap-value 1024
Shard the data
lpush ‘users:20130313’ ‘bob’
GETting REALLY nerdy
setbit activeusers:20130313 231 1 setbit activeusers:20130313 102 1
devops tips
Write the data to disk
save 60 1000
Replicate for high availability & redundancy
slaveof 10.0.0.3
use Sentinel for automatic failover
None