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
Advanced Redis Techniques
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Russ Smith
March 13, 2013
Programming
3
670
Advanced Redis Techniques
Talk given at the Las Vegas Ruby Group.
Russ Smith
March 13, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
190
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
560
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
940
AI & Enginnering
codelynx
0
110
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
CSC307 Lecture 08
javiergs
PRO
0
670
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
260
AI巻き込み型コードレビューのススメ
nealle
1
150
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
エンジニアに許された特別な時間の終わり
watany
106
230k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
55
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
53
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
88
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
300
Faster Mobile Websites
deanohume
310
31k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
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