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 4
Search
Tobias Breitwieser
April 27, 2017
Technology
0
87
Redis 4
Tobias Breitwieser
April 27, 2017
Tweet
Share
More Decks by Tobias Breitwieser
See All by Tobias Breitwieser
Go - schlanke, parallele Software-Entwicklung
tarfu
0
130
Other Decks in Technology
See All in Technology
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
440
今日から始めるAmazon Bedrock AgentCore
har1101
4
400
配列に見る bash と zsh の違い
kazzpapa3
1
120
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
0
150
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
190
入社1ヶ月でデータパイプライン講座を作った話
waiwai2111
1
260
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
500
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
370
プロポーザルに込める段取り八分
shoheimitani
1
180
2026年、サーバーレスの現在地 -「制約と戦う技術」から「当たり前の実行基盤」へ- /serverless2026
slsops
2
220
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
150
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Tell your own story through comics
letsgokoyo
1
810
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Claude Code のすすめ
schroneko
67
210k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
690
Transcript
Redis 4 Tobias Breitwieser
None
Was ist Redis?
Was ist Redis? • Memcache like in-memory key/value store •
Persistierung auf Festplatte • Datentypen • Strings • Lists • Sets • Sorted Sets • Hash Tables • Pub/Sub Topics • Atomare Operationen • TTL für Keys • LUA scripting
Bestimmt schwer zu betreiben… Server: docker run --name some-redis -d
-p 6379:6379 redis CLI Client: docker run -it --rm redis redis-cli -h redis -p 6379 CLI Client with link: docker run -it --link some-redis:redis --rm redis redis-cli -h redis -p 6379
Nutzt das denn jemand? GitHub, Gitlab, Uber, Trello, Instagram, OpenStack,
Patreon, Medium, Kickstarter, StackOverflow, Flickr, Airbnb, Hulu, BitBucket, Disqus, Alibaba
Ein in-memory Cache … Was soll ich jetzt damit?
Strings
Locking/Synchronisation Lock erstellen: SET lock-key verification-token EX 60 NX Lock
lösen: DEL lock-key
Locking/Synchronisation Lock erstellen: SET lock-key verification-token EX 60 NX Lock
mit LUA: if redis.call("get",KEYS[1]) == ARGV[1] then return redis.call("del",KEYS[1]) else return 0 end EVAL <script> 1 lock-key verification-token
Lists
“Queue” Job hinzufügen: LPUSH queue “job payload” Job holen: RPOP
queue
Worker holt sich einen Job
Worker arbeitet
Worker stürzt ab
à
Reliable Queue Job hinzufügen: LPUSH queue “job payload” Job holen:
RPOPLPUSH queue inworkqueue Job aus der working queue entfernen: LREM inworkqueue 1 “job payload”
Pub/Sub
Messaging Abonnieren auf Channel: SUBSCRIBE channel1 Abonnieren auf Pattern: PSUBSCRIBE
channel*
Messaging Veröffentlichen auf Channel: PUBLISH channel message
Clustering
Master/Slave Replikation ist einfach: “SLAVEOF host port” Passwort für Master
auf Slave: “config set masterauth mypass” Passwort auf Master: “config set requirepass mypass”
Master fällt aus
None
5m später
None
Kein Failover
None
Sentinel • Überwachung der Master • Automatischer Schwenk des Masters
• Konfigurationsverwalter für Nodes
Cluster/Sharding • Sharding • Automatische Verteilung • Jeder Master kann
mehrere Slaves haben • Auto Failover
Cluster/Sharding • Funktioniert nicht hinter einer NAT • Funktioniert nicht
im Container • Ausnahme: Docker –net=host
Redis 4
Was ist neu? • Modules • Replication 2.0 • Redis
Cluster now NAT / Docker compatible
Modules • Können eigene Befehle implementieren • Können eigene Datentypen
implementieren
Modules • Können nicht auf eigene Initiative mit Redis kommunizieren
Replication 2.0
Nächster Talk … Reaktive Programmierung für alle! Warum? Wie? <Alex
Krause/> Mai 2017 > blog.cosee.biz > talks.cosee.biz