TimeFuzeアーキテクチャ構想 / The concept of TimeFuze Architecture
by
Yuuki Tsubouchi (yuuk1)
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
TimeFuzeΞʔΩςΫνϟߏ ͯͳ id:y_uuki / @y_uuk1 2017/12/23 ୈ1ճΣϒγεςϜΞʔΩςΫνϟ(WSA)ݚڀձ@ژ ॲཧͱσʔλͱλΠϚʔΛҰମԽͨ͠σʔλύΠϓϥΠϯ
Slide 2
Slide 2 text
id:y_uuki / @y_uuk1 Yuuki TSUBOUCHI https://yuuk.io/ ͯͳͷΣϒΦϖϨʔγϣϯΤϯδχΞ WSAݚڀձ ཧࣄ?෭ࠪ?
Slide 3
Slide 3 text
TimeFuze?
Slide 4
Slide 4 text
࣌ݶ৴ Time Fuze
Slide 5
Slide 5 text
ىരஔ+Րༀ+λΠϚʔ
Slide 6
Slide 6 text
ॲཧ+σʔλ+λΠϚʔ
Slide 7
Slide 7 text
TimeFuze ΞʔΩςΫνϟ
Slide 8
Slide 8 text
͘͡ 1. എܠͱత 2. TimeFuzeΞʔΩςΫνϟ 3. ߟ 4. Ή͢ͼ
Slide 9
Slide 9 text
1. എܠͱత
Slide 10
Slide 10 text
WebαʔϏεͷσʔλॲཧཁٻͷෳࡶԽ • ϦΫΤετʹରͯ͠HTMLͷϨεϙϯεΛฦ٫͢ΔҎ֎ ͷϫʔΫϩʔυͷଟ༷Խ͕ਐΜͰ͍Δ • ੑೳಛੑͷҟͳΔσʔλετΞͷซ༻ɺػցֶशʹΑ Δ࣌ؒपظͰͷେنͳσʔλॲཧΛٻΊΒΕ͍ͯΔ • εέʔϧ͍ͤ͢͞σʔλύΠϓϥΠϯॲཧ͕ඞཁ
Slide 11
Slide 11 text
ҰൠͷσʔλύΠϓϥΠϯ DataSource Data Destination όονॲཧ λΠϜεέδϡʔϥʔ ىಈ
Slide 12
Slide 12 text
ҰൠͷσʔλύΠϓϥΠϯͷ՝ • σʔλྔ૿େʹ͋ΘͤͨεέʔϦϯάӡ༻ͷ͠͞ • όονॲཧ్தͷΤϥʔॲཧͷ͠͞ • λΠϜεέδϡʔϥͦͷͷͷӡ༻ͷࡶ͞ • ࣮ߦසઃఆͷॊೈੑͷ͞
Slide 13
Slide 13 text
σʔλ λΠϚʔ σʔλͱॲཧͱλΠϚʔͷҰମԽϞσϧͷఏҊ ॲཧ DataSource σʔλ λΠϚʔ ॲཧ DataDestination
Slide 14
Slide 14 text
ҰൠͷσʔλύΠϓϥΠϯͷ՝ͷղܾ • σʔλྔ૿େʹ͋ΘͤͨεέʔϦϯάӡ༻ͷ͠͞ • ࠷ॳ͔ΒฒߦॲཧΛલఏͱͨ͠ΞʔΩςΫνϟͰղܾ • όονॲཧ్தͷΤϥʔॲཧͷ͠͞ • όονॲཧͰͳ͘Ϩίʔυ୯ҐͰδϣϒఆٛͰղܾ • λΠϜεέδϡʔϥͦͷͷͷӡ༻ͷࡶ͞ • σʔλετΞͷTTLʹΑΓεέδϡʔϥϗετ͕ෆཁ • ࣮ߦසઃఆͷॊೈੑͷ͞ • λΠϚʔઃఆͷཻΛϨίʔυ୯ҐͰઃఆ͢Δ͜ͱͰղܾ
Slide 15
Slide 15 text
http://blog.yuuk.io/entry/the-rebuild-of-tsdb-on-cloud
Slide 16
Slide 16 text
֊ܕσʔλετΞߏͷ࣌ܥྻσʔλϕʔε ΠϯϝϞϦ DB ΦϯσΟεΫ DB ΦϒδΣΫτ ετϨʔδ ৽ ݹ ߴ ҆
Slide 17
Slide 17 text
֊ܕσʔλετΞͷ͍͠ͱ͜Ζͱղܾ • σʔλετΞؒͷσʔλҠಈύΠϓϥΠϯͷεέʔϥϏ ϦςΟ • ಛఆͷϨίʔυͷΈɺσʔλετΞҠಈλΠϛϯάΛ੍ ޚ͢Δ • ͜ΕΒΛTimeFuzeΞʔΩςΫνϟʹΑΓղܾ • DynamoDBͷTTLͱLambda TriggerʹΑΔ࣮
Slide 18
Slide 18 text
ͦͷଞͷTimeFuzeͷద༻ΞϓϦέʔγϣϯྫ • ࣌ܥྻσʔλҟৗݕͷֶशϞσϧͷఆظߋ৽ • Ϛϧνςφϯτڥʹ͓͚ΔେنͳSSL/TLSূ໌ॻߋ ৽
Slide 19
Slide 19 text
2. TimeFuzeΞʔΩςΫνϟ
Slide 20
Slide 20 text
1. insert DataSource record Data TTL DataDestination Trigger Other API/DataStore record 2. expire 3. insert or update
Slide 21
Slide 21 text
TimeFuzeͷϝϦοτ • ฒߦॲཧΛલఏͱͨ͠ΞʔΩςΫνϟͰ͋Δ͜ͱ • Τϥʔ͔Βͷճ෮ॲཧ͕༰қͰ͋Δ͜ͱ • λΠϜεέδϡʔϥͱόονॲཧͷͨΊͷϗετ͘͠ Ϋϥελͷߏஙɾӡ༻͕ෆཁͰ͋Δ͜ͱ • Ϩίʔυ୯ҐλΠϚʔʹΑΓɺδϣϒͷ࣮ߦසΛϨίʔ υ୯ҐͰௐՄೳͰ͋Δ͜ͱ
Slide 22
Slide 22 text
AWSʹΑΔ࣮
Slide 23
Slide 23 text
DynamoDB TTL + Lambda Trigger • DynamoDB: ϑϧϚωʔδυܕͷNoSQLσʔλϕʔε αʔϏεɻTTLΛαϙʔτ͍ͯ͠Δɻ • Lambda: ΠϕϯτൃՐΛܖػʹFunctionΛݺͼग़ͤΔ • DynamoDB্ͷϨίʔυʹର͢ΔTTLظݶΕΠϕϯτ ΛܖػʹɺLambda FunctionΛτϦΨʔͱ࣮ͯ͠ߦ
Slide 24
Slide 24 text
1. insert DynamoDB record Data TTL DynamoDB,S3,… Lambda Other API/DataStore record 2. expire 3. insert or update
Slide 25
Slide 25 text
ΦϯϓϨϛεڥͰͷ࣮
Slide 26
Slide 26 text
Redis Keyspace௨ + ϝοηʔδΩϡʔ • RedisͷKeyspace௨ػೳʹΑΓTTLΠϕϯτΛߪಡͰ͖ Δ • ͨͩ͠ɺ҆શͳτϦΨʔॲཧͷͨΊʹɺߪಡͨ͠Πϕϯ τΛϝοηʔδΩϡʔʹΑΓӬଓԽ͢Δඞཁ͕͋Δ • ݴޠΘͣར༻͍͢͠ϝοηʔδΩϡʔͱͯ͠ Fireworq͕͋Δ
Slide 27
Slide 27 text
TimeFuzeͷ ۩ମతͳΞϓϦέʔγϣϯ ͷద༻
Slide 28
Slide 28 text
࣌ܥྻσʔλͷҟৗݕ • ऩूͨ͠ϝτϦοΫܥྻʹରͯ͠ɺֶशϞσϧΛߏங • ৽نϝτϦοΫͷରԠͷͨΊϞσϧΛఆظతʹߋ৽͢Δ • ଞͷσʔλετΞʹҠಈ͢ΔΘ͚Ͱͳ͘ɺDataSource ͱDataDestinationಉҰͷσʔλετΞΛར༻ • ֶ֤शϞσϧͷϨίʔυʹTTLΛઃఆ͠ɺTriggerͰֶश ॲཧޙɺϞσϧΛߋ৽͢Δ
Slide 29
Slide 29 text
1. insert DataSource record Metric TTL Trigger ࣌ܥྻ σʔλϕʔε 2. expire 3. update ֶशॲཧ
Slide 30
Slide 30 text
େنSSL/TLSূ໌ॻཧ • ϒϩάαʔϏεͳͲͰେྔͷSSL/TLSূ໌ॻΛཧ͠ɺ ϲ݄͝ͱʹߋ৽͢Δέʔε • ূ໌ॻΛσʔλϕʔεʹ֨ೲ͠ಈతऔಘ͢ΔΞʔΩςΫ νϟΛલఏͱ͢Δ • ֤υϝΠϯʹର͢Δূ໌ॻϨίʔυʹTTLΛઃఆ͠ɺ Trigger͕ূ໌ॻΛ࠶औಘ͠ɺDataDestination্ॻ͖
Slide 31
Slide 31 text
1. insert DataSource record ূ໌ॻ TTL Trigger Let’s Encrypt 2. expire 3. update ূ໌ॻ ߋ৽ॲཧ
Slide 32
Slide 32 text
3. ߟ
Slide 33
Slide 33 text
TimeFuzeͷσϝϦοτ • ΞʔΩςΫνϟϨϕϧ • DataSource্ͷෳͷϨίʔυΛϚʔδ͢ΔॲཧΛͮ͠Β͍ • ࣮Ϩϕϧ • Ұ࣌తʹϨίʔυ͕আ͞ΕΔͨΊɺσʔλͷҰ؏ੑͷ ͕ඞཁ • TTLظݶ͔Βআॲཧ։࢝·ͰͷσΟϨΠ͕࣌ؒϕετΤ ϑΥʔτͳͨΊɺִ࣌ؒؒ
Slide 34
Slide 34 text
TimeFuzeͷσϝϦοτղܾҊ • TTLΛར༻ͤͣɺTime to EventػೳΛσʔλετΞʹ ΈࠐΉ • Time to Eventػೳઃఆͨ࣌͠ࠁΛܦաͨ͠Πϕϯτ ͷΈΛൃߦ͠ɺϨίʔυআ͠ͳ͍
Slide 35
Slide 35 text
4. Ή͢ͼ
Slide 36
Slide 36 text
Ή͢ͼ • εέʔϧ͍ͤ͢͞σʔλύΠϓϥΠϯΞʔΩςΫνϟ͕ WebαʔϏε։ൃʹٻΊΒΕ͍ͯΔ • ୯ҰͷλΠϜεέδϡʔϥʔʹΑΔσʔλύΠϓϥΠϯͷ ՝ΛɺσʔλͱॲཧͱλΠϚʔͷҰମԽʹΑΓղܾ͢Δ ख๏ΛఏҊͨ͠ • ࣮ͷʹΑΓɺݱஈ֊Ͱ࣮ӡ༻͢ΔͨΊʹΞϓϦέʔ γϣϯͷ͕ඞཁͱͳΔ
Slide 37
Slide 37 text
ࠓޙͷऔΓΈ • طଘͷఆظσʔλύΠϓϥΠϯͷ՝ΛαʔϕΠ͠ཧ • طଘσʔλετΞ࣮ͷTTLσΟϨΠ࣌ؒͷௐࠪ • طଘͷσʔλετΞͷTime to EventͷΈࠐΈ
Slide 38
Slide 38 text
ࣗੑͷ͋ΔσʔλॲཧͷՄೳੑ • VM => ίϯςφ, ίϯςφ => εϨου • σʔλϕʔε => ςʔϒϧ, ςʔϒϧ => σʔλϨίʔυ
Slide 39
Slide 39 text
SRE/ΦϖϨʔγϣϯΤϯδχΞͷઓ • TimeFuzeͷΑ͏ͳσʔλॲཧΞʔΩςΫνϟΛࣄʹ͍ͯ͠ͳ͍ • ۙͰ͍ͬͯΔ͜ͱɺΠϯϑϥετϥΫνϟࣗମͷมߋΛ࠷ େԽ͢Δࣄ • ج൫ͷந͕͕͋ΔʹͭΕɺSREͷࣄ͕ΑΓࣄۀʹۙ͘ͳ͍ͬͯ͘ • ࣄۀʹ͍ۙ΄ͲɺநԽ͕͘͠ͳΓج൫Ͱٵऩͮ͠Β͘ͳΔ • ෳͷσʔλετΞΛ͏·͘׆༻ͨ͠ΓɺෳͷϫʔΫϩʔυΛ͏· ͍͍ͯ͘͘͞ΞʔΩςΫνϟʹؔ৺͕͋Δ