Service governance

Overview

Architecture

Capacity planning [Todo]

Org architecture [Todo]

Microservice layers

Tech architecture [Todo]

Problems

Data distribution

  • Definition: Double write. How to guarantee the ACID of two writes

Use case

  • Data replication

  • Database migration

  • Implement CQRS or remove join from database

  • Implement distributed transactions

Approaches

Transactional outbox

  • Flowchart

  • Implementation: Killbill common queue

CDC (Change data capture)

  • Flowchart

  • Implementation:

    • Alibaba Canal (recommended)

    • Redhat Debezium

    • Zendesk Maxell

    • Airbnb SpinalTap

Data join

Use case

  • N+1 problem

  • Data volume

  • Performance

Approaches

CQRS

  • Flowchart

  • Possible problems: Eventual consistency

  • Possible solutions:

Breakdown monolithic

Definition

  • Velocity slow

  • Hard to continue scale vertically

  • Independent deployment capability

Steps to migration

Key difficult points

  • Understand the APIs

  • Database migration

    • Incremental and rollbackable

    • Data

  • Use data distribution and remove join

Example

  • StichFix - Scaling your architecture with services and events

Service mesh [Todo]

Real world

Netflix

Last updated