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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Tobias Breitwieser
April 27, 2017
Technology
0
90
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
社内レビューは機能しているのか
matsuba
0
140
Keycloak を使った SSO で CockroachDB にログインする / CockroachDB SSO with Keycloak
kota2and3kan
0
150
銀行の内製開発にて2つのプロダクトを1つのチームでスクラムしてみてる話
koba1210
1
140
[JAWSDAYS2026]Who is responsible for IAM
mizukibbb
0
780
AWS DevOps Agent vs SRE俺 / AWS DevOps Agent vs me, the SRE
sms_tech
3
880
AIエージェント、 社内展開の前に知っておきたいこと
oracle4engineer
PRO
2
150
DevOpsエージェントで実現する!! AWS Well-Architected(W-A) を実現するシステム設計 / 20260307 Masaki Okuda
shift_evolve
PRO
3
910
わからなくて良いなら、わからなきゃだめなの?
kotaoue
1
370
Goのerror型がシンプルであることの恩恵について理解する
yamatai1212
0
100
CyberAgentの生成AI戦略 〜変わるものと変わらないもの〜
katayan
0
250
頼れる Agentic AI を支える Datadog のオブザーバビリティ / Powering Reliable Agentic AI with Datadog Observability
aoto
PRO
0
190
情シスのための生成AI実践ガイド2026 / Generative AI Practical Guide for Business Technology 2026
glidenote
0
270
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.1k
Balancing Empowerment & Direction
lara
5
940
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
240
Into the Great Unknown - MozCon
thekraken
40
2.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
130
The Invisible Side of Design
smashingmag
302
51k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
260
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Leo the Paperboy
mayatellez
4
1.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Curious Case for Waylosing
cassininazir
0
270
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