fluentdによる大規模キュー設計
by
Atsushi Takayama
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
fluentdʹΑΔ େنΩϡʔઃܭ A large scale queue design with fluentd
Slide 2
Slide 2 text
ࣗݾհ • ߴࢁ Թ @edvakf • pixivͷອըࣄۀͷ։ൃऀ • ීஈॻ͍ͯΔͷScalaPHPɺͨ·ʹJSRubyGo • ࠷ۙϦʔυΤϯδχΞͱ͍͏ݞॻʹ • ձࣾͷٕज़બʹΛ࣋ͭ • ʮࣾͷΤϯδχΞ͕ͤʹಇͨ͘ΊʹʯΛߟ࣮͑ݱ͢Δۀ
Slide 3
Slide 3 text
ී௨ͷ ΣϒΞϓϦ+δϣϒΩϡʔ
Slide 4
Slide 4 text
Sidekiq
Slide 5
Slide 5 text
Resque Resque
Slide 6
Slide 6 text
MySQL Q4M PHP PHP PHP PHP Q4M batch
Slide 7
Slide 7 text
MongoDB PHP PHP PHP PHP Mongo batch
Slide 8
Slide 8 text
ྑ͍ • SidekiqResque൚༻δϣϒΩϡʔ • Rubyͷϝιου୯ҐͰ؆୯ʹδϣϒʹͰ͖Δ • ͘ΘΕ͍ͯΔ • ͠RedisMongoDBͳͲΛطʹ͍ͬͯΔͳΒ৽͍͠ ϛυϧΣΞΛಋೖ͠ͳͯ͘ྑ͍
Slide 9
Slide 9 text
͠ • 1ؒʹ10ສճͷδϣϒΛ࣮ߦ͠ͳ͍ͱ͍͚ͳ͔ͬͨΒ • ࣌ؒલͱ͔લͷঢ়ଶ·Ͱר͖ͬͯδϣϒΛ࣮ߦ ͠͞ͳ͍ͱ͍͚ͳ͔ͬͨΒ
Slide 10
Slide 10 text
ΞΫηεղੳ www.pixiv.net
Slide 11
Slide 11 text
࠷ॳʹߟ͑ͨҊ
Slide 12
Slide 12 text
MongoDB PHP PHP PHP PHP Mongo batch
Slide 13
Slide 13 text
ݒ೦ • MongoDB͕٧·ΔorམͪΔ • ͯ͢ͷPVͰॻ͖ࠐΉΑ͏ͳͱ͜ΖʹೖͰ͖Δ΄Ͳ ৴པͰ͖ͳ͍
Slide 14
Slide 14 text
ͦ͜Ͱfluentd
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
ߏ • ΞϓϦέʔγϣϯϩʔΧϧͷϑΝΠϧʹॻ͚ͩ͘ • fluentd͕ͦͬ͘Γͦͷ··సૹ͠ɺసૹઌͰϑΝΠϧ ʹॻ͖ࠐΉ • σʔϞϯͬΆ͍όονεΫϦϓτ͕ϑΝΠϧΛݹ͍ॱʹ ಡΜͰ͍ͬͯॲཧ͢Δ • exec_filterʹ͢Δख͕͋ͬͨɺॾʑͷཧ༝͔ΒPHP ͰϑΝΠϧΛtailͯ͠ϙδγϣϯͷཧͳͲ͍ͯ͠Δ
Slide 17
Slide 17 text
རʢ̍ʣ • ϢʔβʔͷϦΫΤετΛॲཧ͍ͯ͠Δؒʹ௨৴͕ൃੜ͠ ͳ͍ • ϑΝΠϧͷॻ͖ࠐΈγʔέϯγϟϧͳͷͰઈରʹ٧ ·Βͳ͍ • సૹઌಉ༷ • ϑΝΠϧγεςϜҰ൪ރΕͯΔετϨʔδ
Slide 18
Slide 18 text
རʢ̎ʣ • ॲཧͨ͠ޙϩά͕Δ • ԿΒ͔ͷΤϥʔͰόον͕͏·࣮͘ߦͰ͖͍ͯͳ͔ͬ ͨͱͯ͠ɺݩʹͬͯΓͤΔ • ࣦഊ͢Δͱઌʹਐ·ࣦͣഊ͠ଓ͚ΔΑ͏ʹͳ͍ͬͯͯɺ ରࡦͯ͠σϓϩΠ͢ΔͱਐΜͰ͘ΕΔ
Slide 19
Slide 19 text
རʢ̏ʣ • సૹઌΛΞΫςΟϒɾελϯόΠߏʹͰ͖Δ • ྆ํಉ͡ߏͰಉ͡όον͕ಈ͍͍ͯΔ
Slide 20
Slide 20 text
• “When an active node goes down, the standby node is promoted to an active node.” • http://docs.fluentd.org/articles/out_forward#standby name host1 host 192.168.xx.1 standby name host2 host 192.168.xx.2
Slide 21
Slide 21 text
·ͱΊ • fluentdͱϑΝΠϧγεςϜΛͬͯ৴པੑͷߴ͍େن ΩϡʔγεςϜΛߏஙͨ͠ • ϑΝΠϧʹγʔέϯγϟϧʹॻ͖ࠐΉ • 2Ҏ্ී௨ʹಈ͍͍ͯͯɺಉ͡Ͱ·ͩ·ͩϩάΛ ૹͬͯͳͦ͞͏ • ϑΝΠϧ͕͍ͬͯΔ҆৺ײ