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
Redis for fun and profit
Search
mattg
August 25, 2012
Technology
2
160
Redis for fun and profit
A simple overview of redis
mattg
August 25, 2012
Tweet
Share
More Decks by mattg
See All by mattg
Open Source
mattg
3
190
Other Decks in Technology
See All in Technology
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
630
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
Lambdaと地方とコミュニティ
miu_crescent
2
370
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
The Role of Developer Relations in AI Product Success.
giftojabu1
0
140
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
OS 標準のデザインシステムを超えて - より柔軟な Flutter テーマ管理 | FlutterKaigi 2024
ronnnnn
1
260
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
660
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
200
Taming you application's environments
salaboy
0
200
強いチームと開発生産性
onk
PRO
35
11k
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Into the Great Unknown - MozCon
thekraken
32
1.5k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
How to train your dragon (web standard)
notwaldorf
88
5.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Transcript
Redis matt george 8/25/2012 Saturday, August 25, 12
@binarydud http://github.com/binarydud/redis-fun Saturday, August 25, 12
Redis is not ... Saturday, August 25, 12
Redis is not ... a replacement for your database. or
necessarily fault tolerant. Saturday, August 25, 12
WTF Saturday, August 25, 12
what is it? Saturday, August 25, 12
Key-Value Store Saturday, August 25, 12
Key-Value Store Data Structure Server Saturday, August 25, 12
why? Saturday, August 25, 12
if you... need key value store that’s very fast. have
a dataset that can fit into ram. are ok if not everything survives. Redis is very interesting! Saturday, August 25, 12
Data structure basics Saturday, August 25, 12
Strings Saturday, August 25, 12
String Basics SET key value GET key SETEX key seconds
value APPEND key value Saturday, August 25, 12
redis>get hello (nil) redis> set hello world OK redis>get hello
“world” String Basics Saturday, August 25, 12
String Basics INCR key DECR key INCRBY key value DECRBY
key value Saturday, August 25, 12
String Basics redis>incr stat1 1 redis> incrby stat1 2 3
redis> decr stat1 2 redis> get stat1 2 Saturday, August 25, 12
String Patterns session handling caching counter/stats Saturday, August 25, 12
Lists Saturday, August 25, 12
Lists LPUSH key value (B)LPOP key LRANGE key start stop
LLEN key LSET key index value LINDEX key index Saturday, August 25, 12
List Patterns stacks queues message passing Saturday, August 25, 12
Sets Saturday, August 25, 12
Sets SADD key member SREM key member SISMEMBER key member
SMEMBERS key SCARD key Saturday, August 25, 12
Hashes Saturday, August 25, 12
Hashes HSET key field value HDEL key field HKEYS keys
HLEN key HGETALL key Saturday, August 25, 12
Other Interesting Commands KEYS pattern DEL key RENAME key newkey
EXISTS key EXPIRE key PERSIST key Saturday, August 25, 12
Pub/Sub Saturday, August 25, 12
Pub/Sub SUBSCRIBE channel ... UNSUBSCRIBE channel ... PUBLISH channel message
Saturday, August 25, 12
Administration Saturday, August 25, 12
Persistence AOF Snapshots Saturday, August 25, 12
Replication master/slave slave chaining Saturday, August 25, 12
Server Commands redis> BGREWRITEAOF redis> BGSAVE redis> DBSIZE redis> INFO
redis> FLUSHALL redis> SLAVEOF host port Saturday, August 25, 12
Benchmarks SET: 47709.93 requests per second GET: 49900.20 requests per
second INCR: 47801.15 requests per second LPUSH: 49188.39 requests per second LPOP: 48355.90 requests per second SADD: 46970.41 requests per second SPOP: 50581.69 requests per second LPUSH: 47755.49 requests per second Saturday, August 25, 12
Demo Time aka, watch Matt flail in the command line
Saturday, August 25, 12
Caveats Saturday, August 25, 12
Questions? http://redis.io Saturday, August 25, 12