SlideShare a Scribd company logo
Mercari API: from Monolithic to Microservices
Tonghui Li
Tech Lead, Microservices Development
@ummterry
Background
Service A
Service B
Mercari API
How to make a new service?
API Gateway
Service A
Service B
Mercari API
API Gateway
Service A
Service B
Offer
Mercari API
API Gateway
Service A
Service B
Offer
Multiple services on a single endpoint
SSL Termination
DDoS Protection
Common AuthZ/AuthN
Mercari API
API Gateway
Service A
Service B
Offer
Mercari API
Technical Stack
API GatewayAuthority
Service A
Service B
Sakura
Offer
Mercari API
API Gateway
Google Cloud Load balancing
Authority
Service A
Service B
Sakura
Offer
Mercari API
GCP
Kubernetes Engine
API Gateway
Google Cloud Load balancing
Authority
Service A
Service B
Sakura
Offer
Mercari API
GCP
Kubernetes Engine
Cloud Resources
Managed Services
Container
API Gateway
Google Cloud Load balancing
Authority
Service A
Service B
Sakura
Offer
Mercari API
GCP
Kubernetes Engine
Cloud Resources
Managed Services
Container
Over HTTP
API Gateway
Google Cloud Load balancing
Authority
Service A
Service B
Sakura
Offer
Mercari API
GCP
Kubernetes Engine
Cloud Resources
Managed Services
Container
Over HTTP
SSL Termination
DDoS Protection
Cloud Amor?
API Gateway
Google Cloud Load balancing
Authority
Service A
Service B
Sakura
Offer
Mercari API
GCP
Kubernetes Engine
Cloud Resources
Managed Services
Container
Over HTTP
Routing to microservices
Protocol tranformation (HTTP to gRPC)
Common logging & Tracing
Request buffering
SSL Termination
DDoS Protection
Cloud Amor?
API Gateway
Google Cloud Load balancing
Authority
Service A
Service B
Sakura
Offer
Mercari API
GCP
Kubernetes Engine
Cloud Resources
Managed Services
Container
Over HTTP
Routing to microservices
Protocol tranformation (HTTP to gRPC)
Common logging & Tracing
Request buffering
SSL Termination
DDoS Protection
Cloud Amor?
Common AuthZ/AuthN
API Gateway
Google Cloud Load balancing
Authority
Service A
Service B
Sakura
Offer
Mercari API
GCP
Kubernetes Engine
Cloud Resources
Managed Services
Container
Over HTTP
Routing to microservices
Protocol tranformation (HTTP to gRPC)
Common logging & Tracing
Request buffering
SSL Termination
DDoS Protection
Cloud Amor?
Common AuthZ/AuthN
Managed DB
How to Break Down existing API?
• Start from high-priority functionality
• Start from high-priority functionality

• listing, search, purchase, shipping, notification, cs-tool, etc.
• Start from high-priority functionality

• listing, search, purchase, shipping, notification, cs-tool, etc.

• Split out necessary microservices
• Start from high-priority functionality

• listing, search, purchase, shipping, notification, cs-tool, etc.

• Split out necessary microservices

• listing: master, user, item, etc.

• shipping: master, user, item, address, etc.

• …
• Start from high-priority functionality

• listing, search, purchase, shipping, notification, cs-tool, etc.

• Split out necessary microservices

• listing: master, user, item, etc.

• shipping: master, user, item, address, etc.

• …

• Come with up overall design
Listing
Shipping
Notification
Challenges …
Challenges: DB
DB is in Sakura and we want to run microservices in GCP, but we don’t
want to expose direct DB access over public internet

• Deploy DB access services in Sakura

• Migrate DB to GCP / new Tokyo DC
Challenges: Testing
With so many services, how do we test them?

• Automated regression testing for each service

• Reduce required manual tests
Challenges: Transactions
In monilith api, we often do transactions across different services:
Solution: refactor and ensure Eventual Consistency
Thank you!

More Related Content

PPTX
AWS API Gateway
PPTX
2016 - Serverless Microservices on AWS with API Gateway and Lambda
PPTX
Deploying computer vision model as api using aws lambda and api gateway
PPTX
PDF
Getting started with AWS amplify
PDF
АРТЕМ КОБРІН «Achieve Networking at Scale with a Self-Service Network Solutio...
PPTX
Let's Talk ProIV and Alexa
PPTX
02 api gateway
AWS API Gateway
2016 - Serverless Microservices on AWS with API Gateway and Lambda
Deploying computer vision model as api using aws lambda and api gateway
Getting started with AWS amplify
АРТЕМ КОБРІН «Achieve Networking at Scale with a Self-Service Network Solutio...
Let's Talk ProIV and Alexa
02 api gateway

