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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
AWS Network Firewall Proxyを触ってみた
nagisa53
0
140
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
410
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
610
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
120
IaaS/SaaS管理における SREの実践 - SRE Kaigi 2026
bbqallstars
4
1.7k
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
180
Azure Durable Functions で作った NL2SQL Agent の精度向上に取り組んだ話/jat08
thara0402
0
150
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
2.8k
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
600
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
110
今日から始めるAmazon Bedrock AgentCore
har1101
4
400
Featured
See All Featured
Amusing Abliteration
ianozsvald
0
96
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
160
Context Engineering - Making Every Token Count
addyosmani
9
650
Ethics towards AI in product and experience design
skipperchong
2
190
Abbi's Birthday
coloredviolet
1
4.7k
Paper Plane
katiecoart
PRO
0
46k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
Designing Powerful Visuals for Engaging Learning
tmiket
0
220
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
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