Micro Service

The Tao of Micro Service

图难于其易,为大于其细;

天下难事,必作于易;

天下大事,必作于细。

是以圣人终不为大,故能成其大

     -- 老子 Lao Zi
  • Be small, not big.
  • Be simple, don't be complicated.
  • Be compact, don't loose
  • Be independent, don't rely too much on others.
  • To serve others, not just for yourself
  • Be good at observation.
  • Find a problem, solve the problem, and preventing problems

Is Micro service a silver bullet?

Issues

  • Distributed complexity
  • Operational complexity
  • Testing complexity
  • Avalanche effect
  • Diagnose complexit

Solution

  • Decompose, clear boundary and interface
  • Quick Iteration, fix errors ASAP
  • Automation everything: build, deploy, testing, etc.
  • High availability and Fault-tolerant
  • DDD: Domain Driven Design
  • MDD: Metrics Driven Development

Architecutre

style

  • exclusive data store
  • stateless
  • CI and build independently
  • Container-based deployment

collaboration patterns

  • Producer-Consumer
  • Publisher-Subscriber
  • Leader-Follower