官术网_书友最值得收藏!

Microservice architecture

Just as there is no one set definition for a microservice, there is also not one set architecture. What we will do is make a list of some of the characteristics that we view a microservice architecture to have. That list would then look something like this:

  • Each microservice can be deployed, developed, maintained, and then redeployed independently.
  • Each microservice focuses on a specific business purpose and goal and is non-monolithic.
  • Each microservice receives requests, processes them, and then may or may not send a response.
  • Microservices practice decentralized governance and in some cases, when permissible, decentralized data management.
  • Perhaps most importantly, at least in my mind anyways, I always design a microservice around failure. In fact, they are designed to fail. By following this paradigm, you will always be able to handle failures gracefully and not allow one failing microservice to negatively impact the entire ecosystem. By negatively impact, I mean a state where all other microservices are throwing exceptions due to the one errant microservice. Every microservice needs to be able to gracefully handle not being able to complete its task.
  • Finally, let's stay flexible and state that our microservice architecture is free to remain fluid and evolutionary.
  • No microservice talks directly to another microservice. Communication is always done in the form of messages.

With all that in mind, we've now created our definition of a microservice and its architecture and characteristics. Feel free to adjust these as you or your situation sees fit. Remember, as C# developers we don't always have the luxury, save truly greenfield projects, to dictate all the terms. Do the best you can with the room you have to operate within. As an example, chances are you will have to work with the corporate database and their rules rather than a small siloed database as described earlier. It's still a microservice, so go for it!

主站蜘蛛池模板: 获嘉县| 舞钢市| 方山县| 南部县| 句容市| 乌审旗| 安义县| 阿鲁科尔沁旗| 江油市| 黑河市| 禄丰县| 兴宁市| 延安市| 三门峡市| 岐山县| 探索| 白玉县| 白朗县| 常熟市| 巴塘县| 梁河县| 托克逊县| 南华县| 天台县| 五河县| 天门市| 沾化县| 淅川县| 和平区| 黄龙县| 蓬安县| 福州市| 肃宁县| 虹口区| 海淀区| 镇安县| 罗田县| 赣州市| 郎溪县| 宝兴县| 萨迦县|