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マスターになる話
Search
mickey
January 22, 2018
0
110
超Redisマスターになる話
mickey
January 22, 2018
Tweet
Share
More Decks by mickey
See All by mickey
BINDからの卒業
happysiro
1
2.4k
SSl と仲良くなるやり方
happysiro
1
3.6k
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
73
5k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
4 Signs Your Business is Dying
shpigford
184
22k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Designing for humans not robots
tammielis
253
25k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Transcript
ࡾπݡҰ(.01FQBCP *OD 5FDI.5( 3FEJTϚελʔʹͳΔ
ΠϯϑϥΤϯδχΞ .JDLFZ ٕज़෦ΠϯϑϥνʔϜ
͍֮͑ͯ·͔͢ʜ
3FEJTϚελʔʹͳΕͨͰ͠ΐ͏͔ʜʁ
3FEJTϚελʔʹͳΕͨͰ͠ΐ͏͔ʜʁ wͰɺॳΓ͔ͨͬͨ3FEJTΛ)"ʹ͢Δ͜ͱͰ͖ͨͱࢥ͏Αʜ
3FEJTΛԽ͢Δ
3FEJT4FOUJOFMͬͯʁ w3FEJT4FOUJOFMQSPWJEFTIJHIBWBJMBCJMJUZGPS3FEJT
4FOUJOFMΛߏங͍ͯ͘͠
ߏ . 4̍ 3 4 3 4 w.3FEJTͷ.BTUFS w3ɺ3FEJTͷ 3FQMJDB
4MBWF w4ɺɺ4FOUJOFM
ߏ . 4̍ 3 4 3 4 w4FOUJOFMɺ༻ҙ͢Δඞ ཁ͕͋Γ·͢
ߏ . 4̍ 3 4 wωοτϫʔΫোʹΑΓεϐ ϦοτϒϨΠϯ͕ൃੜͨ͠ͱ ͖ɺΫϥΠΞϯτͷϚελʔ ͷॻ͖ࠐΈΛ͛ͳ͍͔Β wͩͱ͛Δͷͩɺͱ͍͏
ओுʹ͍ͭͯݕূΛਐΊͭ ͭ֬ೝ͍͖ͯ͠·͠ΐ͏ . 4̍ . 4
4FOUJOFMͷઃఆ bind 0.0.0.0 port 26379 # Ϋϥελͷ໊લɺࢹ͢ΔMasterͷIPͱportɺquorum sentinel monitor mymaster
10.200.0.149 6379 2 # master͕Ԡ͠ͳ͘ͳ͔ͬͯΒোͱஅ͢Δ·Ͱͷ࣌ؒ sentinel down-after-milliseconds mymaster 5000
RVPSVNʹ͍ͭͯ w4FOUJOFM.BTUFS͕ࢮ͵ͱɺओ؍తͳࢮɺTEPXOΛଞͷ4FOUJOFMʹใࠂ͢Δ w4FOUJOFMɺTEPXO͕RVPSVNͷ͚ͩू·Δͱɺ.BTUFS͕٬؍తʹࢮΜͩɺ PEPXOͩͱஅ͢Δ wͦ͏͢Δͱɺ୭͕ϑΣΠϧΦʔόʔΛ୲͢Δ͔ɺ୭Λ.BTUFSʹ͢Δ͔Λܾ ΊͯϑΣΠϧΦʔόʔΛ։࢝͢Δ
ಈ࡞ݕূ
.BTUFSͷো . 4̍ 3 4 3 4 wఆ͢Δڍಈ w4ͱ4͕.ͷTEPXΛݕ w4ͱ4͕.ΛPEPXOͱ͢Δ
wϑΣΠϧΦʔόʔΛ։࢝͠4ͱ4 ͷͲͪΒ͔͕.BTUFSʹ
.BTUFSͷো
.BTUFSͷݽཱ . 4̍ 3 4 3 4 wఆ͢Δڍಈ w4.͕ੜ͖͍ͯΔͱࢥ͍ͬͯΔ w4ɺ4.͕ࢮΜͩͱࢥ͍ͬͯ
Δ w..BTUFSͷ·· w3ɺ3ͷͲͪΒ͔͕.BTUFSʹ
.BTUFSͷݽཱ . 4̍ 3 4 3 4 w.ʹॻ͖ࠐ·ΕͨΒͲ͏͢ΕΑ ͍Ͱ͠ΐ͏ʁ $MJFOU
.BTUFSͷݽཱ
͜͏ͳΒͳ͍Α͏ʹ͢Δʹʜʁ # slave͕1Ҏ্ɺੜ͖͍ͯͳ͍ͱMasterʹॻ͖ࠐΊͳ͘͢Δ min-slaves-to-write 1 # slave͕࠷ޙʹԠ͔ͯ͠Βͷ࣌ؒ min-slaves-max-lag 10
.BTUFSͱ4MBWFͷμϯ . 4̍ 3 4 3 4 wఆ͢Δڍಈ w4.͕PEPXOͩͱஅ͢Δͨ ΊʹඞཁͳRVPSVNΛ֬อͰ͖ͳ͍
ͷͰԿ͓͖ͳ͍
.BTUFSͱ4MBWFͷμϯ
·ͱΊ
·ͱΊ w3FEJT4FOUJOFMͰߏΛΉʹҎ্ͷ4FOUJOFM͕ඞཁ wεϐϦοτϒϨΠϯ͜Θ͍ wಉ࣌ʹࢮ͵ͱͲ͏͠ΐ͏ͳ͍