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

やらかした話 - ログ集約編

uraura
January 21, 2021

やらかした話 - ログ集約編

AWS Startup Tech Meetup Online#1

uraura

January 21, 2021
Tweet

Other Decks in Technology

Transcript

  1. cluster ͱ͸ • PC/VR/εϚϗ͔ΒࢀՃͰ͖Δόʔνϟϧ SNS • ษڧձ΍ϥΠϒͳͲͷΠϕϯτ͕Ͱ͖ͨ Γɼࣗ࡞ήʔϜΛ࡞ͬͯެ։Ͱ͖ͨΓ • https://resources.awscloud.com/aws-

    summit-online-japan-2020-on-demand- industry-4-10523/cus-64-aws-summit- online-2020-cluster-inc ͰͥΜͿ͠Ό΂Γ· ͨ͠
  2. clusterͷαʔόʔαΠυ֓ཁ • ECS • HTTP API Server • ઀ଓதͷϢʔβʔΛ؅ཧ͢ΔͨΊͷdaemonతͳαʔϏε •

    ఆ࣌ͷόονδϣϒ (scheduled task) • EC2 • ۭؒ಺ͷମݧΛఏڙ͢ΔͨΊͷMQTTαʔόʔ • ۭؒ಺Ͱඞཁͳ৘ใΛੜ੒ʗૹड৴͢ΔͨΊͷಠࣗαʔϏε • Lambda
  3. clusterͷαʔόʔαΠυ֓ཁ • ECS • HTTP API Server • ઀ଓதͷϢʔβʔΛ؅ཧ͢ΔͨΊͷdaemonతͳαʔϏε •

    ఆ࣌ͷόονδϣϒ (scheduled task) • EC2 • room಺ͷମݧΛఏڙ͢ΔͨΊͷMQTTαʔόʔ • room಺Ͱඞཁͳ৘ใΛੜ੒ʗૹड৴͢ΔͨΊͷಠࣗαʔϏε • Lambda CloudWatch Logs
  4. clusterͷαʔόʔαΠυ֓ཁ • ECS • HTTP API Server • ઀ଓதͷϢʔβʔΛ؅ཧ͢ΔͨΊͷdaemonతͳαʔϏε •

    ఆ࣌ͷόονδϣϒ (scheduled task) • EC2 • room಺ͷମݧΛఏڙ͢ΔͨΊͷMQTTαʔόʔ • room಺Ͱඞཁͳ৘ใΛੜ੒ʗૹड৴͢ΔͨΊͷಠࣗαʔϏε • Lambda CloudWatch Logs ΄΅ಉ͡ߏ੒ͰEFWTUHQSE ؀ڥ "84ΞΧ΢ϯτ ଘࡏ
  5. ͠͹Βͨͬͨ͋͘Δ೔ɽɽɽ • Domain status͕ Upgrade processing ͷ··Կ΋Ͱ͖ͳ͍ঢ়ଶʹ • • clusterͷstatus͸ਅͬ੺

    (※ը૾ࡱΓ๨Ε) • Lambda͸શ෦ࣦഊͯ͠ϦτϥΠ͍ͯͨ͠ͷͰɼݺग़ճ਺ʗॲཧ࣌ؒʗ ϩάग़ྗྔ͕͍͢͜͝ͱʹ • →݁ہ͜ͷDomain͸࡟আ͢Δ͜ͱʹͳͬͯ͠·͍·ͨ͠
  6. ഊҼ • Elasticsearch ServiceͷෛՙΛແବʹ૿େ͍ͤͯͨ͞ • ର৅ͷlog-groupʹsubscription f i lterΛઃఆ͢Δ͚ͩɼͱ͍͏ঢ়ଶͩͬͨͷ Ͱɼ͋ΒΏΔlog-groupʹઃఆΛ͍Εͯ͠·ͬͨ

    • ͋·ΓॏཁͰ͸ͳ͍ (ௐࠪʹ΋ར༻͠ʹ͍͘) ϩά΋େྔʹElasticsearch Serviceʹอଘ͞ΕΔ͜ͱʹͳͬͯ͠·ͬͨ • ϦτϥΠͷཞ༻ • ੒ޭ͢ΔݟࠐΈ͕ͳ͍ͷʹϦτϥΠ͠ଓ͚Δঢ়ଶͩͬͨ