- Microservice Patterns and Best Practices
- Vinicius Feitosa Pacheco
- 309字
- 2021-06-30 19:02:56
Direct communication alerts
Direct communication between microservices may result in a problem known as Death Star. The Death Star is an anti-pattern where there is communication between the recursion microservices, and making progress becomes extremely complicated or expensive for a product.
With the communication tools we saw previously, it is very easy to establish conversations between microservices with low latency. The common anti-pattern is to allow microservices to exchange messages with each other freely, if they have no information to process a specific task.
This is where we have an alert. If a microservice always needs to communicate with another to complete a task, it is a high coupling signal and we have failed in our DDD process. This engagement results in a Death Star. For clarity, consider the following scenario.
Imagine that we have four microservices. The microservices are A, B, C, and D. A request was made asking for information about A, but it does not have all the information content. This content is in B and C, but C does not have all of the information, so it asks D. B is not able to complete the task assigned to him and asks for data from C. However, D needs the data in A. The following is a diagrammatic representation of this process:

In the end, a simple request generates a very complex flow, where any failure is difficult to monitor. Apparently, it may seem natural, but over time and with the creation of new microservices, it makes this ecosystem unsustainable.
The microservices must be sufficiently well defined in their respective responsibilities for this type of messaging to be minimized.
No matter how fast the communication and serialization information is, if the product is not humanly intelligible and understandable, it will be very difficult to maintain the ecosystem of microservices, especially with regards to error control.
- RCNP實驗指南:構(gòu)建高級的路由互聯(lián)網(wǎng)絡(luò)(BARI)
- SOA用戶指南
- 高校網(wǎng)絡(luò)道德教育研究
- 工業(yè)控制網(wǎng)絡(luò)安全技術(shù)與實踐
- 物聯(lián)網(wǎng)概論(第2版)
- 計算機網(wǎng)絡(luò)與通信(第2版)
- 通信十年:擁抱互聯(lián)網(wǎng)
- 語音信號處理及Blackfin DSP實現(xiàn)
- 網(wǎng)管第一課:網(wǎng)絡(luò)操作系統(tǒng)與配置管理
- 云工廠:開啟中國制造云時代
- 加密與解密實戰(zhàn)全攻略
- 網(wǎng)絡(luò)設(shè)備配置與調(diào)試項目實訓(xùn)
- 天下一家:網(wǎng)絡(luò)聯(lián)通世界(科學(xué)新導(dǎo)向叢書)
- 局域網(wǎng)組建與維護項目教程
- CCNP TSHOOT(642-832)學(xué)習(xí)指南