Service governance
Overview
Circuit breaker and timeout
Architecture
RPC vs message queue based: https://time.geekbang.org/column/article/73368
Capacity planning [Todo]
Org architecture [Todo]
Microservice layers
TODO: Microservice challenges
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]
Weibo implements service mesh:
Real world
Netflix
Load shedding at Netflix: https://netflixtechblog.com/keeping-netflix-reliable-using-prioritized-load-shedding-6cc827b02f94
Netflix Load balancing: https://netflixtechblog.com/netflix-edge-load-balancing-695308b5548c
Netflix DDOS simulation: https://netflixtechblog.com/starting-the-avalanche-640e69b14a06
Netflix cluster management: https://netflixtechblog.com/dynomite-manager-managing-dynomite-clusters-dfb6874228e4
Netflix resource scheduling: https://netflixtechblog.com/distributed-resource-scheduling-with-apache-mesos-32bd9eb4ca38
Netflix automated failure testing: https://netflixtechblog.com/automated-failure-testing-86c1b8bc841f
Netflix Chaos monkey: https://netflixtechblog.com/netflix-chaos-monkey-upgraded-1d679429be5d
Netflix open source projects: https://netflixtechblog.com/evolution-of-open-source-at-netflix-d05c1c788429
Netflix's microservice architecture: https://time.geekbang.org/course/detail/100003901-2272
Last updated