What's hot (19)

PDF
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
PDF
AWS Lambda Containers - bridging the gap between serverless and containers on...
PDF
apidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilio
PPTX
Introduction to AWS Amplify and the Amplify CLI Toolchain
PPTX
ACDKOCHI19 - Rapid development, CI/CD for Chatbots on AWS
PPTX
Create a Chatbot with AWS Lex, Lambda, and HERE
PDF
CICD in the World of Serverless
PDF
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
PDF
Intuitive APIs and Developer Education
PPTX
Api gateway in microservices
PDF
"Migrating from Cloud to Cloud: AWS to GCP" - Chris Prouty at Shoppertrak - J...
PDF
REST vs. GraphQL: Critical Look
PPTX
App Services - Connecting the dots of Web Mobile and Integration_published
PDF
Testing Event Driven Architectures: How to Broker the Complexity | Frank Kilc...
PDF
ACK_ACTechMeetup_V1-01.pdf
PDF
Introduction to Kitura - Swift Hong Kong Meetup 2016 July
PDF
Securing Serverless Architectures - AWS Serverless Web Day
PDF
WAF_ACTechMeetup_V1-00.pdf
PDF
Why Alibaba Cloud_V1-02
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
AWS Lambda Containers - bridging the gap between serverless and containers on...
apidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilio
Introduction to AWS Amplify and the Amplify CLI Toolchain
ACDKOCHI19 - Rapid development, CI/CD for Chatbots on AWS
Create a Chatbot with AWS Lex, Lambda, and HERE
CICD in the World of Serverless
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
Intuitive APIs and Developer Education
Api gateway in microservices
"Migrating from Cloud to Cloud: AWS to GCP" - Chris Prouty at Shoppertrak - J...
REST vs. GraphQL: Critical Look
App Services - Connecting the dots of Web Mobile and Integration_published
Testing Event Driven Architectures: How to Broker the Complexity | Frank Kilc...
ACK_ACTechMeetup_V1-01.pdf
Introduction to Kitura - Swift Hong Kong Meetup 2016 July
Securing Serverless Architectures - AWS Serverless Web Day
WAF_ACTechMeetup_V1-00.pdf
Why Alibaba Cloud_V1-02
Ad

Similar to Mercari API: from Monolithic to Microservices (20)

PPTX
Systematic Migration of Monolith to Microservices
PPTX
What is an API Gateway?
PDF
Microservices at Mercari
PPTX
Ledingkart Meetup #1: Monolithic to microservices in action
PDF
Microservices development at scale
PDF
Microservices Architecture for e-Commerce
PPTX
How APIs Are Driving the New Commerce Landscape
PDF
Backend for Frontend in Microservices
PDF
Micro-Service Architectures in E-Commerce environments with SPHERE.IO / comme...
PPTX
Running microservice environments is no free lunch
PDF
Api Gateway
PPTX
Microservices and OSGi: Better together?
PDF
apidays LIVE Hong Kong 2021 - Modernizing Monolith Applications with API Arch...
PPTX
Microservices on Anypoint Platform
PDF
APIs and Microservices - What Are They?
PPTX
Microservice at a glance
PDF
API’s and Micro Services 0.5
PDF
Oracle Code Capgemini: API management & microservices a match made in heaven
PDF
Everything you want to know about microservices
PDF
Managing the Complexity of Microservices Deployments
Systematic Migration of Monolith to Microservices
What is an API Gateway?
Microservices at Mercari
Ledingkart Meetup #1: Monolithic to microservices in action
Microservices development at scale
Microservices Architecture for e-Commerce
How APIs Are Driving the New Commerce Landscape
Backend for Frontend in Microservices
Micro-Service Architectures in E-Commerce environments with SPHERE.IO / comme...
Running microservice environments is no free lunch
Api Gateway
Microservices and OSGi: Better together?
apidays LIVE Hong Kong 2021 - Modernizing Monolith Applications with API Arch...
Microservices on Anypoint Platform
APIs and Microservices - What Are They?
Microservice at a glance
API’s and Micro Services 0.5
Oracle Code Capgemini: API management & microservices a match made in heaven
Everything you want to know about microservices
Managing the Complexity of Microservices Deployments
Ad

Recently uploaded (20)

PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
AI in Product Development-omnex systems
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
history of c programming in notes for students .pptx
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
System and Network Administraation Chapter 3
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Transform Your Business with a Software ERP System
PDF
System and Network Administration Chapter 2
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Nekopoi APK 2025 free lastest update
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
How to Choose the Right IT Partner for Your Business in Malaysia
AI in Product Development-omnex systems
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Understanding Forklifts - TECH EHS Solution
Reimagine Home Health with the Power of Agentic AI​
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Which alternative to Crystal Reports is best for small or large businesses.pdf
history of c programming in notes for students .pptx
Essential Infomation Tech presentation.pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
System and Network Administraation Chapter 3
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Operating system designcfffgfgggggggvggggggggg
Transform Your Business with a Software ERP System
System and Network Administration Chapter 2
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Softaken Excel to vCard Converter Software.pdf
Nekopoi APK 2025 free lastest update
How Creative Agencies Leverage Project Management Software.pdf
PTS Company Brochure 2025 (1).pdf.......

Mercari API: from Monolithic to Microservices

  • 1. Mercari API: from Monolithic to Microservices
  • 2. Tonghui Li Tech Lead, Microservices Development @ummterry
  • 5. How to make a new service?
  • 7. API Gateway Service A Service B Offer Mercari API
  • 8. API Gateway Service A Service B Offer Multiple services on a single endpoint SSL Termination DDoS Protection Common AuthZ/AuthN Mercari API
  • 9. API Gateway Service A Service B Offer Mercari API
  • 11. API GatewayAuthority Service A Service B Sakura Offer Mercari API
  • 12. API Gateway Google Cloud Load balancing Authority Service A Service B Sakura Offer Mercari API GCP Kubernetes Engine
  • 13. API Gateway Google Cloud Load balancing Authority Service A Service B Sakura Offer Mercari API GCP Kubernetes Engine Cloud Resources Managed Services Container
  • 14. API Gateway Google Cloud Load balancing Authority Service A Service B Sakura Offer Mercari API GCP Kubernetes Engine Cloud Resources Managed Services Container Over HTTP
  • 15. API Gateway Google Cloud Load balancing Authority Service A Service B Sakura Offer Mercari API GCP Kubernetes Engine Cloud Resources Managed Services Container Over HTTP SSL Termination DDoS Protection Cloud Amor?
  • 16. API Gateway Google Cloud Load balancing Authority Service A Service B Sakura Offer Mercari API GCP Kubernetes Engine Cloud Resources Managed Services Container Over HTTP Routing to microservices Protocol tranformation (HTTP to gRPC) Common logging & Tracing Request buffering SSL Termination DDoS Protection Cloud Amor?
  • 17. API Gateway Google Cloud Load balancing Authority Service A Service B Sakura Offer Mercari API GCP Kubernetes Engine Cloud Resources Managed Services Container Over HTTP Routing to microservices Protocol tranformation (HTTP to gRPC) Common logging & Tracing Request buffering SSL Termination DDoS Protection Cloud Amor? Common AuthZ/AuthN
  • 18. API Gateway Google Cloud Load balancing Authority Service A Service B Sakura Offer Mercari API GCP Kubernetes Engine Cloud Resources Managed Services Container Over HTTP Routing to microservices Protocol tranformation (HTTP to gRPC) Common logging & Tracing Request buffering SSL Termination DDoS Protection Cloud Amor? Common AuthZ/AuthN Managed DB
  • 19. How to Break Down existing API?
  • 20. • Start from high-priority functionality
  • 21. • Start from high-priority functionality • listing, search, purchase, shipping, notification, cs-tool, etc.
  • 22. • Start from high-priority functionality • listing, search, purchase, shipping, notification, cs-tool, etc. • Split out necessary microservices
  • 23. • Start from high-priority functionality • listing, search, purchase, shipping, notification, cs-tool, etc. • Split out necessary microservices • listing: master, user, item, etc. • shipping: master, user, item, address, etc. • …
  • 24. • Start from high-priority functionality • listing, search, purchase, shipping, notification, cs-tool, etc. • Split out necessary microservices • listing: master, user, item, etc. • shipping: master, user, item, address, etc. • … • Come with up overall design
  • 29. Challenges: DB DB is in Sakura and we want to run microservices in GCP, but we don’t want to expose direct DB access over public internet • Deploy DB access services in Sakura • Migrate DB to GCP / new Tokyo DC
  • 30. Challenges: Testing With so many services, how do we test them? • Automated regression testing for each service • Reduce required manual tests
  • 31. Challenges: Transactions In monilith api, we often do transactions across different services: Solution: refactor and ensure Eventual Consistency