- 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.
- Hands-On Chatbots and Conversational UI Development
- Proxmox High Availability
- 通信簡史:從信鴿到6G+
- 企業網絡安全管理
- Building RESTful Web services with Go
- WordPress Web Application Development
- Learning Windows 8 Game Development
- Learning Storm
- Practical Web Penetration Testing
- AWS Lambda Quick Start Guide
- 5G時代的大數據技術架構和關鍵技術詳解
- 深入理解計算機網絡
- 工業以太網技術:AFDX/TTE網絡原理、接口、互連與安全
- NB-IoT原理和優化
- Enterprise ApplicationDevelopment with Ext JSand Spring