24
ࢥ٬ ߑध
• ࢥ٘ ః ߧਤ۽ ࠙ߓ
• ࢥ٘ ഛ औ.
• ex) 4001ߣ ~ 5000ߣ Shard D
• ܻࣗझ ࢎਊ ౠ ࢥ٘ী ށܾ оמࢿ ઓ
• (ࢥ٘ ః % ࢥ٘ ࣻ) чਵ۽ ࠙ߓ
• Range basedী ࠺೧ ܻࣗझ ࢎਊ Ӑੌ
• ࢥ٘о ୶оغݶ(ࢥ٘ ః % ࢥ٘ ࣻ) ч ߸
҃غӝ ٸޙী ؘఠܳ ࠙ߓ ೧ঠೠ.
VS
Range based
Shard C
Shard A Shard B
1~2000 2000 ~ 3000 3000 ~ 4000
Modulus Based
1
C
B
A C
B
A C
B
A C
B
A B
A
2 3 1 2 3 1 2 3 1 2 3 1 2
ܻח যڌѱ ࢥ٬ਸ ೮חо?
Slide 25
Slide 25 text
25
ܻࣗझ оਊࢿҗ ؘఠ ࠙ߓ ࠺Ү Ӑੌ೮ਵݶ જѷ.
Modulus based
ࢥ٬ ߑध
ࢥ٘ ഛद ؘఠ ࠙ߓо ୭ࣗച عਵݶ જѷ.
Range based
ܻח যڌѱ ࢥ٬ਸ ೮חо?
44
ࢥ٘ ഛ ߑউ
ఋࢎ ࢎ۹: Tumblr
۠ Databaseҳࢿ णפ.
master
blog 1-1000
slave
blog 1-1000
slave
blog 1-1000
ܻח যڌѱ ࢥ٬ਸ ೮חо?
Slide 45
Slide 45 text
45
ࢥ٘ ഛ ߑউ
ఋࢎ ࢎ۹: Tumblr
ࢲ࠺झী ైੑೞ ঋ ࢜۽ ठۨ࠳ ୶оೞҊ
ؘఠܳ ߈ਵ۽ ա׃
master
blog 1-1000
slave
blog 1-1000
slave
blog 1-1000
slave
blog 501- 1000
slave
blog 1-500
slave
blog 1-500
slave
blog 1-500
slave
blog 501- 1000
slave
blog 501- 1000
ܻח যڌѱ ࢥ٬ਸ ೮חо?
Slide 46
Slide 46 text
46
ࢥ٘ ഛ ߑউ
ఋࢎ ࢎ۹: Tumblr
݃झఠ۽ о؍ Read/Writeܳ ୶оػ Slave۽ ز
master
blog 1-1000
slave
blog 1-1000
slave
blog 1-1000
slave
blog 501- 1000
slave
blog 1-500
slave
blog 1-500
slave
blog 1-500
slave
blog 501- 1000
slave
blog 501- 1000
R/W R/W
ܻח যڌѱ ࢥ٬ਸ ೮חо?
Slide 47
Slide 47 text
47
ࢥ٘ ഛ ߑউ
ఋࢎ ࢎ۹: Tumblr
ӝઓ ݃झఠ৬ ܻܻா࣌ਸ ઁѢೞҊ ؘఠ ࠁ
master2
blog 501- 1000
master1
blog 1-500
slave
blog 1-500
slave
blog 1-500
slave
blog 501- 1000
slave
blog 501- 1000
Master
blog 1-1000
slave
blog 1-1000
slave
blog 1-1000
X
ܻח যڌѱ ࢥ٬ਸ ೮חо?
53
ࢥ٘ ഛ ߑউ
Instance B
Instance A
WAS
Shard C
Shard B
Shard D
Event Worker
Shard A
READ Write
Replication
ܻח যڌѱ ࢥ٬ਸ ೮חо?
Slide 54
Slide 54 text
54
ࢥ٘ ഛ ߑউ
Instance B
Instance A
WAS
Shard C
Shard B
Shard D
Event Worker
Instance A`
Instance B`
Shard A
READ Write
Replication
ܻח যڌѱ ࢥ٬ਸ ೮חо?
Slide 55
Slide 55 text
55
ࢥ٘ ഛ ߑউ
Instance B
Instance A
WAS
Shard C
Shard B
Shard D
Event Worker
Instance A`
Instance B`
Shard A
Shard B
Shard D
READ Write
Replication
ܻח যڌѱ ࢥ٬ਸ ೮חо?
Slide 56
Slide 56 text
56
ࢥ٘ ഛ ߑউ
Instance B
Instance A
WAS
Shard C
Shard B
Shard D
Event Worker
Instance A`
Instance B`
Shard A
Shard B
Shard D
READ Write
Replication
ܻח যڌѱ ࢥ٬ਸ ೮חо?
Slide 57
Slide 57 text
57
ࢥ٘ ഛ ߑউ
Instance B
Instance A
WAS
Shard C
Shard B
Shard D
Event Worker
Instance A`
Instance B`
Shard A
Shard B
Shard D
READ Write
Replication
ܻח যڌѱ ࢥ٬ਸ ೮חо?
Slide 58
Slide 58 text
58
ࢥ٘ ഛ ߑউ
Instance B
Instance A
WAS
Shard C
Shard B
Shard D
Event Worker
Instance A`
Instance B`
Shard A
Shard B
Shard D
READ Write
Replication
ܻח যڌѱ ࢥ٬ਸ ೮חо?
Slide 59
Slide 59 text
59
ࢥ٘ ഛ ߑউ
Instance B
Instance A
WAS
Shard C
Event Worker
Instance A`
Instance B`
Shard A
Shard B
Shard D
READ Write
Replication
ܻח যڌѱ ࢥ٬ਸ ೮חо?