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

MTC2018 - Microservices Platform at Mercari

MTC2018 - Microservices Platform at Mercari

Speaker: 中島 大一(Taichi Nakashima)

Mercariではサービスと組織の拡大に合わせてMonolithアーキテクチャからMicroservicesアーキテクチャへの移行を進めています.Microservices Platform TeamはこのMicroservicesのためのPlatformの構築を行っています.開発者のDeveloper Productivityを最大限に高め各チームがオーナーシップを持ち独立して高速にサービス開発サイクルを回せるようなPlatformを目指しています.本セッションではMicroservices Platform Teamの取り組みを紹介します。

As Mercari continues to grow as a service and organization, we decided it was time to make the move from a monolith architecture to microservices. The Microservices Platform Team is the team responsible for building the platform for this. The goal is to create a platform that allows developers to maximize their productivity for a rapid service development cycle where teams are independent and have ownership over their projects. In this session, Nakashima will introduce the initiatives the Microservices Platform Team are taking to achieve this goal.

mercari
PRO

October 04, 2018
Tweet

More Decks by mercari

Other Decks in Technology

Transcript

  1. Microservices Platform at Mercari
    Taichi Nakashima
    Tech Lead (Microservices platform)

    View Slide

  2. Tech Lead
    Microservices platform
    Taichi Nakashima

    View Slide

  3. Microservices
    https://www.flickr.com/photos/ronduong/37605344086

    View Slide

  4. 1000
    Engineers Org.
    https://www.flickr.com/photos/owyzzz/3626718695

    View Slide

  5. Speed
    https://www.flickr.com/photos/szymipl/6093250294

    View Slide

  6. https://itrevolution.com/book/accelerate/
    ACCELERATE
    The Science of Lean Software
    and DevOps: Building and
    Scaling High Performing
    Technology Organizations

    View Slide

  7. https://itrevolution.com/book/accelerate/

    View Slide

  8. https://itrevolution.com/book/accelerate/

    View Slide

  9. https://itrevolution.com/book/accelerate/
    Organization Design

    View Slide

  10. Develop
    Monolith
    Test Deploy Operate

    View Slide

  11. Develop
    Monolith
    Test Deploy Operate
    Backend Team
    QA team SRE team

    View Slide

  12. Test Deploy Operate
    Backend Team
    QA team SRE team
    Develop
    Service B
    Develop
    Service A
    Develop
    Service C

    View Slide

  13. Test Deploy Operate
    Backend Team
    SRE team
    Develop
    Service B
    Develop
    Service A
    Develop
    Service C
    QA team

    View Slide

  14. Test Deploy Operate
    Backend Team
    SRE team
    Develop
    Service B
    Develop
    Service A
    Develop
    Service C
    QA team

    View Slide

  15. Test Deploy Operate
    Backend Team
    SRE team
    Develop
    Service B
    Develop
    Service A
    Develop
    Service C
    QA team

    View Slide

  16. Develop
    Service B
    Test Deploy Operate
    Service B Team
    Develop
    Service A
    Test Deploy Operate
    Service A Team
    Develop
    Service C
    Test Deploy Operate
    Service C Team

    View Slide

  17. https://medium.com/netflix-techblog/full-cycle-developers-at-netflix-a08c31f83249

    View Slide

  18. Develop
    Service B
    Test Deploy Operate
    Service Team B
    Develop
    Service A
    Test Deploy Operate
    Service Team A
    Develop
    Service C
    Test Deploy Operate
    Service Team C

    View Slide

  19. Develop
    Service B
    Test Deploy Operate
    Service Team B
    Develop
    Service A
    Test Deploy Operate
    Service Team A
    Develop
    Service C
    Test Deploy Operate
    Service Team C
    Developers need to act
    as SWE, SET and SRE

    View Slide

  20. Develop
    Service B
    Test Deploy Operate
    Service Team B
    Develop
    Service A
    Test Deploy Operate
    Service Team A
    Develop
    Service C
    Test Deploy Operate
    Service Team C
    Too much expected

    View Slide

  21. View Slide

  22. 1 year

    View Slide

  23. 73
    Developing
    19
    Production

    View Slide

  24. What We Achieved

    View Slide

  25. Pave the “Base” Road
    https://www.flickr.com/photos/martin_borjesson/7725354722

    View Slide

  26. https://www.flickr.com/photos/martin_borjesson/7725354722
    Architecture
    DevOps Culture

    View Slide

  27. API Gateway
    Communication
    Template
    Access manage

    View Slide

  28. MySQL Solr
    Monolith API

    View Slide

  29. API gateway
    MySQL Solr
    Kubernetes
    Monolith API

    View Slide

  30. API gateway
    Authority
    Service A
    MySQL Solr
    Kubernetes
    Monolith API

    View Slide

  31. API gateway
    Authority
    Service A
    MySQL Solr
    Kubernetes
    Monolith API
    Service B

    View Slide

  32. API gateway
    Authority
    Service A
    Spanner
    MySQL Solr
    Kubernetes
    Monolith API
    CloudSQL
    Service B

    View Slide

  33. View Slide

  34. API gateway
    Authority
    Service A
    Spanner
    MySQL Solr
    Kubernetes
    Monolith API
    CloudSQL
    Service B

    View Slide

  35. API Gateway
    Communication
    Template
    Access manage

    View Slide

  36. API gateway
    Authority
    Service A
    CloudSQL
    Spanner
    MySQL Solr
    Kubernetes
    Service B
    Monolith API

    View Slide

  37. View Slide

  38. View Slide

  39. Service Team PR generate
    platform-proto CircleCI

    View Slide

  40. API Gateway
    Communication
    Template
    Access manage

    View Slide

  41. View Slide

  42. View Slide

  43. Monitoring
    Error reporting
    Health checking
    Dockerfile
    CI setting

    View Slide

  44. API Gateway
    Communication
    Template
    Access manage

    View Slide

  45. API gateway
    Authority
    Service A
    CloudSQL
    Spanner
    MySQL Solr
    Kubernetes
    Service B
    Monolith API
    SRE team

    View Slide

  46. API gateway
    Authority
    Service A
    CloudSQL
    Spanner
    MySQL Solr
    Kubernetes
    Service B
    Monolith API
    Service Team B
    Service Team A

    View Slide

  47. GCP Project: Kubernetes
    Platform Team
    Kubernetes
    IAM

    View Slide

  48. GCP Project: Kubernetes
    Platform Team
    Kubernetes
    IAM
    Service A Team

    View Slide

  49. GCP Project: Kubernetes
    Platform Team
    Namespace: Service A
    Kubernetes
    IAM
    RBAC
    Service A Team

    View Slide

  50. GCP Project: Kubernetes
    Platform Team
    Namespace: Service A
    Kubernetes
    IAM
    RBAC
    Container A
    Container A
    Container A
    Service A Team

    View Slide

  51. GCP Project: Kubernetes
    Platform Team
    Namespace: Service A
    Kubernetes
    IAM
    RBAC
    Container A
    Container A
    Container A
    GCP Project: Service A
    IAM
    Service A Team

    View Slide

  52. GCP Project: Kubernetes
    Platform Team
    Namespace: Service A
    Kubernetes
    IAM
    RBAC
    Container A
    Container A
    Container A
    Spanner
    GCP Project: Service A
    IAM
    Service A Team

    View Slide

  53. GCP Project: Kubernetes
    Platform Team
    Namespace: Service A
    Kubernetes
    IAM
    RBAC
    Container A
    Container A
    Container A
    Spanner
    GCP Project: Service A
    IAM
    Service B Team
    Service A Team

    View Slide

  54. GCP Project: Kubernetes
    Platform Team
    Spanner
    Namespace: Service A
    Kubernetes
    GCP Project: Service A
    Namespace: Service B
    GCP Project: Service B
    RBAC
    IAM
    RBAC
    IAM
    IAM
    Container A
    Container A
    Container A
    Service B Team
    Service A Team

    View Slide

  55. API Gateway
    Communication
    Template
    Access manage

    View Slide

  56. https://www.flickr.com/photos/martin_borjesson/7725354722
    Architecture
    DevOps Culture

    View Slide

  57. https://www.flickr.com/photos/marc_sud13/8453080595
    Provisioning
    Deploying

    View Slide

  58. GCP Project: Kubernetes
    Platform Team
    Namespace: Service A
    Kubernetes
    GCP Project: Service A
    RBAC
    IAM
    IAM
    Service A Team
    Spanner

    View Slide

  59. Infrastructure as Code
    https://www.flickr.com/photos/trilanes/4714198782/

    View Slide

  60. View Slide

  61. View Slide

  62. Starter-kit
    as terraform module

    View Slide

  63. GCP Project: Kubernetes
    Platform Team
    Namespace: Service A
    Kubernetes
    GCP Project: Service A
    Service A Team
    RBAC
    IAM
    IAM

    View Slide

  64. View Slide

  65. GCP Project: Kubernetes
    Platform Team
    Namespace: Service A
    Kubernetes
    GCP Project: Service A
    Service A Team
    RBAC
    IAM
    IAM
    Spanner

    View Slide

  66. PR Plan & Apply
    Platform Team
    Review
    microservices-terraform CircleCI
    Service A Team

    View Slide

  67. Service B Team
    Service A Team
    Service C Team
    PR
    PR
    PR
    Plan & Apply
    Platform Team
    Review
    microservices-terraform CircleCI

    View Slide

  68. PR Plan & Apply
    PR
    PR
    Platform Team
    Review
    microservices-terraform CircleCI
    Service B Team
    Service A Team
    Service C Team

    View Slide

  69. PR Plan & Apply
    PR
    PR
    Platform Team
    Review
    microservices-terraform CircleCI
    Service B Team
    Service A Team
    Service C Team
    CODEOWNERS

    View Slide

  70. Plan & Apply
    PR
    Platform Team
    Review
    microservices-terraform CircleCI
    Service B Team
    Service A Team
    Service C Team
    PR & Review
    PR & Review

    View Slide

  71. View Slide

  72. View Slide

  73. https://www.flickr.com/photos/marc_sud13/8453080595
    Provisioning
    Deploying

    View Slide

  74. View Slide

  75. GCP Project: Kubernetes
    Namespace: Service A
    Kubernetes
    Namespace: Service B
    Container A
    Container A
    Container A
    Container A
    Container A
    Container B
    Service A Team
    Service B Team

    View Slide

  76. View Slide

  77. 60+ pipelines

    View Slide

  78. View Slide

  79. GUI ...

    View Slide

  80. Infrastructure as Code
    https://www.flickr.com/photos/trilanes/4714198782/

    View Slide

  81. Kubernetes v2 provider
    https://www.flickr.com/photos/trilanes/4714198782/

    View Slide

  82. View Slide

  83. GCP Project: Kubernetes
    Namespace: Service A
    Kubernetes
    Namespace: Service B
    Container A
    Container A
    Container A
    Container A
    Container A
    Container B
    Service Team A
    Service Team B
    PR
    PR
    Sync
    Platform Team
    Review
    microservices-kubernetes

    View Slide

  84. GCP Project: Kubernetes
    Namespace: Service A
    Kubernetes
    Namespace: Service B
    Container A
    Container A
    Container A
    Container A
    Container A
    Container B
    Service Team A
    Service Team B
    PR
    PR
    Sync
    Platform Team
    Review
    microservices-kubernetes
    Developers can learn
    k8s YAML, too

    View Slide

  85. What’s Next?

    View Slide

  86. 73
    Developing
    19
    Production

    View Slide

  87. 73
    Developing
    19
    Production
    Reliable Service
    Operation

    View Slide

  88. SLI/SLO
    Driven Operation
    https://www.flickr.com/photos/samarthshyamanur/8347584639

    View Slide

  89. Chaos Testing
    https://www.flickr.com/photos/foxgrrl/9671201784/

    View Slide

  90. Service Mesh
    https://www.flickr.com/photos/mjsonline/1971492464

    View Slide

  91. View Slide

  92. View Slide