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

Micoservices Platform in Mercari

BABAROT
August 15, 2018

Micoservices Platform in Mercari

BABAROT

August 15, 2018
Tweet

More Decks by BABAROT

Other Decks in Technology

Transcript

  1. 4 • To scale the service more than ever ◦

    * (Code base is getting bigger and complex day by day...) ◦ Make it easy to try new feature / technology ◦ Make it easy to catch up the service logic / domain ◦ Cut down on-boarding cost ◦ Speed up the deployment cycle ▪ Reduce coordination with other teams Why Mercari choose Microservices
  2. 5 • Fault Tolerance / Resilience ◦ As the service

    grows, some features become important components that should not be down (e.g. Timeline) ◦ Do not spread system failure to the whole ◦ Cut down operation cost Why Mercari choose Microservices
  3. 7 • Simpler to deploy / Easy to understand •

    Reusability across business • Faster defect isolation • Minimize the risk of code changes What are Microservices?
  4. 8 • Autonomous ◦ (Units that can be deployed independently)

    ◦ Isolate perspective: ▪ Data consistency and transaction boundaries ▪ Team, Technology, Cohesion, Security, ... What are Microservices?
  5. 9 • Autonomous ◦ (Units that can be deployed independently)

    ◦ Isolate perspective: ▪ Data consistency and transaction boundaries ▪ Team, Technology, Cohesion, Security, ... What are Microservices?
  6. 11 Development in Monolith Develop Monolith QA Deploy Operate QA

    Backend Team A Backend Team B Backend Team C
  7. 12 Development in Monolith Develop Monolith QA Deploy Operate QA

    Backend Team A Backend Team B Backend Team C QA team
  8. 13 Development in Monolith Develop Monolith QA Deploy Operate QA

    team SRE team QA Backend Team A Backend Team B Backend Team C
  9. 14 Development in Microservices Develop Service B QA Deploy Operate

    QA team SRE team Service Team A Service Team B Service Team C Develop Service A Develop Service C
  10. 15 Development in Microservices Develop Service B QA Deploy Operate

    Service Team A Service Team B Service Team C Develop Service A Develop Service C QA Deploy Operate QA Deploy Operate
  11. 17 • Two reasons why Platform is required ◦ Team

    side ◦ System side Why Microservices Platform
  12. 19 Develop Monolith QA Deploy Operate QA Backend Team A

    Backend Team B Backend Team C Develop Service B QA Deploy Operate Service Team A Service Team B Service Team C Develop Service A Develop Service C QA Deploy Operate QA Deploy Operate
  13. 20 Develop Monolith QA Deploy Operate QA Backend Team A

    Backend Team B Backend Team C Develop Service B QA Deploy Operate Service Team A Service Team B Service Team C Develop Service A Develop Service C QA Deploy Operate QA Deploy Operate New team responsibility
  14. 23 Monolithic App Data Access Layer Business Logic UI Database

    Microservices Apps Units that can be deployed independently
  15. 24 Monolithic App Data Access Layer Business Logic UI Database

    Microservices Apps Units that can be deployed independently
  16. 25 Monolithic App Data Access Layer Business Logic UI Database

    Microservices Apps Units that can be deployed independently
  17. 26 Why Platform is required: System side • Bootstrap &

    Provision cost ◦ In case of Monolith, ▪ the infra can be used for every features (reusability) ◦ Unlike Monolith, ▪ need to build the infra for each micro service
  18. 28 Microservices Platform • Centralized GKE Cluster ◦ 1 cluster

    per 1 region • Cloud resources for each microservice ◦ GCP Projects (Cloud SQL, Spanner, etc.) ◦ PagerDuty ◦ Datadog Dashboard
  19. 29

  20. 30 GCP project for GKE Centralized cluster Namespace: Service A

    Namespace: Service B IAM: SRE IAM: Team A IAM: Team B Service A Service B RBAC: Team A RBAC: Team B
  21. 31 GCP project for GKE Centralized cluster Namespace: Service A

    Namespace: Service B IAM: SRE IAM: Team A Service A Service B RBAC: Team A RBAC: Team B Bootstrap Bootstrap IAM: Team B
  22. • Microservice Starter Kit ◦ It became easy for the

    developers to bootstrap own infrastructure by themselves ◦ Just by running 1 command locally, all resources needed for their microservice are created