Upgrade to Pro — share decks privately, control downloads, hide ads and more …

簡略化したネットワーク依存関係グラフの可視化基盤 / Simplified network d...

簡略化したネットワーク依存関係グラフの可視化基盤 / Simplified network dependency graph visualization

第3回Web System Architecture研究会@東京

Yuuki Tsubouchi (yuuk1)

November 17, 2018
Tweet

More Decks by Yuuki Tsubouchi (yuuk1)

Other Decks in Research

Transcript

  1. ֤ઌߦख๏ͷ՝୊ • ϑΝΠΞ΢ΥʔϧϩΪϯά(iptables) • a) ύέοτϨΠςϯγ͕૿Ճ • ύέοτΩϟϓνϟ(tcpdump) • b)

    ύέοτશମΛऩू͢ΔͨΊɺऩू·ͨ͸ղੳͷͨΊͷෛՙͷ૿Ճ • sFlow/NetFlow • c) αϯϓϦϯά͞ΕΔͨΊґଘ໢ཏ཰͕௿Լ • ΞϓϦέʔγϣϯ૚(L7)ͰͷϦΫΤετ୯ҐͷϩΪϯά • d) ΞϓϦέʔγϣϯͷมߋ͕ඞཁ
  2. ཁ݅ • 1)ΞϓϦέʔγϣϯੑೳʹӨڹΛ༩͑ͳ͍઀ଓ৘ใͷऩूՄೳ (՝୊ a),b),c)) • ݱ࣮తͳਫ਼౓Ͱ઀ଓ৘ใͷऩू΋ཱ྆ • 2)ΞϓϦέʔγϣϯͷมߋෆཁͰऩूՄೳ (՝୊d)

    • 3)ू໿Խ͞Εͨϊʔυ୯ҐͰՄࢹԽՄೳ (՝୊e) • 4)ϗετ୯ҐͰ͸ͳ͘ϗετͷෳ੡άϧʔϓ୯ҐͰՄࢹԽՄೳ ՝୊ f) • 5)೚ҙͷ࣌ؒൣғͰͷґଘؔ܎Λग़ྗՄೳ
  3. ఏҊख๏ • ΞϓϦέʔγϣϯͷมߋෆཁͳωοτϫʔΫ௨৴৘ใͷऩू (ཁ݅2) • OSʹ໰͍߹ΘͤऔಘՄೳͳTCP઀ଓ৘ใΛར༻ • ΞϓϦέʔγϣϯੑೳʹӨڹΛ༩͑ͳ͍TCP઀ଓ৘ใͷऩू (ཁ݅1) •

    OS͕΋ͭ௿ෛՙͰऔಘՄೳͳTCP઀ଓͷ౷ܭ৘ใΛར༻ • ू໿Խ͞ΕͨΤοδͱϊʔυ୯ҐͰՄࢹԽՄೳ • Τοδ: ಉҰϗετ͔ͭಉҰϦοεϯϙʔτ΁ͷTCP઀ଓू໿ (ཁ݅3) • ϊʔυ: αʔό؅ཧπʔϧͷAPIͱ࿈ܞՄೳ (ཁ݅4) • ίωΫγϣϯ؅ཧDBʹू໿Խ͞ΕͨTCP઀ଓΛ࣌ؒ෇͖Ͱ؅ཧՄೳ (ཁ݅5)
  4. ϗετϑϩʔू໿ͷ࣮૷ • 1. Netlink APIʹΑΓTCP઀ଓ৘ใΛऔಘ͢Δ • 2. LISTENεςʔτͷ઀ଓͷϩʔΧϧϙʔτͷΈநग़ • 3.

    1.ͱ2.Λಥ͖߹Θͤɼ઀ଓઌϙʔτ͕ϦοεϯϙʔτͰ͋Ε ͹ΞΫςΟϒΦʔϓϯɼͦΕҎ֎ͷ઀ଓ͸ύογϒΦʔϓϯͱ ൑ఆ͢Δɽ
  5. send agent agent CMDB Host Host agent Host analyzer sysadmin

    get get ఏҊख๏ͷશମϑϩʔ֓ཁ
  6. send agent agent Postgres Host Host agent Host CLI sysadmin

    get get ఏҊख๏ͷશମϑϩʔ֓ཁ Mackerel get
  7. github.com/yuuki/mftracer $ mftctl --level 2 --dest-service blog --dest-roles redis --dest-roles

    memcached blog:redis ᵋ<-- 10.0.0.22:many (connections:30) ᵋ<-- 10.0.0.23:many (connections:30) ᵋ<-- 10.0.0.24:many (connections:30) ᵋ<-- 10.0.0.30:many (connections:1) ᵋ<-- 10.0.0.31:many (connections:1) ᵋ<-- 10.0.0.25:many (connections:30) blog:memcached ᵋ<-- 10.0.0.23:many (connections:30) ᵋ<-- 10.0.0.25:many (connections:30)
  8. ࠓޙͷ՝୊ • αʔϕΠ • ֤ωοτϫʔΫ૚Ͱઌߦݚڀ͕͋ΔͨΊɺຊݚڀͷཱͪҐஔΛ໌֬Խ • ධՁ • ϑΝΠΞ΢ΥʔϧϩΪϯάͱύέοτΩϟϓνϟͷϨΠςϯγ૿େͷධՁ •

    ͢΂ͯͷ઀ଓ৘ใΛऔಘͰ͖ΔΘ͚Ͱ͸ͳ͍ͨΊɼ઀ଓ৘ใͷऔಘ཰Λ֬ ೝ͠ɼ࣮ӡ༻ʹ͓͍ͯɼे෼ͳਫ਼౓Ͱ͋Δ͜ͱΛ֬ೝ • ల๬ • ಉ͡Α͏ͳ௨৴Λ͍ͯ͠ΔϗετΛΫϥελϦϯάਪఆ • ίϯςφܕԾ૝Խ؀ڥͰͷґଘؔ܎ͷղੳ΁ͷൃల