2
ࣗݾհ
+9௨৴ࣾγχΞΤϯδχΞ
l ೖࣾ
l ϦεΫใऩू4BB4ʮ'"45"-&35ʯ
l 1ZUIPOɺ(PͰόοΫΤϯυ୲
l ΠϯϑϥઐͰͳ͍
झຯ
l ϩʔυόΠΫ
l ͓ֆ͔͖
l ΞʔΫφΠπ
kimihiro_n
Slide 3
Slide 3 text
3
ニュースアプリも作ってます
Slide 4
Slide 4 text
"84"VSPSB
͔Β
$MPVE42-
ͷ͓Ҿͬӽ͠
Slide 5
Slide 5 text
5
"VSPSBˠ$MPVE42-
"NB[PO"VSPSB.Z42-
l "84ͷϚωʔδυͳ3%#
l .Z42-ޓ
l ετϨʔδϨΠϠͰͷߴͳϨϓϦέʔγϣϯ
$MPVE42-GPS.Z42-
l (PPHMF$MPVEͷϚωʔδυͳ3%#
l ελϯμʔυͳ.Z42-
Slide 6
Slide 6 text
6
2ͳͥҾͬӽ͢ͷ͔
l "େਓͷࣄ
l τʔλϧͰΈͨͱ͖ͷίετ
l ར༻έʔεʹڧ͘ґଘ͢ΔͷͰҰ֓ʹ҆͘ͳΔ
Θ͚Ͱͳ͍Ͱ͢
l ࠓճҠߦίετ͔͚ͯར͕͋Δͱͷஅ
l #JH2VFSZͱͷ࿈ܞͱͷ͢͠͞
l ϚϧνϦʔδϣϯߏͷͱΓ͢͞
Slide 7
Slide 7 text
Ҡߦલͷߏ
Writer Reader Reader
Service 1 Service 2 Service 3
Aurora クラスタ
別リージョン
AWS VPC
Slide 8
Slide 8 text
8
Ҡߦલͷߏ
l %#ɺར༻αʔϏεಉ͡71$ʹஔ
l ͷ"VSPSBΫϥελΛෳͷαʔϏεͰڞ༗
l σʔλϕʔε͝ͱʹߏங͢Δͱߴ͍ͷͰڞ༻
l 8SJUFSɺ3FBEFSͷ͍͚
l 3FBEFSͷॊೈʹมߋՄೳ
l ผϦʔδϣϯͷϗοτελϯόΠ
l େنࡂ࣌ͷඋ͑
Slide 9
Slide 9 text
Ҡߦޙʹࢦ͢ߏ
Writer Reader Reader
Service 1 Service 2 Service 3
CloudSQL
別リージョン
AWS VPC
Google Cloud VPC
VPN
Slide 10
Slide 10 text
10
Ҡߦޙʹࢦ͢ߏ
l $MPVE42-Λ(PPHMF$MPVEͷ71$ʹஔ
l 71$ؒΛ71/Ͱଓ͠૬ޓ௨৴Ͱ͖ΔΑ͏ʹ
l 4FSWJDF"84ଆ͔Β%#ʹΞΫηε
l ॱ࣍αʔϏε(PPHMF$MPVEҾͬӽ͠
l %#ͷߏ"VSPSBͷͱ͖ͱ͍͍ͩͨଗ͑Δ
l ผϦʔδϣϯͷϗοτελϯόΠ༻ҙ
Slide 11
Slide 11 text
Ҡߦͷ՝
Slide 12
Slide 12 text
12
σʔλϕʔεҠߦͷ՝
l ҠߦલޙͰσʔλͷ߹ੑΛͲ͏อ͔ͭ
l աڈؚΊͯσʔλΛશͳܗͰҠߦ͍ͨ͠
l Γସ͑લޙͰܽଛෆ߹ͷൃੜΛ͍͗ͨ
l ҠߦதͷμϯλΠϜΛͲ͏͑Δ͔
l ΞϓϦέʔγϣϯ৽چͲͪΒ͔ͷ%#Λࢀর
l Ҡߦ࡞ۀதͷαʔϏεӨڹΛ͍͑ͨ
Old New
Slide 13
Slide 13 text
13
σʔλϕʔεҠߦͷํᶃ
l ҠߦલޙͰσʔλͷ߹ੑΛͲ͏อ͔ͭ
l $MPVE42-ଆʹϨϓϦΧΛߏங
l .Z42-ͷϨϓϦέʔγϣϯػೳͰಉظ
l 3FBEFSΠϯελϯεͱͯ͠ѻ͑ΔΑ͏ʹ
l Γସ͑࣌ʹ$MPVE42-ଆΛ8SJUFSঢ֨
l ͜ͷͱ͖ॻ͖ࠐΈΛҰ࣌ఀࢭ͠ෆ߹Λ͙
Slide 14
Slide 14 text
14
σʔλϕʔεҠߦͷํᶄ
l ҠߦதͷμϯλΠϜΛͲ͏͑Δ͔
l શແఀࢭࢦ͞ͳ͍͜ͱʹ
l ແఀࢭқͶ্͕ΔͷͰɺ
μϯλΠϜΛۃྗ͑ΔํͰҠߦ
l ސ٬पͯ͠ϝϯςφϯε࣌ؒΛ֬อ
l ॻ͖ࠐΈఀࢭಡΈࠐΈఀࢭ
l ఀࢭ͢Δ߹ʮಡΈࠐΈ͚ͩੜ͖͍ͯΔʯ
ঢ়ଶΛ༏ઌ͠ސ٬ͷମײΛଛͳΘͳ͍Α͏ʹ
l ಡΈࠐΈ͕ੜ͖͍ͯΕಈ͍͍ͯΔΑ͏ʹݟ͑Δ
Slide 15
Slide 15 text
15
σʔλϕʔεҠߦͷํᶅ
l ෳͷαʔϏεͷ%#ଓͷΓସ͑
l Ҡߦ࣌ɺͦΕͧΕͷαʔϏεͰΓସ͕͑ඞཁ
l શ෦ྃ͢Δ·Ͱ৽͍͠%#ʹॻ͖ࠐΈͰ͖ͳ͍
l Ұ੪ʹΓସ͕͑Ͱ͖ΕμϯλΠϜݮΒͤΔ
l ˠ%/4ΛͬͯଓΛཧ
l ಡΈऔΓॻ͖ࠐΈͦΕͧΕυϝΠϯׂΓͯ
l %/4Λมߋ͢ΕଓΓସΘΔΑ͏ʹ
l ίωΫγϣϯϓʔϧͷੜଘظؒʹҙ
Slide 16
Slide 16 text
16
"VSPSB$MPVE42-ͷ՝
l ύϑΥʔϚϯεੑೳͷมԽ
l "VSPSBಠࣗʹ࠷దԽ͞Ε͍ͯΔ
l ٖڥͰϕϯνϚʔΫΒͤͯݕূ
l 3FBEFSΤϯυϙΠϯτ
l ಡΈऔΓ༻ͷΤϯυϙΠϯτ͕ͳ͍
l Πϯελϯεʹ*1ϕʔεͰͷΞΫηε
l 3FBEFSΛ૿ͨ͠ͱ͖ࣗಈͰࢄ͠ͳ͍
l Δͱͨ͠Β%/4ͷϥϯυϩϏϯʜʁ
Service 3
खॱϨϓϦΧͷ࡞
Writer Reader
Service 1
AWS VPC
Service 3
Writer Reader
Service 1
AWS VPC
Reader
GC VPC
移⾏前 レプリカ作成後
Slide 20
Slide 20 text
20
खॱϨϓϦΧͷ࡞
($1ଆͰϨϓϦέʔγϣϯΛ࡞Δ
l .Z42-ͷμϯϓΛͱͬͯ%#࡞
l ϨϓϦέʔγϣϯͷઃఆΛͯ͠ಉظ։࢝
l ࣮ࡍΖ͏ͱ͢Δͱ݁ߏͳखؒ
%BUBCBTF.JHSBUJPO4FSWJDF %.4
Λར༻͢Δ͜ͱʹ
IUUQTDMPVEHPPHMFDPNEBUBCBTFNJHSBUJPO IMKB
Slide 21
Slide 21 text
21
%BUBCBTF.JHSBUJPO
4FSWJDF
l (PPHMF$MPVE͕ఏڙ͍ͯ͠Δ%.4
l .Z42-ɺ1PTUHSF42-ରԠ
l ϨϓϦΧͷ࡞͔ΒɺҠߦ࣌ͷΓ͠ૢ
࡞·ͰΛࣗಈԽͯ͘͠Ε͍ͯΔ
l ҟͳΔछผɺόʔδϣϯͷҠߦαϙʔτ
l 3%4ɺ"VSPSB͔ΒϨϓϦΧΛ࡞Δ࣌
Ұ࣌తͳॻ͖ࠐΈఀࢭ͕࣌ؒඞཁ
Slide 22
Slide 22 text
खॱಡΈऔΓૢ࡞ͷҠߦ
Service 3
Writer Reader
Service 1
AWS VPC
Reader
GC VPC
前の状態 読み取り移⾏後
Service 3
Writer Reader
Service 1
Reader
GC VPC
AWS VPC
Slide 23
Slide 23 text
23
खॱಡΈऔΓૢ࡞ͷҠߦ
l ࡞ͬͨϨϓϦΧಡΈऔΓૢ࡞ΛΓସ͑
l தಉ͡ͳͷͰαʔϏεͷӨڹͳ͠
l ૢ࡞%/4Λॻ͖͑Δ͚ͩ
l "VSPSBͷಡΈऔΓΤϯυϙΠϯτ $/".&Ϩίʔυ
l ˠ$MPVE42-ͷΠϯελϯε*1 "Ϩίʔυ
l ύϑΥʔϚϯεͳͲͳ͍͜ͱΛ֬ೝ
l ͳʹ͔͋Ε͙ͤ͢ΔΑ͏ʹ
Slide 24
Slide 24 text
खॱॻ͖ࠐΈͷҠߦ
AWS VPC
前の状態 書き込み移⾏後
Service 3
Writer
Service 1
Writer
GC VPC
AWS VPC
Service 3
Writer Reader
Service 1
Reader
GC VPC
Reader
Slide 25
Slide 25 text
25
खॱॻ͖ࠐΈૢ࡞ͷҠߦ
l $MPVE42-ʹಡΈॻ͖ͱҠߦ
l %.4ͷ߹্·ͩϨϓϦΧ࡞Εͳ͍
l ̍Ͱࡹ͚ΔΑ͏ڧΊͷεϖοΫʹ͓ͯ͘͠
l %.4ͰϓϩϞʔτૢ࡞
l ϓϩϞʔτΛ࣮ࢪ͢Δͱԡ͢ͱϨϓϦέʔγϣϯ͕
ऴྃ͠ॻ͖ࠐΈՄೳͳঢ়ଶʹ
l ͜ͷͱ͖ͷॻ͖ࠐΈఀࢭ͕࣌ؒൃੜ
l ॻ͖ࠐΈՄೳʹͳͬͨΒαʔϏεଆΓସ͑
Slide 26
Slide 26 text
खॱϨϓϦΧ࡞ย͚
AWS VPC
前の状態 移⾏完了
Service 3
Service 1
Writer
GC VPC
Service 3
Writer
Service 1
Writer
GC VPC
Reader
AWS VPC
Reader
Slide 27
Slide 27 text
27
खॱϨϓϦΧ࡞ย͚
l ϨϓϦΧΛ࡞ͯ͠ಡΈࠐΈΛมߋ
l ϓϩϞʔτޙ௨ৗͷ$MPVE42-ʹͳΔ
l ϝΠϯͷϦʔδϣϯͱϗοτελϯόΠ༻ʹผ
ϦʔδϣϯͰϨϓϦΧΛ࡞
l Πϯελϯεͷ*1͕ݟ͑ͨΒ%/4ॻ͖͑ͯಡ
ΈࠐΈΛΓସ͑
l "VSPSBΛย͚ͯྃ
l ා͍ͷͰ̍िؒ͘Β͍༷ࢠΈ͔ͯΒআ͠·ͨ͠
Slide 28
Slide 28 text
28
Ҡߦͯ͠Έͯ
l %.4ɺ%/4ͷ׆༻Ͱগͳ͍μϯλ
ΠϜͰҠߦ͕ྃͰ͖ͨ
l ̑ఔͷॻ͖ࠐΈͷఀࢭY̎ճ
l ඵఔͷಡΈࠐΈఀࢭY̎ճ
l ੑೳ໘Ͱτϥϒϧͳ͘ҠߦͰ͖ͨ
l Ҡߦݕ౼࣌ؾ͕͔ΓͳεϩʔΫΤϦ͕͋ͬͨ
ಛʹωοΫʹͳΔ͜ͱͳ͘ಈ͍͍ͯΔ
l ॻ͖ࠐΈϔϏʔͰͳ͍ͷ͕͍͔ͨ͠
Slide 29
Slide 29 text
·ͱΊ
Slide 30
Slide 30 text
30
·ͱΊ
l "VSPSB͔Β$MPVE42-ʹҠߦͰ͖ͨ
l μϯλΠϜΛݮΒ͢
l ಡΈࠐΈܥ౷Λۃྗҡ࣋
l %/4Λར༻ͨ͠ૉૣ͍Γସ͑
l %.4ͷ׆༻
l खؒͷ͔͔ΔҠߦ࡞ۀΛলྗԽ
Slide 31
Slide 31 text
31
ςοΫϒϩά
l ฐٕࣾज़ϒϩάʹҠߦʹؔͯ͠ͷ
هࣄॻ͍ͯ·͢
IUUQTUFDIKYQSFTTOFUFOUSZHDQ@EBUBCBTF@NJHSBUJPO
l ϒϩάͷ༰ͦͷ··ൃද͢ΔͭΓͰ͕ͨ͠ɺ
-5͚ʹ·ͱΊ͍ͯͨΒ͍ͩͿத͔ΘΓ·ͨ͠