zoukankan      html  css  js  c++  java
  • 微服务的边界

    面试的时候被问到微服务的边界的问题,一时不知怎么回答。
    之后找到这篇文章,https://docs.microsoft.com/en-us/azure/architecture/microservices/model/microservice-boundaries

    • Each service has a single responsibility.
      说是从domain的角度考虑,这个有点抽象,还是从单一职责角度容易理解。

    • There are no chatty calls between services. If splitting functionality into two services causes them to be overly chatty, it may be a symptom that these functions belong in the same service.
      如果两个微服务之间有太多的对话,那么这两个就应该成为一个。

    • Each service is small enough that it can be built by a small team working independently.
      微服务开发不要跨开发组。

    • There are no inter-dependencies that will require two or more services to be deployed in lock-step. It should always be possible to deploy a service without redeploying any other services.
      Services are not tightly coupled, and can evolve independently.
      微服务之间不应该有依赖,应该能独立发展。

    • Your service boundaries will not create problems with data consistency or integrity. Sometimes it's important to maintain data consistency by putting functionality into a single microservice. That said, consider whether you really need strong consistency. There are strategies for addressing eventual consistency in a distributed system, and the benefits of decomposing services often outweigh the challenges of managing eventual consistency.
      从数据一致性上考虑,微服务不能把这个搞的复杂。

    多面试有好处,比光啃书经验长的快多了。

    --------------------------- 知道的更多,不知道的也更多 ---------------------------
  • 相关阅读:
    学生宿舍水电管理系统 产品需求评审(用户故事)
    nyoj 14-会场安排问题 (贪心)
    好看的鼠标hover效果
    JavaScript-三种弹窗方式
    博客园美化夜间模式
    js写个小时钟
    js获取时间,循环执行任务,延迟执行任务
    Bzoj1103 [POI2007]大都市meg
    POJ2155 Matrix
    POJ3625 Building Roads
  • 原文地址:https://www.cnblogs.com/mryux/p/15403989.html
Copyright © 2011-2022 走看看