Slide 1

Slide 1 text

1 Meets MLOps ML@Loft #9 Lain Matsuoka @lain_m21

Slide 2

Slide 2 text

2 ! ॴଐɿAIνʔϜ ιϑτ΢ΣΞΤϯδχΞ ○ 2019/01ʙ ! ϝϧΧϦͰ΍ͬͨϓϩδΣΫτʢൈਮʣ ○ Ձ֨αδΣετ ○ τϨʔσΟϯάΧʔυը૾ೝࣝ ○ ݕࡧϦϥϯΩϯάʢόοΫΤϯυʣ ○ ΦϯϥΠϯ࣮ݧ؀ڥߏஙʢόοΫΤϯυʣ ! ϞσϦϯά͔ΒόοΫΤϯυɺΠϯϑϥ։ൃ· Ͱ෯޿͘୲౰ Lain Matsuoka/দԬ ྰԻ

Slide 3

Slide 3 text

3 ϝϧΧϦͷػցֶशαʔϏε Agenda Istioͱ͸ʁ Istio͕΋ͨΒ͢Ըܙ 02 03 01

Slide 4

Slide 4 text

4 ϝϧΧϦͷػցֶशαʔϏε

Slide 5

Slide 5 text

5 ݱߦͷػցֶशαʔϏεͨͪ ! ҧ൓ग़඼ݕ஌ʢෳ਺υϝΠϯʣ ! Ձ֨αδΣετ ! ײಈग़඼ʢ৘ใͷࣗಈิ׬ʣ ! ഑ૹํ๏αδΣετ ! ը૾ݕࡧ ! etc.

Slide 6

Slide 6 text

6 ݱߦͷػցֶशαʔϏεͨͪ ! ҧ൓ग़඼ݕ஌ʢෳ਺υϝΠϯʣ = API + TF Serving ! Ձ֨αδΣετ = API + TF Serving ! ײಈग़඼ʢ৘ใͷࣗಈิ׬ʣ = API + TF/ONNX Serving + Faiss ! ഑ૹํ๏αδΣετ = API + PostgreSQL ! ը૾ݕࡧ ɹ = API + TF Serving + Faiss ! etc. ଟ༷ͳΞʔΩςΫνϟͷਪ࿦αʔϏεΛKubernetesΫϥελʔ্Ͱӡ༻

Slide 7

Slide 7 text

7 ػցֶशαʔϏεͷಛੑ ! ୯७ʹܭࢉෛՙ͕ߴ͍ ! ෳ਺ίϯϙʔωϯτΛ૊Έ߹ΘͤͨෳࡶͳΞʔΩςΫνϟʹͳΓ΍͍͢ ○ લॲཧɺޙॲཧΛߦ͏APIαʔόʔ ○ Deep Learningͷਪ࿦αʔόʔʢTF Serving, ONNXRuntimeʣ ○ ྨࣅ౓ݕࡧαʔόʔʢFaiss, NMSLIBʣ ○ छʑͷσʔλϕʔεʢRedis, PostgreSQLʣ IstioͰαʔϏεϝογϡΛߏங͠ɺޮ཰తʹ؅ཧ

Slide 8

Slide 8 text

8 ͱ͸ʁ

Slide 9

Slide 9 text

9 ϚΠΫϩαʔϏεͱαʔϏεϝογϡ Control Plane Data Plane Service A Service Container Envoy Proxy Service B Service Container Envoy Proxy Service C Service Container Envoy Proxy Service D Service Container Envoy Proxy ! ϚΠΫϩαʔϏε܈ͷӡ༻ͱ࿈ܞΛޮ཰Խ͢Δ

Slide 10

Slide 10 text

10 Istioͷओͳػೳ ! ΞϓϦέʔγϣϯΞάϊεςΟοΫʹɺԼهͷػೳ͕ఏڙ͞ΕΔ ○ τϥϑΟοΫ੍ޚ ○ ௨৴಺༰΍ϝτϦΫεͷऔಘɺ؂ࢹ ○ ೝূɺΞΫηε੍ݶɺ҉߸Խ

