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

[mercari GEARS 2025] Building Foundation for Me...

Avatar for mercari mercari PRO
November 14, 2025

[mercari GEARS 2025] Building Foundation for Mercari’s Global Expansion

Avatar for mercari

mercari PRO

November 14, 2025
Tweet

More Decks by mercari

Other Decks in Technology

Transcript

  1. deeeeeeet
 
 
 Leading global expansion initiative. Before moving to

    XB, he was a Director of Platform Engineering, leading the Platform Engineering team and SRE team. Prior to Mercari, he was a software engineer at a Japanese e-commerce company, working on building and operating internal PaaS. 
 VP of XB Engineering
 
 Hi, I’m deeeeeeeeeet! Please fix me!
  2. Overseas buyers 
 Domestic sellers 
 Proxy Partner 
 ①Request

    purchase
 ②Buy on Mercari 
 ③Ship to domestic warehouse
 ④Ship to oversea
 Crossborder transaction

  3. Overseas buyers 
 Domestic sellers 
 Proxy Partner 
 ①Request

    purchase
 ②Buy on Mercari 
 ③Ship to domestic warehouse
 ④Ship to oversea
 Crossborder transaction

  4. Crossborder GMV trends
 FY2022.6
 FY2025.6
 FY2027.6
 6
 90
 (Billion JPY)


    15x growth over the past 3 years
 
 Approximately 70% of transactions are in the Entertainment & Hobbies category

  5. 9 Previous approach: Start from local marketplace
 
 
 New

    approach: Start with Cross border from JP 
 

  6. Fork
 JP 󰏦 
 US 󰑔
 JP system
 US system


    UK 󰏅
 UK system
 🔥 Higher cost of new expansion
 
 

  7. Fork
 JP 󰏦 
 US 󰑔
 JP system
 US system


    UK 󰏅
 UK system
 🔥 Higher cost of new expansion
 
 
 🔥 Dev resource ineffiency
 
 

  8. JP 󰏦 
 TW 󰑐
 HK 󰏔
 X
 US 󰑔


    JP system
 US system
 Global Foundation

  9. Transform? Rebuild JP 󰏦 
 JP system
 TW 󰑐
 HK

    󰏔
 X
 Global Foundation
 Fork?
  10. Transform? Rebuild JP 󰏦 
 JP system
 TW 󰑐
 HK

    󰏔
 X
 Global Foundation
 Fork?
  11. Transform? Rebuild JP 󰏦 
 JP system
 TW 󰑐
 HK

    󰏔
 X
 Global Foundation
 Fork?
  12. Transform? Rebuild JP 󰏦 
 JP system
 TW 󰑐
 HK

    󰏔
 X
 Global Foundation
 Fork?
  13. Transform + Depend Rebuild JP 󰏦 
 JP system
 TW

    󰑐
 HK 󰏔
 X
 Global Foundation
 Platform
 Transform? Fork?
  14. 🔥 Different microservices + frequent org changes
 
 
 🔥

    Nano-services across different teams
 
 Microservcices

  15. Modular monolith
 ✅ Clear / Strong boundaries 
 ✅ Consistent

    Implement Pattern + Flexible assignments
 

  16. Modular monolith
 ✅ Clear / Strong boundaries 
 ✅ Consistent

    Implement Pattern + Flexible assignments
 
 ✅ Monolith DX = Simple DX 

  17. 
 • Design for two
 • Global by default but

    enable localization
 • Enable quick iteration
 • Utilize the existing foundation and platform
 • Learn and unlearn from the past experience
 • Keep each country's business isolated
 • …

  18. 
 • Design for two
 • Global by default but

    enable localization
 • Enable quick iteration
 • Utilize the existing foundation and platform
 • Learn and unlearn from the past experience
 • Keep each country's business isolated
 • …

  19. yanolab
 
 
 Since joining Mercari in 2019, I worked

    on logistics development, developer experience, and infrastructure. Currently serving as an architect and SRE on the Cross Border team, focusing on system infrastructure for global expansion.
 Software Engineer

  20. Agenda
 Background of choosing Modular Monolith
 1
 Introducing our Modular

    Monolith Approach
 2
 Approach to Increasingly Complex Domains and Dependencies
 3
 Challenges and Future Work
 4

  21. Background: Why Modular Monolith
 Established Rich Ecosystem
 
 • Comprehensive

    tooling: application boilerplate, Go SDK, Terraform starter kit, etc.
 • Quality management process with Production Readiness Check (PRC)
 
 Emerging Challenges
 
 • Ecosystem complexity → Increased learning cost
 • PRC expansion → Minimum 3 months required to launch a single Microservice
 Maturity and Limitations of Microservice Ecosystem

  22. Background: Why Modular Monolith
 Reality of New Business Development
 


    • Small teams need to manage dozens of Microservices
 • Required effort: Number of Microservices × 3 months = Unrealistic timeline
 
 Resulting Trend
 
 • Recent new businesses increasingly adopt Monolith-like approaches
 Challenges in Launching New Businesses

  23. Background: Why Modular Monolith
 Expected Scale
 
 • Anticipated to

    grow to the same scale as the current Mercari Marketplace
 
 
 What We Need
 
 • Leverage existing ecosystem while maintaining operational flexibility
 • Balance between initial development speed and future scalability
 Requirements for Global Expansion

  24. Modular Monolith
 Flexibility
 Everything in Configuration
 
 Protocol Buffer +

    gRPC
 Maintainability
 Tier Concept
 
 Code + Module Ownership
 
 Efficiency
 Local Environment
 
 Cross Collaboration

  25. Flexibility: Modular Monolith with Flexible Deployment
 Protocol Buffer and gRPC/Connect

    RPC
 
 • Internal/External module communication uses Protocol Buffer and gRPC/Connect RPC
 
 Managing Environment Differences with CUE Lang
 
 • Each module can be enabled or disabled via configuration
 • Module connections and settings are fully configurable
 • Only environment-specific differences can be managed
 
 

  26. Flexibility: Modular Monolith with Flexible Deployment
 module
 module
 module
 module


    BFF
 Monolith(one binary)
 module
 module
 Deployment B
 module
 module
 BFF
 Deployment A
 configurable
 Separate
 gRPC
 request

  27. Run-Time
 Build-Time
 Flexibility: Modular Monolith with Flexible Deployment
 production
 development


    default config
 local Pull Request 
 e2e GKE GKE Only Diff
 Only Diff
 CUE/YAML 
 GKE CUE/YAML 
 Deployment

  28. Maintainability: Single Binary and DB Isolation
 Single Binary for Server,

    Worker and Single Binary for Batch
 
 • Switch feature on deployment by configuration
 • Code owners can be assigned per module to ensure ownership separation
 
 Separate Service Account and Database per modules
 
 • Each module owns its own independent service account and database
 

  29. Maintainability: Single Binary and DB Isolation
 User Module
 Product Module


    Social Module
 AlloyDB Cluster
 SA
 SA
 SA

  30. Maintainability: Tier Cocept
 Module is categorized by Tier
 
 •

    BFF/Gateway
 ◦ Client optimization, language/currency conversion
 ▪ Co-owned by Mobile/Web/Backend engineers
 • Tier1
 ◦ Request orchestration
 ▪ Horizontal: Building processes by combining multiple functionalities
 • Tier2
 ◦ Marketplace core functionalities (Product, Order, etc.)
 ▪ Vertical: Domain-specific processing
 • Tier3
 ◦ Marketplace-agnostic generic functionalities (Search, Notification, etc.)
 • Tier4
 ◦ Modules with special security/operational requirements (Personal information, etc.)
 

  31. Maintainability: Tier Cocept
 Order Management
 Shopping Management
 BFF A
 Product


    Order
 Social
 Tier 1
 Tier 2
 Tier 3
 Search
 Notification
 Tier 4
 PII
 BFF/Gateway
 Gateway B
 Request Flow

  32. Efficiency: Local Development and Cross Collaboration
 Single Binary
 
 •

    Easy to build local development without Docker Compose
 • Easy to debug using debugger
 • Use mirrord¹ with actual Kubernetes Environment
 • Use Air² for dynamic loading 
 
 Cross Collaboration
 
 • Easy to align application code and make it understanding easy
 • Engineers can develop any modules without extra communication
 
 ¹: https://metalbear.com/mirrord
 ²: https://github.com/air-verse/air

  33. Current Challenges
 Release Flow
 
 • We want to achieve

    fast deployment
 ◦ Merge into main as release but it causes unexpected merge or conflict
 
 Future Development
 
 • Make streamline the Monorepo/Modular Monolith approach for faster adoption across Mercari's new business
 • Reduce initial setup costs to enable rapid business launches in the AI-driven development era
 

  34. Blog Series
 Behind the Scenes of Developing Mercari’s First Global

    App, “Mercari Global App”
 
 https://engineering.mercari.com/en/blog/entry/20251003-mercari-crossborder/