AWS Summit Tokyo 2019
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.ϝϧΧϦࣸਅݕࡧʹ͓͚Δ Amazon EKS ͷ׆༻ࣄྫࣸਅݕࡧΛࢧ͑ΔόοΫΤϯυ!1גࣜձࣾϝϧΧϦ தՏ จ
View Slide
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.தՏ จ• 20177݄ೖࣾ• ॴଐSRE→AI/MLνʔϜ• σόΠευϥΠό։ൃ͔ΒϑϩϯτΤϯυ։ൃ·ͰΔԿͰTwitter: hnakagawa14GitHub: hnakagawa!2ࣗݾհ
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.Introduction!3
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.What is ࣸਅݕࡧ• ࣸਅݕࡧͱɺ͍ΘΏΔը૾ݕࡧػೳ• ΞϓϦ͔ΒࣸਅΛݩʹΛݕࡧ͢Δ• ໊ΛΒͳͯ͘ը૾͔ΒΛݕࡧͰ͖Δ!4ಈըϦϯΫ: https://youtu.be/kTni8EvOCgI
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.جຊతͳࣸਅݕࡧͷΈ!5Deep Neural Networks(DNN)Λ༻ͯ͠ը૾͔ΒಛϕΫτϧΛऔಘऔಘͨ͠ಛϕΫτϧΛApproximate NearestNeighbor Index(ANN Index)ʹՃͯ͠ը૾indexΛߏஙݕࡧ࣌ʹಉ͘͡ը૾͔ΒDNNΛհͯ͠ಛϕΫτϧΛऔಘ͠ɺANN Index͔Βݕࡧ2 31
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.What is Kubernetes• KubernetesʢҎԼk8sʣͱΦʔϓϯιʔεͷίϯςφɾΦʔέετϨʔγϣϯγεςϜ• k8sʹCustom Resource DefinitionͱݺΕΔಠࣗͷϦιʔεΛఆٛͰ͖Δػೳ͕͋Γɺ։ൃऀͦͷػೳΛհͯ͠k8sͷػೳΛ֦ுͰ͖Δ• Amazon Elastic Container Service forKubernetes (Amazon EKS) ͱk8sͷϚωʔδυɾαʔϏεɺίϯτϩʔϧϓϨʔϯͷཧΛߦͬͯ͘ΕΔ!6
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.What is Custom Resource Definition• Custom Resource DefinitionʢҎԼCRDʣͱಠࣗʹϦιʔεΛఆٛͰ͖Δk8sͷػೳ• CRDɾϦιʔεͱɺΧελϜɾίϯτϩʔϥͰߏ͞ΕΔ• ΧελϜɾίϯτϩʔϥ͕CRDɾϦιʔεͷϥΠϑαΠΫϧ/ঢ়ଶʹԠͯ͡Ϋϥελͷঢ়ଶΛίϯτϩʔϧ͢Δ!7
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.ML Platform LykeionࣸਅݕࡧLykeionͱݺΕΔͷML Platform্ʹߏங͞Ε͓ͯΓɺԼهͷػೳPlatformଆͷػೳΛ༻͍ͯ͠Δ!8• Training/Serving CRD & ΧελϜίϯτϩʔϥ• ίϯςφϕʔεɾύΠϓϥΠϯ• Training/Serving ίϯςφΠϝʔδɾϏϧμʔ• ϞσϧɾϨϙδτϦ
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.Architecture!9
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.Architecture֓ཁਤ!10S3EKS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.1.TrainingɾϦιʔεͷ࡞!11S3EKS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.TrainingɾϦιʔεͷ࡞• Training custom resourceΛCronJob͕࡞• ΧελϜɾίϯτϩʔϥ͕CRDɾϦιʔεͰઃఆ͞ΕͨίϯςφϕʔεɾύΠϓϥΠϯΛ࣮ߦ• ࣮ߦ͢Δόον୯Ґͱͯ͠Hourly, Daily,Monthly͕ଘࡏ!12
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.ίϯςφϕʔεɾύΠϓϥΠϯ• ֤ఔΛݸผͷίϯςφɾΠϝʔδͰ࣮ߦ• ϥΠϒϥϦͷґଘؔͳͲڥφΠʔϒͳMLύΠϓϥΠϯͷΛղܾ• ύΠϓϥΠϯDAGYAMLͰهड़• ֤ఔͷೖग़ྗPersistent VolumeʢҎԼPVʣΛհ͢!13
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.Batch Execution as Custom Resource• શͯͷόον࣮ߦใ͕CRDɾϦιʔεͱͯ͠k8s্ʹΔ• ಉ͡ॲཧΛ࠶࣮ߦग़དྷΔͨΊɺόονͷ࠶࣮ߦΛ͏ো෮چ࡞ۀ͕༰қ!14
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.2.ը૾ͷμϯϩʔυ!15S3EKS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.ը૾ͷμϯϩʔυ• Amazon S3্ʹଘࡏ͢ΔϝϧΧϦɾΠϝʔδετΞ͔Βը૾Λμϯϩʔυ• ύΠϓϥΠϯ্ͬͱ͕͔͔࣌ؒΔఔʢը૾͕େͳͨΊ)• ͦͷͨΊPVʹҰఆظؒΩϟογϡ͢ΔࣄʹΑͬͯ࠶ΠϯσοΫε͕ඞཁͳ࣌ʹૉૣ͘ύΠϓϥΠϯΛճͤΔΑ͏ʹ͍ͯ͠Δ• PVͷ࣮ମ Amazon EBS!16
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.3.ΞηοτͷΞοϓϩʔυ!17S3EKS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.ΞηοτͷΞοϓϩʔυ• ύΠϓϥΠϯͷՌͰ͋ΔಛϕΫτϧͱANN IndexΛϞσϧɾϨϙδτϦʹอଘ• શͯͷՌόʔδϣϯཧ͞Εͨঢ়ଶͰอଘ͞ΕΔ• ϞσϧɾϨϙδτϦGCS্ʹߏங!18
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.4.ServingΠϝʔδͷϏϧυ!19S3EKS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.ServingΠϝʔδͷϏϧυ1. ϞσϧɾϨϙδτϦΛImage BuilderͱݺΕΔdaemon͕ࢹ2. ৽͍͠Serving͖͢Ϧιʔε͕Ճ͞ΕΔͱࣗಈͰServingίϯςφɾΠϝʔδΛϏϧυ• ίϯςφɾΠϝʔδશͯͷANN IndexͷαʔϏϯάʹඞཁͳϦιʔεΛશؚͯΜͰ͍Δ3. Ϗϧυ͞ΕͨίϯςφɾΠϝʔδΛίϯςφɾϨδετϦʹϓογϡ!20
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.5.ServingɾϦιʔεͷ࡞!21S3EKS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.ServingɾϦιʔεͷ࡞• Image BuilderίϯςφɾΠϝʔδΛϏϧυͨ͋͠ͱɺServingΧελϜɾϦιʔεΛ࡞• ServingΧελϜɾίϯτϩʔϥCRDɾϦιʔεͷઃఆΛݩʹඞཁͳDeploymentɺServiceΛ࡞• ຊγεςϜͰߏங͞ΕͨANN IndexΛݸผͷIndexαʔϏεͱͯ͠σϓϩΠ!22
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.6.αʔϏεɾσΟεΧόϦ!23S3EKS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.αʔϏεɾσΟεΧόϦ• Ϋϥελ্ʹଘࡏ͢ΔIndexαʔϏεΛk8sΛհͯࣗ͠ಈతʹऔಘ͢Δ• ͳΔ͘େ͖ͳཻͷIndexΛ༻͢ΔΑ͏ɺҟͳΔظؒɾཻͷIndexαʔϏε(Hourly, Daily, Monthly) ΛࣗಈతʹΈ߹ΘͤΔ• REST <-> IndexαʔϏεؒͷϓϩτίϧgRPCΛ༻!24
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.֓ཁਤͷৼΓฦΓ!25S3EKS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.Conclusion!26
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.ࣸਅݕࡧͷόοΫΤϯυɾΠϯϑϥ1. ίϯςφɾϕʔεͷ࠶ݱੑͷߴ͍γεςϜ2. k8sͷCRD/ΧελϜɾίϯτϩʔϥαʔϏεɾσΟεΧόϦͷػೳΛ׆༻3. Batch Execution as Custom ResourceɺML PlatformͰ࣮ݱ͞Ε͍ͯΔػೳΛ༻͠ɺϩόετͳγεςϜΛߏங4. ΫϥυɾΠϯϑϥΛk8sͰநԽ͢ΔࣄʹΑͬͯɺ֤Ϋϥυɾϕϯμͷྑ͍ͱ͜औΓΛ͍ͯ͠Δ!27
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.Amazon EKSʹ͍ͭͯ• k8sͱ͍͑GCPͱ͍͏Πϝʔδ͕͋Δ͕(։ൃݩ͔ͩΒવ)ɺEKS͜ͳΕ͖ͯͯ҆ఆͨ͠ӡ༻͕ग़དྷΔΑ͏ʹͳͬͨɻ͔͠͠Pros/Consવଘࡏ͢Δɻ• Pros• ૉͷk8sʹۙ͘ɺͦ͏͍ͬͨҙຯͰॊೈͳߏΛΈ͍͢• Cons• ଞࣾͷϚωʔδυk8sαʔϏεʹൺɺk8sʹ͍ͭͯඞཁͳࣄલ͕ࣝଟ͍• ͔͍͠͠উखͷྑ͍AWSͷS3RDSͷଞαʔϏεΛɺk8sͱڞʹ͍͍ͨϢʔβ͕᪳͢Δཧ༝ͳ͍!28
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.AWSͷྑ͍ͱ͜Ζ• AWSͷྑ͍ॴԿͱݴͬͯRDSɺAuroraʹද͞ΕΔɺϚωʔδυɾRDBMSαʔϏε• ࠷ॳRDSͰ࡞ͬͯɺύϑΥʔϚϯεʹࠔͬͨΒAuroraΛ͏• Persistent͕ॏཁͳɺಛʹRDBΛ༻͢ΔγεςϜͰɺ࠷ॳͷબࢶʹͳΔ• ࠓճͷߏྫͱগ͠ҧ͏͕ɺk8s(EKS)ͰϏδωεɾϩδοΫ͕ͷΔΠϯϑϥ෦ΛநԽ͠PersistentʹRDSͷαʔϏεΛ༻͢Δͷ͓͢͢Ίߏͷ̍ͭ!29
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.Thank you all for coming today!30