Slide 11

Slide 11 text

11 Istioͷओͳػೳ ! ΞϓϦέʔγϣϯΞάϊεςΟοΫʹɺԼهͷػೳ͕ఏڙ͞ΕΔ ○ τϥϑΟοΫ੍ޚ ○ ௨৴಺༰΍ϝτϦΫεͷऔಘɺ؂ࢹ ○ ೝূɺΞΫηε੍ݶɺ҉߸Խ

Slide 12

Slide 12 text

12 ͕΋ͨΒ͢Ըܙ

Slide 13

Slide 13 text

13 ෛՙ΍ϨΠςϯγͷϞχλϦϯάɺࣗಈεέʔϦϯά ! Envoy͕औಘ͢ΔϝτϦΫεΛPrometheus + GrafanaͰ؂ࢹ ○ ඵؒϦΫΤετ਺ ○ ϨΠςϯγ ○ CPUɾϝϞϦར༻཰ ! औಘͨ͠ϝτϦΫεΛݩʹɺHPAʢHorizontal Pod AutoscalerʣͰࣗಈε έʔϦϯά

Slide 14

Slide 14 text

14 ΧφϦΞσϓϩΠʹΑΔθϩμ΢ϯλΠϜϦϦʔε ! IstioͷVirtual ServiceʹΑΔτϥϑΟοΫ੍ޚΛ࢖༻ ○ KubernetesͷServiceͷΈͰ͸ෆՄೳͳཻ౓Ͱ੍ޚՄೳ ! ࠶ֶशͨ͠Ϟσϧ΍ɺ৽نϑΟʔνϟʔΛ҆શʹϦϦʔεͰ͖Δ ○ ྲྀྔΛ0ʹ͢Δ͚ͩͰ҆શʹϩʔϧόοΫ - route: - destination: host: service-a.default.svc.cluster.local
 weight: 99 - destination: host: service-b.default.svc.cluster.local
 weight: 1 Service A Service B Virtual Service Service A Service B Virtual Service

Slide 15

Slide 15 text

15 ϛϥʔϦϯάʹΑΔຊ൪؀ڥͰͷαʔϏεݕূ ! IstioͷVirtual Service͸ϛϥʔϦϯάػೳ΋αϙʔτ ○ ΦϦδφϧͷτϥϑΟοΫͷ׬શͳίϐʔΛྲྀೖͤ͞ΒΕΔ ! ࣮؀ڥͰͷϦΫΤετͰ҆શʹಈ࡞ݕূͰ͖Δ Service A Service B Virtual Service - route: - destination: host: service-a.default.svc.cluster.local
 weight: 100 mirror: host: service-b.default.svc.cluster.local
 mirror_percent: 100

Slide 16

Slide 16 text

16 ·ͱΊ

Slide 17

Slide 17 text

17 IstioͰػցֶशαʔϏεͷӡ༻Λ͍͍ײ͡ʹʂʂ ! ػցֶशαʔϏε͸ෳ਺ίϯϙʔωϯτ͔ΒͳΔෳࡶ͔ͭߴෛՙͳαʔϏ εʹͳΓ͕ͪ ! IstioʹΑΔαʔϏεϝογϡΛར༻͢Δ͜ͱͰɺޮ཰Α͘ෳ਺ͷػցֶश αʔϏεΛӡ༻ ○ ΞϓϦέʔγϣϯଆʹखΛೖΕͳͯ͘Α͍ ○ ؂ࢹ΍ͦΕΛϕʔεʹͨࣗ͠ಈεέʔϦϯά ○ τϥϑΟοΫ੍ޚΛར༻ͨ͠ݕূɺ҆શͳϦϦʔεɾϩʔϧόοΫ