May 12, 2018

[design][microservice] The hardest part of microservices is your data

Watch note for The hardest part of microservices is your data


slides:
https://www.slideshare.net/ceposta/the-hardest-part-of-microservices-your-data
  • Microservices is about optimizing for SPEED.
  • Manage (aka. reduce) dependencies.
  • Data is a major dependency.
  • Focus on domain models, not data models
  • Stick with these conveniences as long as you can.
  • A microservice has its own database
  • We need to understand something about the data inside our services and the data outside our services
    • Thus, we are building a distributed system, thus, beware of 
      • network latency, 
      • network partition
  • Plan for failures.
    • Build concepts of time, delay, network, and failures into the design as a first-class citizen
  • How do you “read” data and how do you “update” data.
  • Performance: N+1 Query Problem
  • For our reads and writes, we need some "consistency"
  • We need reads and writes. But we expect failures. 
    • CAP tells us to pick 2: Consistency, Availability, Partition Tolerance
    • CAP is a bad way to think about this.
  • Consistency model
    https://en.wikipedia.org/wiki/Consistency_model
  • What consistency model do you need, depending on what role you’re playing?

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.