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
Russ Smith
March 13, 2013
Programming
670
3
Share
Advanced Redis Techniques
Talk given at the Las Vegas Ruby Group.
Russ Smith
March 13, 2013
Other Decks in Programming
See All in Programming
Building on Bluesky's AT Protocol with Ruby
mackuba
0
100
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
190
when storing skills in S3 file
watany
3
1.2k
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
140
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
27
19k
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
520
Symfony AI in Action - SymfonyLive Berlin 2026
chr_hertel
1
110
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
2
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
480
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
440
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.6k
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.7k
Statistics for Hackers
jakevdp
799
230k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
120
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
110
Facilitating Awesome Meetings
lara
57
6.8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
220
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