In this course, we will explain a basic overview of Microservices and various tools combined with GitOps used inside Mercari which powers the developer platform.
microservices in details just the basics. • We don’t cover how Mercari listing works • We don’t cover how Mercari transaction works • … We don’t cover domain-specific knowledges here
Mercari Monolith Solr Scalability Need to scale everything for one part of functionalities. If one part is dead, everything is dead... Complexity Difficult to add new features Difficult to try new technologies Difficult to onboard Availability
Mercari Monolith Solr Scalability Need to scale everything for one part of functionalities. If one part is dead, everything is dead... Complexity Difficult to add new features Difficult to try new technologies Difficult to onboard Velocity Too many overheads, no isolation in criticality Availability
Item team Shipping DB Shipping team Timeline DB Timeline team Resilient Even if one service is dead, others can continue to work Flexible scaling Each service can scale independently and on demand
Item team Shipping DB Shipping team Timeline DB Timeline team Resilient Even if one service is dead, others can continue to work Flexible scaling Each service can scale independently and on demand
Item DB Item team Shipping DB Shipping team Timeline DB Timeline team Resilient Even if one service is dead, others can continue to work Flexible scaling Each service can scale independently and on demand
Item DB Item team Shipping DB Shipping team Timeline DB Timeline team Resilient Even if one service is dead, others can continue to work Flexible scaling Each service can scale independently and on demand Simplicity Easy to add new features Easy to use well suited technologies (e.g., DB)
Item DB Item team Shipping DB Shipping team Timeline DB Timeline team Resilient Even if one service is dead, others can continue to work Flexible scaling Each service can scale independently and on demand Simplicity Easy to add new features Easy to use well suited technologies (e.g., DB) Agility Independent deployment Independent decisions in a small context
Item DB Item team Shipping DB Shipping team Timeline DB Timeline team Resilient Even if one service is dead, others can continue to work Flexible scaling Each service can scale independently and on demand Simplicity Easy to add new features Easy to use well suited technologies (e.g., DB) Agility Independent deployment Independent decisions in a small context
Microservices by Sam Newman (Book) • Production-Ready Microservices by Susan Fowler (Book) • Adopting Microservices at Netflix • Microservices at Spotify
• Write unit tests and integration tests • Response to alerts and incidents • Automate operations and reduce toils • Improve your service reliability based on SLI/SLO • You can and should go bold You need to act as SWE, SET, and SRE
gRPC for communication protocol • Kubernetes for container orchestration • Terraform for cloud service provisioning • Spinnaker for continuous delivery • Argo CD and Tekton for continuous delivery • CUE for configuration language • Github Actions for CI • AWS and GCP for Cloud
SQL for databases • Provides Cloud Pub/Sub for message queuing • Provides Google Cloud Storage (GCS) for blob stores • Provides BigQuery for analytics data warehouses • Provides … (*) * You can use any GCP service for your microservice component
Comments • Advanced Testing with Go • High Performance Go Workshop • So you want to expose Go on the Internet • Go Walkthrough • The Go Programming language (Book)
for Mercari. But you can choose any programming language for your microservices under your responsibility • You must know: ◦ Lots of ecosystems and tools are designed for Go (at the moment) ◦ It may be difficult to get supports from others if you get stuck • Responsibilities: ◦ Write everything by yourself ◦ Hire engineers for your team
◦ Derived from Google internal system named Borg & Omega • Why (*): ◦ Extensibility (answer for why not PaaS) ◦ Ecosystem (answer for why not ECS, Nomad, Mesos) * See more details about this in Microservices platform on Kubernetes at Mercari
cloud services: ◦ Set up GCP services ◦ Set up Pagerduty, Sentry, GitHub, Slack, and more ◦ Don’t control your infrastructure by hand (UI, CLI, or API) • We expect developers to write terraform ◦ Gives them full control over their resources.
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
YAML-based configurations • Allows backend engineers to focus on their business ◦ Reduces the amount of configuration and required knowledge on Kubernetes and associated technologies ◦ Provides sensible defaults and constraints
services • We enable developers to take ownership and control • We use GitOps to enforce policies and ease development https://engineering.mercari.com/