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

Merpay Microservices On Microservice Platform 20190522

tjun
May 22, 2019

Merpay Microservices On Microservice Platform 20190522

Introduce how we develop and operate Merpay's Microservices on Microservices Platform #mercari_microservices meetup on 2019/05/22

tjun

May 22, 2019
Tweet

More Decks by tjun

Other Decks in Technology

Transcript

  1. @tjun
    20190522
    Merpay Microservices
    On Microservices Platform

    View Slide

  2. 2
    About me
    @tjun
    SRE at Merpay
    Engineering Manager

    View Slide

  3. 3
    ● Intro: Merpay and microservices
    ● Developing Merpay microservices
    ● Operating Merpay microservices
    ● About Merpay SRE
    ● Summary

    View Slide

  4. Introduction to Merpay and Microservices

    View Slide

  5. 5
    Mobile payment service that can be
    used through the marketplace app
    Mercari. Released 2019-02.
    Providing
    - iD(NFC) payment
    - Code payment
    - Payment inside mercari
    - Deferred pay(あと払い)
    - Coupon
    - Bank charge

    View Slide

  6. 6
    ● Merpay with microservice architecture
    ○ Almost all merpay services are on the microservices platform
    ○ Over 40 microservices (Go, Node.js)
    ○ Examples:
    ■ Internal services: payment-service, bank-service
    ■ Service with Web: coupon-service and coupon-web-service
    ■ Service with API: nfc-service and nfc-api-service

    View Slide

  7. 7
    Merpay handles payment transactions
    ● A lot of batches (ref: iD決済を支える技術 by @hiraku)
    ● Connect with many external partners
    ○ bank, merchants, iD payment provider, payment gateway...
    ● Restricted ownership for developers

    View Slide

  8. 8
    Clients
    Merpay
    API
    Gateway
    API-
    serviceY
    ServiceA
    ServiceB
    ServiceC
    API-
    serviceX
    Web-
    serviceZ
    GKE

    View Slide

  9. Developing Merpay Microservices
    on Microservice Platform

    View Slide

  10. 10
    ● Start with microservices-starter-kit
    ● Create GCP and Kubernetes resources
    ● Write microservice application
    ● Deploy service with Spinnaker

    View Slide

  11. 11
    Start with microservice-starter-kit



    Developing Merpay microservices
    GCP project for GKE
    Centralized cluster
    Namespace: Service A
    Service A
    RBAC: Team A

    View Slide

  12. 12
    Create GCP and Kubernetes resources


    Developing Merpay microservices

    View Slide

  13. 13
    Write microservice application


    Developing Merpay microservices

    View Slide

  14. 14
    Deploy application with Spinnaker


    Developing Merpay microservices
    Centralized cluster
    Namespace: Service A

    View Slide

  15. Operating Merpay Microservices

    View Slide

  16. 16
    ● SLO and Alerts
    ● Monitoring Microservices
    ● Incident handling

    View Slide

  17. 17
    SLO and Alerts


    Operating Merpay microservices

    View Slide

  18. 18
    Monitoring merpay microservices

    Operating Merpay microservices

    View Slide

  19. 19
    Monitoring merpay microservices

    Operating Merpay microservices
    endpointA
    endpointB
    endpointC
    endpointD
    endpointE

    View Slide

  20. 20
    Monitoring across microservices
    Operating Merpay microservices
    Datadog APM and Distributed Tracing
    with Go middlewares

    View Slide

  21. 21
    Incident handling



    Operating Merpay microservices

    View Slide

  22. 22
    ● Infra resources across applications
    ○ Ingress, CDN
    ○ Capacity planning, Security
    ● Production releases and operations
    ○ Improve microservices operations
    ○ Improve relialibity with reviewing SLO, terraform, Kubernetes yaml, datadog
    dashboard, monitor
    ○ Incident handling

    View Slide

  23. 23
    ● Microservice platform helps Merpay microservices development
    ● Common tech stack is important for microservices, especially in
    operations
    We are hiring members to improve Merpay service Infra, operations
    and microservice platform!!

    View Slide