Microservices Platform Teamã§Tech leadããã¦ãã@deeeeeeetã§ãï¼
æ¨å¹´ã®MTC2018ã§ã¯Microservices Platformãã¼ã ã®ç«ã¡ä¸ããã1å¹´ã§åããåãçµãã§ãããã¨ãç´¹ä»ãã¾ããï¼
å ·ä½çã«ã¯Stranglerãã¿ã¼ã³ã«ããMonolithããMicroservicesã¸ã®æ®µéçãªãªã¯ã¨ã¹ã移è¡ãè¡ãããã®API gatewayã®éçºãï¼Microservicesã®ã¤ã³ãã©ã®ã»ããã¢ãããç°¡åã«ããµã¼ãã¹éçºãã¼ã ã®Self-serviceåãé²ããããã®Starter-kitã®éçºï¼Goã§ã®Microservicesã®éçºãé«éã§å§ããããã®Templateããã¸ã§ã¯ãã®éçºï¼Spinnakerã®å°å ¥ãªã©ã«ã¤ãã¦ç´¹ä»ãã¾ããï¼
ãããã¯Platformã¨ãã¦æä½éã®æ©è½ãæ´åããã«ãããï¼ãããªãDeveloper productivityã®åä¸ãç®æãã¦Platformãé²åããã¦ãã¾ããï¼æ¬è¨äºã§ãã®å¾ï¼å¹´éã§ãã¼ã ã¨ãã¦åããåãçµãã§ãããã¨ãç°¡åã«ç´¹ä»ãããã¨æãã¾ãï¼
Platformä¸ã§åãå§ããMicroservices
éçºè ããµã¼ãã¹ãåããã¦ãã®ãµã¼ãã¹ãã客ãã¾ã«ä¾¡å¤ãåºãã¦ããPlatformã¨ãã¦ã®æ義ãããã¾ãï¼ããã¯Platformã®åæããã®ææ³ã§ããï¼Platformãå®æãããâ ãµã¼ãã¹ãä¹ããã¨ãã段éçãªããæ¹ã§ã¯ãªãã¦ï¼åããããµã¼ãã¹ãåãããªããåæã«åºç¤ãé²åãããã¨ãããã¨ããã£ã¦ãã¾ããï¼ã¹ãã¼ãæãåºããä¸æ¹ã§è² åµãè² ãå¤ãæ¹å¼ããã®ç§»è¡ãå¿ è¦ã«ãªããã¨ãããã¾ãããâ¦ï¼ï¼
2019å¹´ã¯Mercariå´ã¯Monolithã¸ã®ã³ã¼ãã¸ã®å¤æ´ãåºæ¬çã«ç¦æ¢ããã³ã¼ãããªã¼ãºã«ãã£ã¦ããMicroservicesåãå éãåºåæ©è½ãªã©ãMicroservicesåã¨ãã¦åãåºããã¦Platformä¸ã§åãå§ãã¾ããï¼ãã詳ããã¯@stanakaããã«ããã¡ã«ã«ãªã®ãã¤ã¯ããµã¼ãã¹ç§»è¡ã®é²æ (2019å¹´å¬)ãåèã«ãã¦ãã ããï¼ï¼ããã¦2019å¹´ã®2æã«ã¯Merpayããªãªã¼ã¹ããã¾ããï¼@tjunããã«ããã¡ã«ãã¤ã®ãã¤ã¯ããµã¼ãã¹ã¨Cloud Native ã詳ããã§ããMerpayã¯åæããMicroservicesã¨ãã¦Platformä¸ã§åããããã«éçºãããã¦ããããããæ¬çªã§åãå§ãã¦ãã¾ãï¼
Platformã®ãã¼ã¹ã¨ãªãã¤ã³ãã©ã«ã¯Kubernetesã使ã£ã¦ãã¾ããï¼ç¾æç¹ã§ã®Platformã®è¦æ¨¡æã¯Namespaceã®æ°ï¼=microservicesã®æ°ï¼ã§ã¯150+ã«Podã®æ°ã¯3000+ã«ã¾ã§å¢ãã¦ããï¼2020å¹´ãããã«å¢å ãã¦ããäºå®ã§ãï¼
2019å¹´ã®åãçµã¿
以ä¸ã§ã¯æ¨å¹´ã®å¬ãã2019å¹´ã«ããã¦Platformãã¼ã ãåãçµãã§ãããã¨ãä¸é¨ã§ããç°¡åã«ç´¹ä»ãã¾ãï¼
Production Readiness Check
Mercariã®Microservicesã§ã¯ãµã¼ãã¹ãã¼ã ããã¶ã¤ã³ããéçºï¼QAï¼éç¨ã¾ã§ã®E2Eã®Responsibilityãæ ããããã«ãããã¨ãç®æãã¦ãã¾ãï¼ãã¾ã«èª¤è§£ãããã®ã§æ¸ãã¦ããã¨ï¼å ¨ã¦ãBackend Engineerã«æ ã£ã¦ãããããã¨æã£ã¦ããããã§ã¯ãªãï¼ãµã¼ãã¹ã®è¦æ¨¡ãç¹æ§ã«åããã¦SREãQAãData scientistã¨ãã£ãå°éçãªã¡ã³ãã¼ããã¼ã ã«Embeddedããã¦ããï¼ãããã¯ãã¼ã ã«å°éã®å½¹å²ã®ã²ã¨ãç«ã¦ãï¼æ¡ç¨ãã¦ããã®ãä¸çªã®çæ³ã ã¨æã£ã¦ãã¾ãï¼ï¼ããããããªããµã¼ãã¹ãã¼ã ã«æ¬çªéç¨ãããã»ããã«èãããã¢ããªã±ã¼ã·ã§ã³ãæ¸ãã®ã¯é常ã«å¤§å¤ãªãã¨ã§ãï¼ä¸æ¹ã§å¤§éã«éçºããã¦ããMicroserviceséçºã«Platform teamãå ¥ãé©å®ãã®è£å©ããããã¨ãç¾å®çã§ã¯ããã¾ããï¼
ãã®ãããªèª²é¡ã解決ããããã«å§ããã®ãProduction Readiness Checkã¨ãã®ã¬ãã¥ã¼ã§ãï¼MaintainabilityãObservabilityï¼Reliabilityï¼Securityï¼Accessibilityã¨ãã£ãè¤æ°ã®è¦³ç¹ããæ¬çªéç¨ã®ããã«ã¢ããªã±ã¼ã·ã§ã³ãæºããã¹ããã¨ããã§ãã¯ãªã¹ãã¨ãã¦æºåãï¼Github Issueãã¼ã¹ã§ãã®ãã§ãã¯ã®ã¬ãã¥ã¼ãä¾é ¼ããã¨ããä»çµã¿ãä½ãã¾ããï¼ä¾ãã°ãã§ãã¯ã¨ãã¦ã¯Kubernetesã«é¢ãã¦Pod Disruption Budgetsï¼PDBï¼ãã¡ããã¨ã»ãããã¦ãã? ãDatadogã®Timeboardã¨Screenboardãæºåãã¦ããã? ãªã©ãããã¾ãï¼ãµã¼ãã¹ãã¼ã ã¯æ¬çªReleaseåã«ãããã®ãã§ãã¯ãæºããPlatform teamï¼ç¾å¨ã¯Architect teamï¼ã«ä¾é ¼ãæãï¼ã¬ãã¥ã¼ãå®äºãã¦åãã¦æ¬çªã¸Releaseãå¯è½ã«ãªãã¾ãï¼ãã®ä»çµã¿ã«ããããç¨åº¦ã®Reliabilityãæ ä¿ã§ãï¼ãã¤Platformã¨ãã¦ãèªååã追ãã¤ãã¦ããªããã¨ããã§ãã¯ã¨ãã¦ããç¨åº¦å¼·å¶ãã¦ãããã¨ãå¯è½ã«ãªãã¾ããï¼
ä¸æ¹ã§1å¹´è¿ãéç¨ãã¦å¤ãã®èª²é¡ãåºã¦ãã¾ããï¼ä¾ãã°Production Readiness Checkãæºããã¢ããªã±ã¼ã·ã§ã³ã®éçºã«æéããããããããã¨ï¼50è¿ãã®é ç®ããããµã¼ãã¹éçºããã¤ã¤ããããæºããã®ã¯å¤§å¤ã§ãâ¦ï¼ï¼ã¬ãã¥ã¼ã«æéãããããã¨ï¼æåã®ãªãªã¼ã¹ã§ãããã§ãã¯ãã§ãã¦ãããç¶ç¶çãªãã§ãã¯ãã§ãã¦ããªããã¨ã¨ãã£ã課é¡ãæãããã¾ãï¼ãããã®å¤ãã¯ããåºç¤ã¨ãã¦ã®æ½è±¡åãèªååãé²ãããã¨ã§è§£æ±ºã§ããã¨æã£ã¦ãã¾ãï¼ä¾ãã°æä½éã®Monitroing dashboardã¯èªåã§Bootstrapãããï¼ãã®ãã¨è§¦ããService meshã«ãã£ã¦ã³ã¼ãã§è§£æ±ºãã¦ããé¨åããªããã¦ããã¨ãã£ããã¨ã«åãçµãã§ãã¾ãï¼ãã¡ããã¬ãã¥ã¼èªä½ã®èªååãèãã¦ãã¾ã!
Secure Container Supply Chain (Kritis)
Securityã¨ä¸è¨ã«è¨ã£ã¦ãå¤ãã®æ¬¡å ãããã¾ãï¼IAM管çãããããã¯ã¼ã¯æ§æï¼Nodeã»Containerã¬ãã«ã®Attack surfaceã®æå°åãIsolationã®å¼·åãªã©ãªã©â¦ä¸ã§ãMicroservicesåã«ããï¼ããã¦Containeråã«ããæ§ã ãªç¨®é¡ã®ã¢ããªã±ã¼ã·ã§ã³ãï¼ããé«é »åº¦ã«ãããã¤ãããããã«ãªã£ãããï¼äºæããã¤ã¡ã¼ã¸ã®ã¿ã決ããããå ´æã«ãããã¤ããããã¨ãæ ä¿ãããã¨ãé常ã«éè¦ã«ãªã£ã¦ãã¾ããï¼ãã®ããã¾ãæã ãä»å¹´ã«æ³¨åããã®ã¯Container supply chainã®Securityã§ãï¼Container supply chainã¨ã¯ãã£ããããã¨Containerã¤ã¡ã¼ã¸ã®Buildããããã«å¯¾ããæ§ã ãªãã¹ãï¼ããã¦Deployããã¾ã§ã®Pipelineã®ãã¨ã§ãï¼
Container supply chainã«ãããã»ãã¥ãªãã£å¼·åã®æ§æã§ããããã®ã¯CI/CD Pipelineã®1ã¹ãã¼ã¸ã§ã»ãã¥ãªãã£ãã§ãã¯ãè¡ãï¼äºæããªããããã¯èå¼±ãªContainerãè¦ã¤ãã£ãã¨ãã«Pipelineã失æããã¦ãããã¤ãæ¢ããæ¹å¼ã§ãï¼ãããããã¯æçµçãªãããã¤ã®æ¨©éããã¤ã¢ã«ã¦ã³ããCompromiseãããæã«ä½ã®æå³ããªããªãã¨ããåé¡ãããã¾ãï¼ä»¥ä¸ã®å³ãåãããããã§ãï¼ã©ãã ãPipelineã§ãã§ãã¯ãå¼·åãã¦ãæå¾ã®æå¾ã§ç¡ã«ãªãâ¦ï¼ï¼
Secure Software Supply Chains on Google Kubernetes Engine (Cloud Next ’19)
ãããã®èª²é¡è§£æ±ºããããããã¦å°æ¥çãªæ¡å¼µæ§ãèæ ®ãã¦å°å ¥ããã®ãKritisã¨Grafeasã§ãï¼ããå ·ä½çã«ã¯Grafeasã§ã¯ãªãã¦ãã®APIãæã£ãGoogle Container Registryï¼GCRï¼ã®Container analysis APIã使ã£ã¦ãã¾ãï¼ï¼Kritisã¨Grafeasã®åä½ãç°¡åã«èª¬æããã¨ï¼ã¾ãåCI/CD Pipelineã®Stageã§ã¯ãã®ãã§ãã¯ã®çµæã«å¿ãã¦ã¡ã¿ãã¼ã¿ãGrafeasã«éãã¤ãã¾ãï¼ä¾ãã°Containerã¤ã¡ã¼ã¸ã®Security scanãè¡ããã®çµæãGrafeasã«ä¿åãã¾ãï¼Kritisã¯Kubernetesã®Admission webhookã¨ãã¦å®è£ ããã¦ããï¼ãããã¤ã®ManifestãApplyãããç´å¾ã«å¼ã°ãã¾ãï¼ããã§Kritisã¯Grafeasã«åãåãããè¡ããã®ã¤ã¡ã¼ã¸ã«å¯¾ãã¦äºæãããã§ãã¯ãè¡ããããå¦ãã確èªãã¾ãï¼ããããã¦ããã°ãããã¤ãç¶ç¶ãï¼ããã§ãªããã°ãããã¤ã失æããã¾ãï¼ä¾ãã°ï¼QAã¨Security scanãéãã¦æ¬²ãããã°ãããæå®ãã¦ããKritisã«ãã§ãã¯ããã¾ãï¼ããã«ãããããã¤ã®æ¨©éãæ»æè ã«å¥ªãããã¨ãã¦ãï¼äºæãããã§ãã¯ãéã£ã¦ããªãä»»æã®ã¤ã¡ã¼ã¸ãKubernetes clusterã«ãããã¤ãããã¨ã¯ã§ããªããªãã¾ã
ç¾ç¶ã®åãã®ä½¿ãæ¹ã¯é常ã«ã·ã³ãã«ã§ãï¼æ¢ã«ããã¤ãã®çºè¡¨ã§è¿°ã¹ã¦ããããã«åãã®Kubernetesã¯Multitenantæ§æã«ãã¦ããMicroservicesãã¨ã«Namespaceãæºåãã¦ãã¾ãï¼ããã«Statefulãªãµã¼ãã¹ã¯Kubernetesä¸ã«ã¯è¼ããªãã§GCPã®managed serviceã使ãããã«ãã¦ããï¼åServiceãã¨ã«GCP Projectãæºåãã¦ãã¾ãï¼ããã¦ã³ã³ãããåGCPããã¸ã§ã¯ãã®GCRã«ç½®ãã¦ãããããã«ãã¦ãã¾ãï¼Kritisã¯ãããå¼·å¶ãã¦ãã¾ãï¼ã¤ã¾ãããNamespaceã¸ãããã¤ã§ããã¤ã¡ã¼ã¸ããã®Namespaceã«ç´ã¥ãGCRã«ããã¤ã¡ã¼ã¸ã«éå®ãã¦ãã¾ãï¼ããã«ããå°ãªãã¨ããã¼ã ã管çãã¦ããªãã¤ã¡ã¼ã¸ããã®Namespaceã«ãããã¤ã§ããªããã¦ãã¾ãï¼
Grafeasã¨Kritisã¯é·æçã«ã¿ãæ¡å¼µæ§ã«æå¾ ãã¦ãã¾ãï¼Grafeasã¯ã³ã³ããã¤ã¡ã¼ã¸ã«å¯¾ãã¦æ§ã ãªã¡ã¿ãã¼ã¿ãä»ä¸ã§ãã¾ãï¼ä¾ãã°QAãã¼ã ããã¹ããããã®çµæãã¡ã¿ãã¼ã¿ã¨ãã¦ä¿åãããã¨ãã§ãããï¼ã»ãã¥ãªãã£ãã¼ã ãContainerã¤ã¡ã¼ã¸ãScanãã¦çµæãã¡ã¿ãã¼ã¿ã¨ãã¦ä¿åãããã¨ãèãããã¾ãï¼ããã¦Kritisã¯ãã®ã¡ã¿ãã¼ã¿ãèªç±ã«çµã¿åããã¦Policyãä½ããã¨ãã§ãã¾ãï¼ä¾ãã°ã·ã³ãã«ãªPoCã®ãµã¼ãã¹ã§ããã°æä½éã®ãã§ãã¯ãéã£ã¦ãã°ãããã¤ã許å¯ãï¼Merpayã«ããã¦é常ã«ã»ãã¥ã¢ãªãµã¼ãã¹ã¯å³å¯ãªãã§ãã¯ãå¼·å¶ãããã¨ãã§ãã¾ãï¼Platformã¨ãã¦å¼·ãã¨æãã®ã¯ï¼åããé¢ããå¿ è¦ããªããã¨ã§ãï¼åããæ°ã«ããã®ã¯ããã©ã«ãã§å¼·å¶ããã¹ãé¨åã®ã¿ã§ï¼ãµã¼ãã¹ãã¼ã ã¯ãã®ç¹æ§ã«å¿ãã¦ã¡ã¿ãã¼ã¿ãPolicyãèªç±ã«è¿½å ãã¦é²åããã¦ãããã¨ãã§ãã¾ãï¼
ãã Kritisèªä½ãæªæçã§ãã課é¡ãããã¾ãï¼åãã¯Forkãã¦ä½¿ã£ã¦ãã¾ãï¼ï¼GCPã®Managedçã§ããBinary Authorizationã®æ¡ç¨ãèãã¾ãããï¼å½æã¯Clusterã¬ãã«ã®ãã§ãã¯ããã§ããNamespaceã¬ãã«ã®ç´°ããªå¶å¾¡ãã§ããªãã£ãã®ã§æ¡ç¨ãè¦éãã¾ããï¼å°æ¥çã«ã¯Binary Authorizartionã«ç§»è¡ãããï¼ãããã¯èªåãã¡ã§Kritisã«ç¸å½ãããã®ãæ¸ãã?ã¨ããææ決å®ãå¿ è¦ã«ãªãã¨æãã¦ãã¾ãï¼
ãã詳ããã¯@vbanthia_ã®Securing microservices continuous delivery using grafeas and kritis ãåèã«ãã¦ãã ããï¼
Service mesh (Istio)
Microservicesåãé²ãã»ã©ï¼åæ£ã·ã¹ãã åãé²ãã»ã©ãããã¯ã¼ã¯ã«èµ·å ããåé¡ã¯å¤ããªã£ã¦ãã¾ããï¼ç¹ã«Kubernetes Serviceã¯LBã¨ãã¦ã¯L4ã¬ãã«ã§æä½éã®æ©è½ããæä¾ãã¦ããªãããï¼ããReliableãªãµã¼ãã¹ééä¿¡ãå®ç¾ããããã«ã¯èªåãã¡ã§è§£æ³ãæºåããå¿ è¦ãããã¾ãï¼ä¾ãã°åãã¯ãµã¼ãã¹ééä¿¡ã«gRPCãã¡ã¤ã³ã«ä½¿ã£ã¦ãã¾ãããã®ãã¼ããã©ã³ã·ã³ã°ã®ããã«Client side LBãã©ã¤ãã©ãªã¨ãã¦å®è£ ããããã¦ãã¾ãï¼ãã以å¤ã«ãã¤ã³ã·ãã³ããèµ·ãã度ã«é©åãªTimeoutãRetryï¼APIã®Rate limitï¼Circuit breakingæ©è½ãå¿ è¦ã ã¨ãã声ããããããã«ãªãã¾ããï¼
Mercariã¨Merpayã®Microservicesã¯åºæ¬çã«å ¨ã¦Goã§å®è£ ãã¦ããç¾å¨ã¯Polygrotã¸ã®å¿åã¯æã£ã¦ãã¾ããï¼ç¹ã«åæã¯æè¡ãçµ±ä¸ãã¦ãã®ä¸ã§ä»çµã¿ãæ§ç¯ãããã¨ã大åã ããã§ãï¼ï¼ä¸æ¹ã§ï¼ã©ããã¦ãGoã®ã¿ã§ã¯ååã§ãªãã¨ãããããã¾ãï¼ããã³ãã¨ã³ãã®ããã«Node.jsã使ãï¼MLã®ã¢ãã«ã®Servingã®ããã«Pythonã使ãã¨ãã£ãè¦æãæãããã¾ãï¼ãããã®è¨èªã®è¦æã«åããã¦ã©ã¤ãã©ãªãéçºãã¦ã¡ã³ããã³ã¹ãã¦ããã«ã¯å¤§ããªã³ã¹ãããããã¾ãï¼Goã ãã§ãé常ã«å¤§å¤ã§ã…
ãããã®èª²é¡ã解決ããããããã¦å°æ¥çãªå¤ãã®å©ç¨äºä¾ãèãService mesh Istioã«æè³ãã¦ããææ決å®ããã¾ããï¼Service meshã«ã¤ãã¦ã¯Service meshã¨ã¯ä½ãã«æ¸ãã¾ããï¼ï¼ãã詳ããã¯@vbanthia_ã®Adopting Istio for a multi-tenant Kubernetes cluster in Productionãèªãã§ãããããã§ããï¼Istioãã¾ã æçãã¦ããªããã¨ï¼Kubernetes clusterãMultitenantæ§æã§ããSelf-serviceã«ããåãã¼ã ã®èªç«æ§ãéè¦ãã¦ãããã¨ãªã©ãèæ ®ãã¦æ®µéçã«Istioãå°å ¥ãããã¨ã«æ±ºãã¾ããï¼
段éçãªå°å ¥ã¨ãã¦åããæ¡ç¨ããæ¦ç¥ã¯ã¾ãMeshã®æ§ç¯ã®ã¿ã«éä¸ãããã¨ã§ãï¼Istioãæä¾ããæ©è½ã¯ä½ä¸ã¤éçºè ã«ã¯æä¾ããªãã§åç´ã«Sidecarã³ã³ãããå ¥ãããå¦ãã®ã¿ãè¨å®ã§ããããã«ãã¾ããï¼ããã«ãã£ã¦Istioã®è¤éãªCRDã®ç®¡çã®ãã¨ã¯ä¸æ¦å¿ãã¦ããã«Reliableã«Meshãæ§ç¯ãããã«éä¸ãããã¨ãã§ãã¾ããï¼ä¾ãã°Sidecarã³ã³ããã¨è¨ã£ã¦ãç¾ç¶Kubernetesããè¦ãã¨ããã¯ã¡ã¤ã³ã®ã³ã³ããã¨éãã¯ããã¾ããï¼Sidecarã³ã³ãããSidecarã¨ãã¦æ±ããããã«ããã¨ããå®è£ ã¯é²ãã§ãã¾ãï¼ï¼ãã®ããå³å¯ã«Sidecarã³ã³ããã®èµ·åã®é çªãå¶å¾¡ããªãã¨ãããã¤ã®éã«ãªã¯ã¨ã¹ããè½ã¨ãã¦ãã¾ããã¨ãããã¾ãï¼å°å ¥åã«ãã®ãããªåé¡ã¯å ¨ã¦æ´ãåºãã¦è§£æ±ºãã¾ããï¼
Meshã®æ§ç¯ã®ã¿ã«éä¸ãããã¨ã§ç®¡çããã¹ãã³ã³ãã¼ãã³ããæ¸ãããã¨ãã§ãã¾ãï¼ç¾ç¶ã¯Sidecar injecterã¨Pilotãã使ã£ã¦ãªãï¼ï¼ã³ã³ãã¼ãã³ããæ¸ãããã¨ã§åé¡ãèµ·ãã£ãã¨ãã®åå ç¹å®ã容æã«ãªãã¾ãï¼ã¾ãå°ãªãã³ã³ãã¼ãã³ãã§Istioèªä½ã®ãªãã¬ã¼ã·ã§ã³ã«æ £ãã¤ã¤ï¼ä¸ã¤ä¸ã¤ã®Reliabilityã®æ¹åã«æè³ãããã¨ãã§ãã¾ãï¼Istioãå°å ¥ãã¦åå¹´ä½çµã¡ã¾ãããæªã ã«èµ·ãããã¼ã¸ã§ã³ãã¨ã®ç ´å£çãªå¤æ´ãã¤ã³ã¹ãã¼ã«æ¹æ³ã®æ··ä¹±ãªã©ãè¦ã¦ããã¨æ®µéçãªæ¹å¼ã¯æ£è§£ã ã£ãã¨æãã¦ãã¾ãï¼ç¾ç¶åãã¯ãã¼ã¸ã§ã³ãä¸ããã®ã¯ããã¾ã§é£ãããªãï¼ï¼
æ¥å¹´ã¯Developr Surveyãè¦æã«å¿ãã¦æ®µéçã«æ©è½ãéæ¾ãã¦ããäºå®ã§ãï¼
DevStats
Microservices Platformã®Missionã¯ã¡ã«ã«ãªã°ã«ã¼ãéçºè ããããµã¼ãã¹ãéãReliableã«ã客æ§ã«æä¾ãããã¨ãã§ãããããªPlatformãã¤ãããã¨ã§ãï¼è©³ããã¯éçºè åãã®åºç¤ãã¤ããã§è©±ãã¾ããï¼ï¼Platformãä½ãã«ãã£ã¦ç¹ã«åãã¯Developer productityãé常ã«éè¦ãªKPIã¨èãã¦ãã¾ãï¼ãã¡ããããã¾ã§è¦æãçãæ±ããåé¡ãåæè¡åã¨ãã¦æ¹åãéãããã¤ããã§ãããããå ·ä½çãªæ°åã¨ãã¦å¯è¦åãããã¨ãã§ãã¦ãã¾ããã§ããï¼ããããã¸ã§ã¯ãã«ããã¡ããã¨Productivityãæ¹åããã¦ãããã客観çãªæ°åã§è¦ã¦æ¯ãè¿ãï¼æ¬¡ã®ããã¸ã§ã¯ãã®Priorityã®ææ決å®ã«ç¹ããªãã¨ææ決å®ãå人ã®èãæ¹ãªã©ã«åã£ã¦ãã¾ã£ããï¼æ¬å½ã«é¡§å®¢ã®æ¬²ããã£ããã®ããããé¢ãã¦ãã¾ãå¯è½æ§ãããã¾ãï¼
ãã®èª²é¡ã解決ããããã«ä½ãå§ããã®ãDevStatsã§ãï¼ããã¯Microservicesã®åã³ã³ãã¼ãã³ãããããããæ å ±ãå¼ã£ãæãã¦ãã¦ä¸ç®æã«éç´ãã¦å¯è¦åããä»çµã¿ã§ãï¼ä»ã¯éç´å ã«Datadogãå©ç¨ãã¦ãã¾ãï¼ï¼ä¾ãã°åãã¯Developer Productivityã®å¯è¦åã¨ãã¦Accelarateã§ã使ããã¦ããDeploy per developer per dayã¨ããææ¨ã使ã£ã¦ãã¾ãï¼ãã®å¯è¦åãå®ç¾ããããã«SpinnakerãTerraformã®CIãªã©Deployã«é¢ããå ¨ã¦ã®ã³ã³ãã¼ãã³ãã«Agentãä»è¾¼ã¿ãããã¤æ å ±ãDatadogã«éãã¦ã°ã©ãåãã¦ãã¾ãï¼
ãã®ä»çµã¯ã¾ã åãå§ããã°ããã§æ¹åãå¿ è¦ã§ããï¼ä»å¾Platformã®ææ決å®ã®ããã®éè¦ãªè¦ç´ ã«ãªã£ã¦ããã¨èãã¦ãã¾ãï¼ãã詳ããã¯@babarotã«ãããã¤ã¯ããµã¼ãã¹ã®ææãå¯è¦åããCloud Functions in Go at Mercariãåèã«ãã¦ä¸ããï¼
Network Re-design (GCP Shared VPC)
Platformãå§ãã人ï¼@deeeetï¼ãã¨ã¦ãæªçã ã£ãã®ã§ããã¾ã§GKEã®Networkã¯GCPã®Default networkã§ä½ããã¦ãã¾ããï¼Merpayã®ãªãªã¼ã¹ãçµããReactiveãªæ©è½ã ãã§ãªãããé·æãè¦ã¦Proactiveã«Platformãæ¡å¤§ãã¦ãããã¨ãèããã¨ãã«ãããã¯ã¼ã¯æ§æã大ããªé害ã«ãªãã¾ããï¼
ä»å¾ã®æ¡å¤§ã¨ãã¦åããç¾ç¶èãã¦ããã®ã¯ï¼HomogeneosãªMulti-clusteræ§æï¼åãClusterãè¤æ°ç«ã¦ã¦HAæ§æã«ããï¼ãMicroservices Platform以å¤ãæã£ã¦ããGKE clusterã¨ã®ãã©ã¤ãã¼ããªæ¥ç¶ï¼Multi-regionalæ§æï¼AWSã¨ã®Hybrid cloudæ§æãªã©ã§ãï¼ããããå ¨ã¦è¸ã¾ãã¦ã¼ãããNetworkã®åè¨è¨ãè¡ãã¾ããï¼å ·ä½çã«ã¯ä»¥ä¸ã®å³ã®ããã«Shared VPCã使ãå ¨ã¦ã®ãããã¯ã¼ã¯ãå¸ãGCPããã¸ã§ã¯ãã¨ãã®ç®¡çã³ã³ãã¼ãã³ããæºåãï¼ä»ã¯Platformãã¼ã ã管çãã¦ãã¾ããå°æ¥çã«Cloud networkãã¼ã ãã§ãããã¨ãæ³å®ãã¦ãã¾ãï¼ããããå ¨ã¦ã®ãµã¼ãã¹ããã¸ã§ã¯ãã¨ã¡ã«ã«ãªã°ã«ã¼ãMicroserviceså ¨ä½ã®ãã©ã¤ãã¼ãIP空éï¼ããã¦Cloudééä¿¡ãéä¸ç®¡çããã¨ãããã®ã§ãï¼
ãã詳ããã¯@lainraã«ããNetwork Architecture Design for Microservices on GCPãåèã«ãã¦ä¸ããï¼
GKE Cluster Recreation & Migration
GKE clusterãæ§ç¯ãã¦æ¢ã«2年以ä¸ã«æ¸¡ã£ã¦éç¨ããã¦ãã¾ããï¼Platformãé²åãã¦ãã¾ãããGKEèªä½ãå¤ãã®æ©è½ããªãªã¼ã¹ããã¾ããï¼å¤ãã®æ©è½ã¯ãã®ã¾ã¾ä½¿ãã¾ããï¼ä¸ã«ã¯Clusterãä½ãç´ãå¿ è¦ããããã®ãããã¾ãï¼ä¾ãã°Routes-based clusterãVPC native clusterã«Zonal clusterãRegional clusterã«ããã«ã¯ä½ãç´ããå¿ è¦ã§ãï¼ç¹ã«VPC native clusterã¯å¤§ããªå¤æ´ã§ï¼ããã¤ãã®æ©è½ãVPC native Clusterã§ãããã¨ãåæã«ä½ããå§ãã¦ãã¾ãï¼ä¾ãã°NEGsãªã©ï¼ï¼ã¾ãä¸è¿°ããShared VPCæ§æã¸ã®ç§»è¡ãClusterã®ä½ãç´ããå¿ è¦ã§ãï¼
ç¾ç¶GKE clusterä¸ã«ã¯100ãè¶ ããMicroservicesãåãã¦ãã¾ãï¼Clusterã®ä½ãç´ãã¯ããããåããã¤ã¤ãµã¼ãã¹éçºã«å½±é¿ãä¸ããªãå½¢ã§è¡ãå¿ è¦ãããç°¡åãªãã¨ã§ã¯ããã¾ããï¼é£è¡æ©ã§ä¹å®¢ãéã³ã¤ã¤ãã®ã¡ã¤ã³ã¨ã³ã¸ã³ãå ¥ãæ¿ãããããªãã®ã§ãï¼ï¼ããããããªãScalabilityã¨Availabilityã®ããï¼GKEã¨ãã®å¨è¾ºã®GCPãµã¼ãã¹ã®æ©æµãåããããï¼ããã¦ä½ããPlatformã®ä»å¾ã®ãããªãçºå±ã®ããã«GKE Clusterã®ä½ãç´ãã¨ãã®ç§»è¡ãè¡ãææ決å®ããã¾ããï¼
ãã®ããã¸ã§ã¯ãã¯åãå§ãã¦æ¢ã«å年以ä¸ãçµã£ã¦ããã¾ã çµãã£ã¦ãã¾ããï¼ãã詳ãã話ã¯ããã¸ã§ã¯ããå®äºããæç¹ã§å ¬éãã¾ããï¼ã·ã¼ã ã¬ã¹ãªç§»è¡ï¼å®å ¨ãªèªååï¼ã«ã¯ã³ã¹ããããããããããããç¨åº¦ã®èªåå+çèã¨ããé¸æè¢ãåã£ã¦ãã¾ãï¼ç¹ã«GKEã触ãè¤æ°ã®ã³ã³ãã¼ãã³ãéï¼TerraformãKubernetesã®manifestã管çããCI/CDãSpinnakerï¼ã®çµ±ä¸ãã§ãã¦ããªããã¨ã大ããªèª²é¡ã¨ãã¦ä¸ãã£ã¦ãã¾ããï¼ç§»è¡å¾ã¯çèã§ãããããªãã£ãé¨åã課é¡ã¨ãã¦ãã®æ¹åã«æè³ããäºå®ã§ãï¼ã¾ãå¾çºã®äººè¨ãããã¨ã¯ãã 1ã¤ï¼ãã¤ã§ãä½ãç´ãã¦ç§»è¡ã§ããããã«è¨è¨ãã¦ãã!!
åãæ¹æ¹é©
ä¸ã§ç´¹ä»ãããããªããã¸ã§ã¯ãã¯ã©ãã大ããªããã¸ã§ã¯ãã§ããï¼æ±ºãã¦å人ã®åã§ã©ãã«ããªããã®ã§ã¯ããã¾ããï¼ãã¼ã ã¨ãã¦åãVisionãè¦ã¦Alignãï¼PlatformãProductã¨ãã¦è¦ã¦Product managementããï¼æ±ºããããã¸ã§ã¯ãã確å®ã«é²ããProject managementãããï¼ãã¼ã ã決ããããã¿ã¹ã¯ã«éä¸ã§ããç°å¢ãç¨æããã¨ãã£ããã¨ãé常ã«å¤§åã§ãï¼Plattformãã¼ã ã¯ãã®ãããªåãæ¹ã常ã«ãã¼ã ã§æ¹åãã¦ãããã¼ã ã§ãï¼åããã©ã®ããã«ããã¸ã§ã¯ãã®é²ãæ¹ãæ¹åãã¦ããã㯠How We Structure Our Work At Mercari Microservices Platform Teamã§è©±ãã¾ããï¼ï¼
ããã«é¢ãã¦ã¯å¥éããã°ãæ¸ãäºå®ã§ããï¼ä»å¹´ãã£ããã¨ã¨ãã¦ã¯Platformãã¼ã ã®Missionã¨Visionãæ確ã«å®ç¾©ãããã¨ï¼ãã®Visionã¨Developer surveryã«ããåãã3å¹´ã®Roadmapã決ãããã¨ï¼Roadmapããã¨ã«æ¬¡ã®åå¹´ã®ãã¼ã ã®ç®æ¨ãç«ã¦ããã¨ï¼ååæã§ã¯çããã…ï¼ï¼ããã¦ãã®ç®æ¨ãéæããããã«6-week release cycleã«ããããã¸ã§ã¯ããåããã¨ï¼ãªã©ãããã¯ããã¾ããï¼ãããã¹ããã¨ãã¨ããããããã¨ãã¯ç¡éã«ããã®ã§ãã®ä¸ã§ä½ã«åªå 度ãã¤ãããã¯ã¨ã¦ã大åã§ãï¼ä»ã®ä»çµã¿ã§ã¯ããããã¾ã決ãããã¤ã¤ããã¨æãã¾ãï¼ã¾ãé·æã§ãã®ãèãããã¨ã§æ¥ã ã®ææ決å®ãæ¹åã§ãã¾ããï¼ä¾ãã°ãã®æ©è½Aãã¤ããã¨ãã«ï¼å°æ¥Xããããã¨ã«ãªãããAã¯ãããã¦ãããã»ããè¯ããªã©ï¼ããããã¾ã ã¾ã æ¹åã®ä½å°ãããã¾ãï¼
課é¡
æå¾ã«ç¾ç¶ã®åããæ±ãã¦ãã課é¡ãããã¤ãç´¹ä»ãã¾ãï¼
New feature adaptation
1ã¤ç®ã®èª²é¡ã¯æ°ããæ©è½ã®æ¨é²ã§ãï¼ãKritisãIstioãå ¥ãã¦ä½¿ããããã«ãã¾ãã!ãã¨è¨ã£ã¦ãçã使ãå§ãã¦ãããããã§ããã¾ããï¼Platformã¨ãã¦ã¯ãããéè¦ã ã¨åãã£ã¦ãã¦ãï¼æ¥ã ãããã¯ãéçºã«è¿½ããã¦ãããµã¼ãã¹ãã¼ã ããããã°ãã®ã¡ãªãããæ義ãã¡ããã¨ç解ãã¦ããããªãã¨å°å ¥ã®åªå 度ã¯ä¸ãã¦ãããã¾ããï¼å ¬å¼ããã¥ã¡ã³ãããããããããèªãã§ãã!ã¨ãããã®éç¨ãã¾ããï¼æ°å人ã®ã¨ã³ã¸ãã¢çµç¹ã§ããã°ãã®ãããªåé¡ã¯ãªãããããã¾ãããï¼ä»ã®Mercariã®ããã«æ°ç¾äººè¦æ¨¡ã®çµç¹ã§ã¯é¿ããããªãåé¡ã§ãï¼çã«ãã®éè¦æ§ãç解ãã¦ãããèªå¾çã«åãã¦ãããã«ã¯ã©ãããã¹ããï¼ã¯Platformã¨ãã¦ã¡ããã¨èããªããã°ãããªãåé¡ã§ãï¼
ãã®èª²é¡ã解決ããããã«ã¯Platform ãã¼ã ããã社å ã®Advocateã¨ãã¦ã®å½¹å²ãå¼·ããã¦ããå¿ è¦æ§ãæãã¦ãã¾ãï¼ãã¡ããå°éã®äººãéããã¨ãèæ ®ãã¤ã¤ï¼ï¼æ©è½ãä½ã£ã¦çµããã§ã¯ãªãã¦ãããåºãããã¨ã¾ã§è²¬ä»»ãæã¤ãã¨ï¼ããã¸ã§ã¯ãã®è¦ç©ãããããã¾ã§èãã¦è¨å®ãããã¨ã大åã ã¨æã£ã¦ãã¾ãï¼ããã¯å Googleã®SREã®@lizthegreyãCode less, engineer moreã§åæ§ã®ãã¨ãè¨ã£ã¦ãã¾ãï¼ï¼ãã¡ããèªååã«ããéçºãã¼ã ã®æãåããªãã§ç§»è¡ãè¡ããããªä»çµã¿ãè¨è¨ããèãããã¨ã大åã§ãï¼
Operation maturity
Platformãããã¤ã¤Microservicesã«ããSelf serviceåãé²ãããã¨ã§è¾¿ãã¤ãï¼ã¤ã®èª²é¡ã¯ããªãã¬ã¼ã·ã§ã³ã®æç度ã¯ãã¼ã«ãæä¾ããã ãã§ã¯æ¹åããªããã¨ãããã¨ã§ãï¼ããã¯åæ§ã®ãã¨ãSREã¨ãã¦æ¨ãé²ãã¦ããNew York Timesã®SREãåããã¨ãè¨ã£ã¦ãã¾ãï¼
ããã¯æ°æ©è½ã®æ¨é²ã¨ä¼¼ã課é¡ã§ãï¼SpinnakerãIstioï¼Vaultã¨ãã£ããã¼ã«ãæä¾ããã ããªãã¬ã¼ã·ã§ã³ãReliabilityãæ¹åãããããã§ã¯ãªãã§ãï¼ããããã¼ã«ã«å§åããã¦éã«ä½¿ããã¦ãã¾ãå¯è½æ§ãããã¾ãï¼ããã¯èªåãã¡ã§éç¨ãããã¼ã«ã ãã§ã¯ãªãã¦SaaSã«ãåæ§ã®ãã¨ãè¨ãã¾ãï¼Datadogãå ¥ããã ãï¼PagerDutyãå ¥ããã ãã§æå³ããªããããããã£ããã¨ä½¿ãåãã¦ããæå³ãããã¾ãï¼
ãã®èª²é¡ã®è§£æ³ã¯ä¸ã¨ä¼¼ã¦ãã¾ãã社å ãã¬ã¼ãã³ã°ãã¯ã¼ã¯ã·ã§ãããªã©ããã£ã¦ãããã¨èãã¦ãã¾ãï¼ã¾ãçµç¹ã¨ãã¦ãããEmbedded SREï¼åãã¡ã¤ã³ã«ç¹åãã¦Reliabilityã«è²¬ä»»ããã¤SREï¼ã¨ãããã¼ã«ã®å¿ è¦æ§ãå¢ãã¦ããã¨æãã¦ãã¾ãï¼ä»¥ä¸ã®ãããªã¤ã¡ã¼ã¸ãè¯ãã®ã§ã¯ãªããã¨æã£ã¦ãã¾ãï¼ï¼
Too many tools and team growth
æå¾ã¯Platformãã¼ã å ã®èª²é¡ã§ãï¼KubernetesããIstioï¼Spinnakerï¼Kritisï¼Vaultãªã©ãªã©Platformã管çãã¦ããã³ã³ãã¼ãã³ãã®æ°ã¯ããªãå¢ãã¦ãã¾ããï¼ç¾ç¶ã¯1ãã¼ã ã¨ãã¦ãããã管çãã¦ãã¾ã£ã¦ãããã¼ã ã¨ãã¦èãããã¨ãå¤ããªãããã¦ãã¾ãï¼ã¾ããã¼ã ã®æ°ã10人ã«ãªãããã³ãã¥ãã±ã¼ã·ã§ã³ã³ã¹ããé«ã¾ã£ã¦ãã¾ãï¼ä»¥ä¸ã®å³ãããããããï¼
ãããã®èª²é¡ã解決ããããPlatformãã¼ã å ãå°éçãªãã¼ã ã«åå²ãã¦ããå¿ è¦ãããã¨æã£ã¦ãã¾ãï¼ãã¼ã ãã¨ã«ç®¡çããã¹ãã³ã³ãã¼ãã³ããæ確ã«åãï¼ããããã®ãã¼ã ã§èªå¾çã«ããããã®åé¡ã«ãã©ã¼ã«ã¹ã§ãããããªä½å¶ãã¤ããå¿ è¦ãããã¾ãï¼ããã«é¢ãã¦ã¯Kubernetesã³ãã¥ããã£ã®Special Interested Groupï¼SIGï¼ã®ããæ¹ãåèã«ãªãã¨æã£ã¦ãã¾ãï¼
ä»å¾ã®å±æ
æå¾ã«ä»å¾ã®Platformã®å±æã«ã¤ãã¦ããã¤ãã¢ã¤ãã£ã¢ãç°¡åã«ã¾ã¨ãã¾ãï¼ã¾ãããæ½è±¡åãé²ãããã¨ï¼Microservices Platform on Kubernetes at Mercariã§ã話ããããã«Kubernetesã«æå¾ ãããã¨ã¯ãã®æ¡å¼µæ§ã§ãï¼MercariãMerpayã®Microservicesã«é©ããæ½è±¡åãæä¾ããMercari PaaSçãªãã®ãä½ããªããã¨èãã¦ãã¾ãï¼ã¾ãä¸è¿°ããããã«åãã¯ã¡ã«ã«ãªã°ã«ã¼ãå ¨ä½ã®Productivityãèãã¦ãã¾ãï¼ä»ã¯JPã®ãã¨ãã¡ã¤ã³ã«èãã¦ãã¾ããUSã®éçºã«é¢ãã¦ãããååä½å¶ããã¡Global Platformã¨ãªããã¨ç®æãã¦ãã¾ãï¼å®é¨çã«ãµãã¼ãã¯å§ãã¦ãã¾ãï¼ï¼ã¾ãProductivityã ãã§ã¯ãªãFlexibilityãPlatformã¨ãã¦éè¦ãªãã¡ã¯ã¿ã¼ã ã¨æã£ã¦ãã¾ãï¼ä¾ãã°GCPã ãã§ã¯ãªãAWSã®ãµã¼ãã¹ãMicroservicesã§ä½¿ããããã«ãããã¨ï¼Go以å¤ã®è¨èªãã·ã¼ã ã¬ã¹ã«ä½¿ããããã«ãããã¨ãªã©ãä»å¾ã¯èãã¦ããããã¨æã£ã¦ãã¾ãï¼
æå¾ã«
æè¿èªã¿å§ããSoftware Engineering at Googleã«ã¯ã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ã¨ããã°ã©ãã¼ã®éããæ確ã«å®ç¾©ããã¦ãã¾ãï¼ãSoftware Enginnering is programing integrated over timeï¼æéçµéãèæ ®ããããã°ã©ãã³ã°ãããã®ãã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ã§ãï¼ãã¤ã¾ãã³ã¼ããæ¸ãã¨ãã«ãã®é·æçãªéç¨ãã¡ã³ããã³ã¹ï¼ãã¼ã ã§ã®éçºãèããã®ãã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ã§ãï¼Platform ãã¼ã ã¯ç¹ã«ãããçå£ã«èããªããã°ãªããªããã¼ã ã§ãï¼ä½ã¬ã¤ã¤ã¼ã§ãããããããã®å¤æ´ã¯é£ããï¼ä½æ°ãªãæ¸ããã³ã¼ããæãããããã«é·æçã«å©ç¨ãããå¯è½æ§ãããï¼ãããè² åµã«ãªã£ã¦ãã¾ããã¨ãããã¾ãï¼2å¹´ã«ãããPlatformããã£ã¦ãã¦ãã®å®ç¾©ã®éããå®æãã¦ãã¾ãï¼
ä»ã®Platformãã¼ã ã«æ±ãããã¦ããã®ã¯0ã1ã«ãããã¨ã§ã¯ãªã100ã1000ã«1000ã10000ã«ãããã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ãã§ãï¼ãããã®ãããªä»äºã«èå³ãæã¡ããå ·ä½çãªRoadmapãªã©ãèãããæ¹ã¯æ¯éé£çµ¡ããã ããï¼