- Hands-On Docker for Microservices with Python
- Jaime Buelta
- 665字
- 2021-06-24 12:35:46
Preparing and adapting by measuring usage
Obviously, any real-world system will be more complicated than our example. There's a limit to what a code analysis can discover just by looking at it carefully, and plans often don't survive contact with the real world.
Any division needs to be validated to ensure that it will have the expected result and that the effort will be worth it. So double-check that the system is working the way you think it is working.
The ability to know how a live system is working is called observability. The main tools for it are metrics and logs. The problem you'll find is that they will normally be configured to reflect external requests and give no information about internal modules. We will talk about the observability of systems in depth in Chapter 10, Monitoring Logs and Metrics. You can refer to it for more information and apply the techniques described there at this stage.
This analysis, though, will probably give only information about what the external endpoints being called are, but won't say much about internal modules that will be split into different microservices according to our plan. Remember that the most important element for the long-term success of the move to microservices is to allow teams to be independent. If you split across modules that constantly need to be changed in unison, deployments won't be truly independent, and, after the transition, you'll be forced to work with two tightly coupled services.
To verify that the new microservices won't be tightly coupled, make the teams aware of the divisions and how often they have to change the interfaces surrounding them. Monitor these changes for a few weeks to be sure that the division lines are stable and don't require constant change. If the interface between microservices is very actively being changed, any feature will require multiple changes in several services, and that will slow the pace of delivering new features.
In our example, after analyzing the proposed architecture, we decide to simplify the design, as shown in this diagram:

Some changes have been decided after monitoring and talking with the teams:
- The teams don't have good knowledge of JavaScript dynamic programming. The change to the frontend, at the same time as making the move to microservices, is seen as too risky.
- The external mobile application, on the other hand, is seen as a strategic move for the company, making the externally accessible API a desirable move.
- Analyzing the logs, it seems like the search functionality is not often used. The growth in the number of searches is small, and splitting search into its own service will require coordination with the Thoughts Backend, as it's an area of active development, with new fields being added. It is decided to keep search under the Thoughts Backend, as both work with the same thoughts.
- The Users Backend has been received well. It will allow improving the security of authentication by having clear ownership of who's responsible for patching security vulnerabilities and improving the services. The rest of the microservices will have to work independently with verification by the Users Backend, which means the team responsible for this microservice will need to create and maintain a package with information on how to validate a request.
Once we've decided on the final state, we still have to decide how are we going to move from one state to another.
- 計算機網絡與通信(第2版)
- 物聯網概論(第2版)
- React:Cross-Platform Application Development with React Native
- 區塊鏈輕松上手:原理、源碼、搭建與應用
- 數字調制解調技術的MATLAB與FPGA實現:Altera/Verilog版(第2版)
- 網絡安全應急響應技術實戰
- IPv6網絡切片:使能千行百業新體驗
- 通信原理及MATLAB/Simulink仿真
- INSTANT KineticJS Starter
- 通信十年:擁抱互聯網
- 局域網組成實踐
- Hands-On Docker for Microservices with Python
- ElasticSearch Server
- 學術虛擬社區用戶社會化交互行為研究
- Telerik WPF Controls Tutorial