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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
600
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
0
140
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
450
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.3k
入社1ヶ月でデータパイプライン講座を作った話
waiwai2111
1
250
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
340
GCASアップデート(202510-202601)
techniczna
0
250
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
370
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
GSIが複数キー対応したことで、俺達はいったい何が嬉しいのか?
smt7174
3
140
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.1k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Evolving SEO for Evolving Search Engines
ryanjones
0
120
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
47
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
220
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
100
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