Envoy externals and ideas (builderscon 2018)
by
Yosuke Tomita
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
Envoy externals and ideas builderscon 2018 ాཅհ
Slide 2
Slide 2 text
© ChatWork ࣗݾհ ▸ ాཅհ (@seikoudoku2000) ▸ “Dev”͔Β”Ops” (྆ํͷؾ͕͔࣋ͪΔͭΓ) ▸ Navitime (ϩάղੳνʔϜ / ࣾڞ௨APIͷ։ൃ) ▸ Gengo (όοΫΤϯυ։ൃ / AWS, chef, Postgresql) ▸ ChatWork (ΠϯϑϥϚωδϝϯτ෦ → SRE෦) ▸ ࠷ۙͷςʔϚɿ৫ͰγεςϜΛ”͍͍ײ͡”ʹ։ൃɾӡ༻͍ͨ͠
Slide 3
Slide 3 text
© ChatWork EnvoyͷଘࡏΛΔ
Slide 4
Slide 4 text
© ChatWork ؊Λൈ͔Εͨ ▸ Microservices ͷ՝ʹιϑτΣΞΛॻ͍ͯਅ͔ͬΒཱ͔ͪ͏ ▸ ୯ͳΔPoCͰͳ͘ɺ͕ͬͭΓಋೖ͢Δॴ·ͰΓΔ ▸ > 100 service / > 10,000 hosts / All service to service traffic ▸ ൃ͕ҧ͍͗͢Δ / ͷੌ͍Ϩϕϧࠩ… ▸ e.g. ELB/ALB ΘͣɺόϥϯαʔΛࣗલͰ࣮ʂʁ ▸ ϨϕϧࠩΛײ͡ΕΔΑ͏ʹͳͬͨ…? / ϛυϧΣΞ։ൃͷڵຯ
Slide 5
Slide 5 text
© ChatWork ࠓͷඪ ɾEnvoy ੌ͍ʂ͍ͬͯ͏ײಈͷڞ༗ ɾDev / OpsΛΘͣʹɺࣗͷ৫ γεςϜͷڥքઢΛߟ͑Δ͖͔͚ͬʹ
Slide 6
Slide 6 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ ▸ Envoyͱ͍͏”ΞΠσΞ” ▸ ChatWorkͷະདྷ༧ਤ ▸ Microservices ͷπϥϛ ͦͷ̎ ▸ Kubernetesͱ͍͏”ΞΠσΞ” ▸ ·ͱΊ
Slide 7
Slide 7 text
© ChatWork ࠓ͞(ͤ)ͳ͍͜ͱ ▸ Envoy deep dive / ࡉ͔ͳ༻ޠఆٛ ▸ Matt͞ΜͷൃදΛฉ͜͏ ▸ ChatWorkʹ͓͚Δಋೖࣄྫ ▸ It’s a loooong way… ▸ ຊLyftͷൃදɺcookpadͷൃදΛฉ͜͏
Slide 8
Slide 8 text
© ChatWork ఆλʔήοτ ▸ ΤϯδχΞશൠʂ
Slide 9
Slide 9 text
© ChatWork
Slide 10
Slide 10 text
© ChatWork “͍͍ײ͡” ʹ։ൃɾӡ༻͢Δͱʁ
Slide 11
Slide 11 text
© ChatWork “͍͍ײ͡”ʁ ▸ ͱݖݶ͕దʹׂ͞Ε͍ͯΔ / దͳڥքઢ͕͋Δ ▸ ࣗͷέπΛࣗͰ࣋ͬͯνϟϨϯδͰ͖Δ / εϐʔυײ ▸ ਓͷέπΛ࣋ͭͷҧ͏ / ݖҖతʹͳΒͳ͍(ͳΓͨ͘ͳ͍) ▸ ໎ͬͨΒ݈શͳํ by mirakui͞Μ ▸ devops, 2 pizza rule, microservices
Slide 12
Slide 12 text
© ChatWork
Slide 13
Slide 13 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ ▸ Envoyͱ͍͏”ΞΠσΞ” ▸ ChatWorkͷະདྷ༧ਤ ▸ Microservices ͷπϥϛ / ϜζΧγϛ ͦͷ̎ ▸ Kubernetesͱ͍͏”ΞΠσΞ” ▸ ·ͱΊ
Slide 14
Slide 14 text
▸ $MPVE5SFOETCZ"ESJBO$PDLDSPGU ▸ l*U`TTUJMMBQSPCMFNCVUBOFBTJFS QSPCMFNUPTPMWFz ▸ &BTJFSQSPCMFNʹͳΒͳ͍ͳΒߟ͑ͳͯ͘ ྑ͍ ʁ ▸ αʔϏε͕ͲΜͲΜେ͖͘ͳ͍ͬͯ͘ͳΒɺ ͍ͣΕඞཁʹͳΔɺͱ͍͏લఏͰΛਐΊ ͍͖ͯ·͢ © ChatWork Microservicesඞཁʁ
Slide 15
Slide 15 text
© ChatWork Microservicesͷಛ ▸ Fault Tolerant / Resilient ▸ Ͳ͔͜མͪͯશ෦མͪͳ͍Αʂ ▸ Կ͔͍͍͋ͬͯײ͡ʹճ෮͍ͯ͘͠Αʂ ▸ Autonomy ▸ ֤αʔϏεখ͍͞ͷͰࣗతʹͲΜͲΜಈ͚ΔΑʂ
Slide 16
Slide 16 text
© ChatWork Microservices
Slide 17
Slide 17 text
© ChatWork Fault Tolerant Ͳ͔͜ͷαʔϏε͕ෆௐʹͳͬͯ ɺӨڹൣғִ͞Ε͍ͯΔ
Slide 18
Slide 18 text
© ChatWork Resilient ͕࣌ؒܦͭͱ෮چ (ԿΒ͔ͷΈɺ ࡞ΓࠐΈඞཁ)
Slide 19
Slide 19 text
© ChatWork Autonomy ֤αʔϏεಠཱ͓ͯ͠Γɺ αʔϏεؒͷInterface͚ͩఆٛ͠ɺ ͦͷதͰࣗతʹࣗ༝ʹਐԽ
Slide 20
Slide 20 text
© ChatWork ͱݴΘΕ͍ͯΔ͕ɺɺɺ
Slide 21
Slide 21 text
© ChatWork MicroservicesͬΆ͍ͭ ▸ Vulnerable (Distributed SPOF by Sam Newman) ▸ Ͳ͔͜མͪΔͱશ෦མͪΔʂ ▸ ऑ͋ͬͨΒΨϯΨϯ߈ΊࠐΜͰඃ֦େʂ ▸ Unhealthy dependency ▸ “ͳ͔ͥ”ܨ͕Βͳ͍ ▸ Կ͕ى͖ͯΔ͔Α͔͘Βͣʹٙ৺҉َʹɻɻ
Slide 22
Slide 22 text
© ChatWork Vulnerable
Slide 23
Slide 23 text
© ChatWork Vulnerable
Slide 24
Slide 24 text
© ChatWork Vulnerable
Slide 25
Slide 25 text
© ChatWork (MicroservicesʹݶΒͳ͍)
Slide 26
Slide 26 text
© ChatWork
Slide 27
Slide 27 text
© ChatWork
Slide 28
Slide 28 text
© ChatWork ґଘαʔϏεͷSLA͕શ෦99.9%ͱ͢Δͱɺ (0.999)^6 ≒ 99.4% → 18ɺ݄ʹ4࣌ؒ20ͷμϯ Microservices શମͱͯ͠αʔϏεͷྦྷͱͳΔ
Slide 29
Slide 29 text
© ChatWork Unhealthy dependency ͜͜ͷΓऔΓͰΤϥʔ͕ग़ͨɻ
Slide 30
Slide 30 text
© ChatWork Unhealthy dependency Կ͔Α͔͘Γ ·ͤΜ͕ɺϨεϙϯεฦͬͯ ͜ͳͯ͘ΤϥʔʹͳͬͨΜͰௐ ͍ͯͩ͘͞ʙ Τϥʔग़ͯͳ͍͠ɺΦϨΒ ͷ͍ͤ͡Όͳ͍Αɻ“Πϯϑϥ” ͷ͍ͤͰ͠ΐ
Slide 31
Slide 31 text
© ChatWork Unhealthy dependency ▸ શମΛѲͰ͖ͳ͍ / ϒϥοΫϘοΫεͷ෦͕͋Δ ▸ શମ͕ݟͤΔΑ͏ͳϩάج൫/μογϡϘʔυ͕͋Δͱ͍͍͕ɺɺ ▸ ͓ޓ͍ͷڥքͰकΔ͖ϧʔϧ͕ᐆດ ▸ શͯΛԽͰ͖ͳ͍ͱఆٛͰ͖ͳ͍ ▸ 1ݸͷΤϥʔͰௐΔʁ 5ݸʁ10ݸʁ
Slide 32
Slide 32 text
▸ #VJMEJOH.JDSPTFSWJDFT ▸ 1SPEVDUJPO3FBEZ.JDSPTFSWJDFT ▸ #VJMEJOH'BVMU5PMFSBOU.JDSPTFSWJDFT ▸ RJJUB·ͱΊ CZࢲ © ChatWork Microservices࣮/ӡ༻ϊϋ
Slide 33
Slide 33 text
© ChatWork Microservices࣮/ӡ༻keyword ▸ timeout ▸ ઃఆͳ͠/͗ͩ͢ͱɺ͙͢ʹThread pool৯͍ͭͿ͢ͷͰઃఆ͢Δ ▸ (࠷ద৬ਓͷצ…ʁ) ▸ circuit breakers ▸ ͓͔͘͠ͳͬͨαʔϏεͷΞΫηεҰ୴ࢭΊΔ ▸ ෮چޙɺաෛՙঢ়ଶʹ͍ؕΔ͜ͱͰͷඃͷ֦େΛ͙
Slide 34
Slide 34 text
© ChatWork Microservices࣮/ӡ༻keyword ▸ bulkheads ▸ Thread poolΛݺͼग़͠αʔϏε͝ͱʹ͚Δ ▸ ̍ͭͷαʔϏεݺͼग़͠ͰThread poolΛ͍ΔͷΛ͙ ▸ monitoring / obserbavility ▸ Կ͕ى͖ͯΔ͔ͪΌΜͱ͔ΔΑ͏ʹ͢Δ
Slide 35
Slide 35 text
© ChatWork ͦΜͳ͘͠ͳ͘ͳ͍ʁ
Slide 36
Slide 36 text
© ChatWork ৭Μͳݴޠ / ϑϨʔϜϫʔΫ ֤αʔϏεࣗతͳͷͰɺ͖ͳݴޠ/ ͖ͳϑϨʔϜϫʔΫΛબ͍ͨ͠
Slide 37
Slide 37 text
© ChatWork ৭ΜͳϥΠϒϥϦ
Slide 38
Slide 38 text
© ChatWork
Slide 39
Slide 39 text
© ChatWork
Slide 40
Slide 40 text
୭͕ରԠ/୲อ͢Δʁ ֤αʔϏεͷDev͕ػೳ։ൃ ͷεϐʔυΛམͱͯ͠ɺ“໓ଟʹى͖ͳ͍” ͜ͱʹରͯ͠උ͑Δʁ Ops͕શݴޠɺશϥΠϒϥϦͷରԠΛ ߦ͍ɺϝϯς͠ଓ͚Δɺɺɺʁ
Slide 41
Slide 41 text
© ChatWork Observability
Slide 42
Slide 42 text
© ChatWork Ұͨ͠τϨʔγϯά͕ࠔ
Slide 43
Slide 43 text
© ChatWork Microservicesͷπϥϛ ▸ ֤ϊϋͷ1ͭ1͍ͭ֓͠೦Ͱͳ͍͕ɺશͯͷ࣮ݴޠ / ϥΠϒϥ ϦͰશͯͷ௨৴ʹڧ੍͠ɺߋ৽͠ଓ͚Δͷ૬ʹେม ▸ ো͕ى͖ͯॳΊͯؾͮ͘͜ͱ͕ଟ͍ ▸ ڥքઢͷ ▸ શମͱͯ͠ͷ҆ఆੑ (Ops) ͕ɺ֤αʔϏεͷ࣮(Dev)ʹڧ͘ґଘ ▸ Dev͕ػೳ։ൃͷεϐʔυΛΊͯ·Ͱίετ͔͚ͯରԠʁ ▸ OpsͰશαʔϏεΕͬͯݴΘΕͯݫ͍͠
Slide 44
Slide 44 text
© ChatWork Microservicesͷπϥϛ ▸ ௨৴ܦ࿏͕૿͑Ε૿͑Δ΄Ͳɺোൃੜ࣌ͷσόοά͕͘͠ͳΔ ▸ Load Balancer৭ʑͳϛυϧΣΞΛ௨ա͍ͯ͘͠ ▸ IaaS͕ఏڙ͢ΔBalancer(e.g. ALB / ELB) ʹؔͯ͠ɺݶΒΕͨϩά͠ ͔ݟΕͳ͍
Slide 45
Slide 45 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ (ࡁ) ▸ Envoyͱ͍͏”ΞΠσΞ” ▸ ChatWorkͷະདྷ༧ਤ ▸ Microservices ͷπϥϛ ͦͷ̎ ▸ Kubernetesͱ͍͏”ΞΠσΞ” ▸ ·ͱΊ
Slide 46
Slide 46 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ ▸ Envoyͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔEnvoyͷΞϓϩʔν ▸ ChatWorkͷະདྷ༧ਤ ▸ Microservices ͷπϥϛ ͦͷ̎ ▸ Kubernetesͱ͍͏”ΞΠσΞ” ▸ ·ͱΊ
Slide 47
Slide 47 text
© ChatWork
Slide 48
Slide 48 text
© ChatWork rٶຊໜ “ΞΠσΞͱ͍͏ͷෳͷΛҰؾʹղܾ͢ΔͷͰ͋Δ”
Slide 49
Slide 49 text
© ChatWork
Slide 50
Slide 50 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ ▸ Envoyͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔEnvoyͷΞϓϩʔν ▸ ChatWorkͷະདྷ༧ਤ ▸ Microservices ͷπϥϛ / ϜζΧγϛ ͦͷ̎ ▸ Kubernetesͱ͍͏”ΞΠσΞ” ▸ ·ͱΊ
Slide 51
Slide 51 text
© ChatWork Envoy The network should be transparent to applications. When network and application problems do occur , it should be easy to determine the source of the problem.
Slide 52
Slide 52 text
© ChatWork Microservices
Slide 53
Slide 53 text
© ChatWork 1ͭͷαʔϏεͰ
Slide 54
Slide 54 text
© ChatWork Devػೳ։ൃʹूத microservicesͷ҆ఆੑʹؔΘΔ ͱ͜ΖOps͕EnvoyͰҰݩཧ Envoy͕service୯ମͱmicroservicesͷ ҆ఆӡ༻ͷ”ڥքઢ”ͱͳΔ
Slide 55
Slide 55 text
© ChatWork Envoyͷkeyword ▸ Service Mesh ▸ Sidecar ύλʔϯ ▸ Control plane ͱ Data plane ▸ Service mesh data plane vs. control plane ▸ ݴ༿͕ࠞಉ͞Ε͍ͯΔهࣄଟ͍
Slide 56
Slide 56 text
© ChatWork Service Mesh ▸ Envoy ͷΑ͏ͳΈΛநԽͨ͠ݴ༿ ▸ ۩ମྫ͔Βೖͬͨํ͕͔Γ͍͢ (ͱࢥ͏)
Slide 57
Slide 57 text
▸ ڞ௨͢ΔपลλεΫΛಠཱͨ͠ίϯϙʔωϯτ ʹू͠ɺΞϓϦέʔγϣϯͱซઃͯ͠ಈ͔͢ ▸ Α͋͘ΔྫɿSFWFSTFQSPYZͱͯ͠ͷ/(*/9 ▸ ΞϓϦέʔγϣϯ 1)1 QZUIPOFUD Λ· ͍ͨͰ͑ΔQSPYZػೳΛ/HJOYʹ࣋ͨͤΔ ▸ &OWPZ.JDSPTFSWJDFTӡ༻ʹඞཁͳػೳΛू ΊͨQSPYZ © ChatWork Sidecarύλʔϯ Ұॹʹಈ͘ΞϓϦέʔγϣϯͷ͜ͱ ؾʹ͠ͳͯ͘ྑ͍
Slide 58
Slide 58 text
© ChatWork Data Plane ▸ Sidecar proxy = data planeͦͷͷ ▸ Envoy, NGINX, HAProxyͳͲ (LinkerdͰControle Plane͕౷߹͞Εͨ) ▸ microservices ͰඞཁͳػೳΛఏڙ ▸ service discovery ▸ health checking ▸ routing (timeout, circuit breaking) ▸ distributed tracing
Slide 59
Slide 59 text
© ChatWork Control Plane ▸ εςʔτϨεͳdata planeͷू·ΓΛࢄγεςϜͱมԽͤ͞Δଘࡏ ▸ ಈతͳઃఆใͷఏڙ (e.g. service discovery) ▸ Envoyͷ߹ɺxDS ͱݺΕΔAPI͕ఆٛ͞Ε͍ͯΔ (ޙड़) ▸ ਓ͕ؒͦͷׂΛ͢Δ߹͋Δ (ਓྗ Controle Plane) ▸ Istio, Nelson, Envoy Manager (Lyft), cookpadbooking.comࣗ࡞ ▸ (LinkerdControl planeΛแ)
Slide 60
Slide 60 text
© ChatWork Envoyͷઃఆ֓ཁ ▸ ੩తͳconfigurationͱɺAPIʹΑΔಈతͳconfiguration ▸ APIxDS (LDS, RDS, CDS, EDS) ͱݺΕ͍ͯΔ ▸ v1(deprecated) ͔Β v2 (ωοτ্ͷใ͕ࠞࡏɻɻ) ▸ Protcol BufferͰఆٛ͞Εͯͯ໌֬ͩ͠ɺAPIυΩϡϝϯτॆ࣮͍ͯ͠ Δ͕ɺશମͷ֓೦Λઆ໌ͨ͠υΩϡϝϯτݟ͚ͭΒΕͣɻɻ (͜ΕΛ·ͱΊΔ ͱਓؾऀʹͳΕΔ͔͠Εͳ͍)
Slide 61
Slide 61 text
© ChatWork EnvoyͷػೳΛԿݸ͔ ▸ Timeout / Retry ▸ Circuit Breaking ▸ Fault Injection ▸ Observability / Distributed Tracing
Slide 62
Slide 62 text
© ChatWork Timeout / Retry clusters: - name: service2 connect_timeout: 1s "routes": [ { "cluster": "service2", "prefix": "/", "timeout_ms": 3000 "retry_policy" { "retry_on": 5xx, "num_retries": 3 "per_try_timeout_ms": 300, } },
Slide 63
Slide 63 text
© ChatWork Circuit breaking clusters: - name: service2 connect_timeout: 1s circuit_breakers: thresholds: max_connections: 100 max_pending_requests: 100 ᮢͰͷopen/closeͷΈɻhalf-openͳ ঢ়ଶଘࡏ͠ͳ͍
Slide 64
Slide 64 text
© ChatWork Fault Injection clusters: - name: service2 connect_timeout: 1s http_filters: - name: envoy.fault config: delay: {fixed_delay: 20s, percent: 50} upstream_cluster: service2 abort: {percent: 20, http_status: 503} upstream_cluster: service2 োςετɺো࠶ݱࢼݧ͕ ༰қʹߦ͑Δʂ
Slide 65
Slide 65 text
© ChatWork Observability / Distributed tracing Envoy͕distributed tracingͷγ εςϜͷΓऔΓΛͬͯ͘ΕΔ ༻ͷheaderΛserviceͰઃఆ
Slide 66
Slide 66 text
© ChatWork Observability / Distributed tracing ※ NewRelicͱdatadog ૬͍࣍Ͱ֘ͷػೳΛϦϦʔεɻ ετϨʔδཧɺAPMطଘͷmonitoring/alertΛߟ͑Δͱɺ ɹ͕ͬͪ͜༗ྗ͔ʁ Lyft, cookpad ͷࣄྫΛࢀর͍ͯͩ͘͠͞
Slide 67
Slide 67 text
© ChatWork Envoy͕ͨΒ͢ͷ ▸ sidecarͱ͍͏৽͍͠ڥքઢ ▸ ௨৴ΛѲΔ͜ͱͰɺmicroservicesʹඞཁͳ༷ʑͳػೳΛ౷Ұతʹఏڙ ▸ Timeout / retry / circuit breaking etc… ▸ Distributed Tracing ▸ Dev serviceͷػೳ։ൃʹྗ ▸ ͨͩ͠ɺదͳΤϥʔϋϯυϦϯάඞਢʂ ▸ OpssidecarΛ௨ͯ͠Microservicesͱͯ͠ͷ҆ఆੑʹྗ
Slide 68
Slide 68 text
© ChatWork ͍͍ײ͡++ʂ
Slide 69
Slide 69 text
© ChatWork ޙ͔ΒΈΔͱɺͦΓΌͦ͏ͩͬͯײ͋Δ͕ ͦΕ͕ͦ͜”ΞΠσΞ”ͳͷ͔͠Εͳ͍
Slide 70
Slide 70 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ (ࡁ) ▸ Envoyͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔEnvoyͷΞϓϩʔν (ࡁ) ▸ ChatWorkͷະདྷ༧ਤ ▸ Microservices ͷπϥϛ / ϜζΧγϛ ͦͷ̎ ▸ Kubernetesͱ͍͏”ΞΠσΞ” ▸ ·ͱΊ
Slide 71
Slide 71 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ ▸ Envoyͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔEnvoyͷΞϓϩʔν ▸ ChatWorkͷະདྷ༧ਤ → ݱঢ়ͱಋೖͷΞϓϩʔν ▸ Microservices ͷπϥϛ / ϜζΧγϛ ͦͷ̎ ▸ Kubernetesͱ͍͏”ΞΠσΞ” ▸ ·ͱΊ
Slide 72
Slide 72 text
© ChatWork ͬ͘͟Γ·ͱΊΔͱ ▸ ݱঢ় ▸ EC2্ͷPHPΞϓϦέʔγϣϯ + k8s্ͷscalaΞϓϦέʔγϣϯ ▸ ਐߦத ▸ PHPΞϓϦέʔγϣϯͷk8sԽ / ΞϓϦͷ࣮ߦج൫Λk8sʹ౷Ұ ▸ ͦͷ࣍ ▸ service mesh(Envoy) ಋೖ
Slide 73
Slide 73 text
© ChatWork ݱঢ় ▸ Kubernetes(scala)ͱɺEC2ʹprovisioning(PHP)ͷซ༻ ▸ ChatWorkͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ ▸ 2016ͷ͔Βซ༻͕࢝·ͬͨ ▸ Ҏޙͷ৽نΞϓϦk8s্Ͱಈ͍͍ͯΔ ▸ ChatWorkʹ͓͚ΔKubernetes on AWS ▸ Kubernetesӡ༻վળ / ϊϋੵ
Slide 74
Slide 74 text
© ChatWork Dockerfile Dockerfile
Slide 75
Slide 75 text
© ChatWork ਐߦத ▸ PHPΞϓϦέʔγϣϯΛKubernetes্Ͱಈ͔͢ ▸ αʔόӡ༻ͷҰݩԽʹΑΔӡ༻ίετݮ ▸ ϦϦʔεγεςϜͷվળ ▸ DevͱOpsͷڥքઢͷ࠶ઃఆ
Slide 76
Slide 76 text
© ChatWork Dockerfile Dockerfile Dockerfile Dockerfile Dockerfile
Slide 77
Slide 77 text
© ChatWork ͦͷ࣍ ▸ Envoy / Istio (Service mesh) ಋೖ ▸ ͞ΒͳΔαʔϏεͷ҆ఆੑ ▸ ػೳ։ൃεϐʔυ্ ▸ ࠓޙͷαʔϏε૿ʹ͑͏Δج൫
Slide 78
Slide 78 text
© ChatWork Dockerfile Dockerfile Dockerfile Dockerfile Dockerfile
Slide 79
Slide 79 text
© ChatWork Dockerfile Dockerfile Dockerfile Dockerfile Dockerfile Dockerfile Dockerfile Dockerfile Dockerfile Dockerfile
Slide 80
Slide 80 text
© ChatWork
Slide 81
Slide 81 text
© ChatWork ΤϯδχΞืूத http://corp.chatwork.com/ja/recruit/ ▸ ओମੑΛ࣋ͪɺࣗΒߦಈͰ͖Δ ▸ ଞऀΛೝΊɺଚॏͰ͖Δ ▸ ใΛूΊɺڞ༗Ͱ͖Δ ͱ͍͏ํΛܴ͠·͢ʂ
Slide 82
Slide 82 text
© ChatWork
Slide 83
Slide 83 text
© ChatWork ઌʹEnvoyΜͳ͍ͷʁ ▸ ݱঢ়ͷΞϓϦέʔγϣϯΠϯϑϥͷ̎ॏཧ͕େม ▸ k8sʹ౷Ұͯ͠ӡ༻ίετݮ / service meshಋೖίετݮ ▸ ͳͥkubernetesʹدͤΔʁ ▸ kubernetes։ൃ/ӡ༻Λ”͍͍ײ͡” ʹͯ͘͠ΕΔπʔϧͰ͋Δ ▸ ৄࡉ࣍ͷΞδΣϯμʹͯ ▸ Istioͱ͍͏kubernetesͱͷ૬ੑͷ͍͍control plane͕ઈࢍਐԽத
Slide 84
Slide 84 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ (ࡁ) ▸ Envoyͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔEnvoyͷΞϓϩʔν (ࡁ) ▸ ChatWorkͷະདྷ༧ਤ → ݱঢ়ͱಋೖͷΞϓϩʔν (ࡁ) ▸ Microservices ͷπϥϛ / ϜζΧγϛ ͦͷ̎ ▸ Kubernetesͱ͍͏”ΞΠσΞ” ▸ ·ͱΊ
Slide 85
Slide 85 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ (ࡁ) ▸ Envoyͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔEnvoyͷΞϓϩʔν (ࡁ) ▸ ChatWorkͷະདྷ༧ਤ → ݱঢ়ͱಋೖͷΞϓϩʔν (ࡁ) ▸ Microservices ͷπϥϛ ͦͷ̎ → Kubernetes͕ඞཁͱͳΔഎܠ ▸ Kubernetesͱ͍͏”ΞΠσΞ” ▸ ·ͱΊ
Slide 86
Slide 86 text
© ChatWork Microservicesͷߏஙྫ(k8sલ)
Slide 87
Slide 87 text
© ChatWork ͦͷ̍ Dev / Opsͷڥքઢʁ
Slide 88
Slide 88 text
© ChatWork Infrastructure as code ▸ ཧ → શͯίʔυԽ͞Ε͍ͯΔͷͰɺDev / OpsڞʹมߋՄೳ ▸ devops࣮ݱʂ ▸ ݱ࣮ → Infrastructure as codeͷཧ͕Opsʹूத ▸ Ansible / Chef ͷprovisioning toolͷֶशίετڥߏஙίετ ▸ ϞχλϦϯά / ࢹ / ϩάసૹɺશମͷӨڹൣғͷѲ͕͍͠ (ɿ͋͘·Ͱࢲͷܦݧ/͍ͬͯΔൣғͷͰ͢ʣ
Slide 89
Slide 89 text
© ChatWork Ops : AWSͷϦιʔεཧ Infrastructure as codeͷ source code Dev : ΞϓϦέʔγϣϯͷSource Code
Slide 90
Slide 90 text
© ChatWork αʔό্Ͱ ີ݁߹
Slide 91
Slide 91 text
© ChatWork Dev / Opsͷڥքઢʁ ▸ Dev : ৽͍͠ͷ͍͍ͨɺɺ/ αοͱόʔδϣϯΞοϓ͍ͨ͠ɺɺ ▸ Γ͍ͨ͜ͱʹରͯ͠ͷίετ͕͔ͳΓߴ͍ ▸ Ops: ݴޠɺϑϨʔϜϫʔΫ૿͑ΔΜ͔ʙɺɺ / ҆ఆͯ͠ಈ͘ͷʁ ▸ ਓͷέπΛ࣋ͨ͞ΕͯΔײ ▸ ୭Ͱ৮ΕΔΑ͏ʹ͢Δॴ·Ͱͷίετதʑʹେ͖͍
Slide 92
Slide 92 text
© ChatWork ͦͷ̎ αʔόӡ༻ͬͯ͜ΕͰϕετʁ
Slide 93
Slide 93 text
© ChatWork ૬Γ͍͚ͤͨ͞Ͳɺɺ
Slide 94
Slide 94 text
© ChatWork αʔόӡ༻ͬͯ͜ΕͰϕετʁ ▸ ΞϓϦέʔγϣϯͷ૬Γ͕͍͠ ▸ ̍instance = 1ΞϓϦέʔγϣϯ ▸ ෳͷΞϓϦέʔγϣϯ༻ͷprovisioningΛ1 instanceʹྲྀͯ͠ɺશͯ ਖ਼ৗʹಈ͘͜ͱΛอূ͢Δͷ͕͍͠ ▸ αʔϏε૿͑ΔͱΈ߹Θ͕ͤരൃ͠ɺཧͰ͖ͳ͍ ▸ ͬͨͱ͢Δͱɺ·͢·͢Dev͔Β৮ΓͮΒ͍ͷʹɻɻ
Slide 95
Slide 95 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ (ࡁ) ▸ Envoyͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔEnvoyͷΞϓϩʔν (ࡁ) ▸ ChatWorkͷະདྷ༧ਤ → ݱঢ়ͱಋೖͷΞϓϩʔν (ࡁ) ▸ Microservices ͷπϥϛ ͦͷ̎ → Kubernetes͕ඞཁͱͳΔഎܠ (ࡁ) ▸ Kubernetesͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔKubernetesͷར ▸ ·ͱΊ
Slide 96
Slide 96 text
© ChatWork ▸ ɿࢲͷ͜Ε·Ͱͷܦݧ ͔Βɺkubernetesͱ͍͏୯ޠΛར༻͍ͯ͠·͢ ͕ɺίϯςφΦʔέʔετϨʔγϣϯπʔϧ Ұൠʹͯ·Δ(ͣͷ) Ͱ͢ɻ
Slide 97
Slide 97 text
© ChatWork Microservicesͷߏஙྫ(k8s)
Slide 98
Slide 98 text
© ChatWork ίϯςφͱ͍͏ϙʔλϏϦςΟͷߴִ͍ڥͷ͓͔͛Ͱɺڥքઢ͕໌ ֬ʹɻϞχλϦϯάͱ͔ؾʹͤͣʹɺΞϓϦέʔγϣϯ࣮ߦʹඞཁͳڥʹؔ͢Δఆ͚ٛͩ ͋Εྑ͍ͷͰɺϋʔυϧ͕͍ɻ Dockerfile Dockerfile Dockerfile
Slide 99
Slide 99 text
© ChatWork OpsWorkerʹڞ௨ͷϞχλϦϯάϩάసૹͷઃఆΛηοτ͢Εྑ ͍ɻݸʑͷWorkerͷଘࡏΛҙࣝ͢Δ͜ͱ͕΄ͱΜͲແ͘ɺར༻ϦιʔεʹԠͨ͡ΞϓϦέʔ γϣϯ(pod)ஔɺϓϩηεͷҡ࣋kubernetes͕ٓͬͯ͘͘͠ΕΔɻ
Slide 100
Slide 100 text
© ChatWork ڥքઢ͕͍͍ײ͡ʂ ▸ ΞϓϦέʔγϣϯ༻ͷڥߏங͕શʹDevͷकඋൣғʹ ▸ Dockerfileͷֶशίετ͋Δ͕ɺؾʹ͢Δ͜ͱ͕͙ͬͱগͳ͘ͳͬͨ ▸ Opsclusterͷཧɺmonitoring / loggingసૹͷڞ௨ج൫ʹूத ▸ 12 factor app ͱ͍͏ΞϓϦέʔγϣϯͷڞ௨ϧʔϧ ▸ podͷҡ࣋ɺϦιʔεঢ়گʹԠͨ͡ίϯςφஔkubernetes͕ ͬͯ͘ΕΔ
Slide 101
Slide 101 text
© ChatWork αʔόӡ༻͕͍͍ײ͡ʂ ▸ Pet ͔Β Cattle (PHPαʔόɺPythonαʔό…. → k8s Worker) ▸ Ϧιʔεͷ༗ޮ׆༻ ▸ ̍αʔό্ͰͷෳΞϓϦέʔγϣϯͷ૬Γ
Slide 102
Slide 102 text
© ChatWork ͍͍ײ͡++ʂ
Slide 103
Slide 103 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ (ࡁ) ▸ Envoyͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔEnvoyͷΞϓϩʔν (ࡁ) ▸ ChatWorkͷະདྷ༧ਤ → ݱঢ়ͱಋೖͷΞϓϩʔν (ࡁ) ▸ Microservices ͷπϥϛ ͦͷ̎ → Kubernetes͕ඞཁͱͳΔഎܠ (ࡁ) ▸ Kubernetesͱ͍͏”ΞΠσΞ” → πϥϛʹର͢Δkubernetesͷར(ࡁ) ▸ ·ͱΊ
Slide 104
Slide 104 text
© ChatWork ΞδΣϯμ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ (ࡁ) ▸ Envoyͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔEnvoyͷΞϓϩʔν (ࡁ) ▸ ChatWorkͷະདྷ༧ਤ → ݱঢ়ͱಋೖͷΞϓϩʔν (ࡁ) ▸ Microservices ͷπϥϛ ͦͷ̎ → Kubernetes͕ඞཁͱͳΔഎܠ (ࡁ) ▸ Kubernetesͱ͍͏”ΞΠσΞ” → πϥϛʹର͢Δkubernetesͷར(ࡁ) ▸ ·ͱΊ
Slide 105
Slide 105 text
© ChatWork ࠓͨ͜͠ͱ ▸ Microservices ͷπϥϛ ͦͷ̍ → Envoy͕ඞཁͱͳΔഎܠ ▸ Envoyͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔEnvoyͷΞϓϩʔν ▸ ChatWorkͷະདྷ༧ਤ → ݱঢ়ͱಋೖͷΞϓϩʔν ▸ Microservices ͷπϥϛ ͦͷ̎ → Kubernetes͕ඞཁͱͳΔഎܠ ▸ Kubernetesͱ͍͏”ΞΠσΞ” → πϥϛʹର͢ΔKubernetesͷར
Slide 106
Slide 106 text
© ChatWork ࠓͷඪ ɾEnvoy ੌ͍ʂ͍ͬͯ͏ײಈͷڞ༗ ɾDev / OpsΛΘͣʹɺࣗͷ৫ γεςϜͷڥքઢΛߟ͑Δ͖͔͚ͬʹ
Slide 107
Slide 107 text
© ChatWork Feedback ͓ئ͍͠·͢ʂʂ from ωʔϜΧʔυͷQRίʔυ