当前位置:网站首页>Archsummit: evolution of the underlying framework of cherished microservices
Archsummit: evolution of the underlying framework of cherished microservices
2022-07-24 22:16:00 【InfoQ】

1、 Preface
2、 About Instructor

3、 Cherish the chronicle of microservice framework
- 2018 In, I experienced the splitting of business micro Services : Decouple business and solve complexity problems
- 2019 Completed the transformation of the data layer : Solve the pain points of business data layer
- 2020 Container deployment and DevOps pipeline Design : Improve the system's scalable and highly available cloud native capabilities
- 2021 Realize more business in different places ( Double cloud and double life ): It improves the system disaster tolerance ability and service security

4、 Cherish the evolution of microservice framework
4.1 Facing problems

4.2 Breakthrough direction

- Integrating open source frameworks , Combined with business secondary development
- Build a set of technical specifications
- Unified technology base
4.3 Evolution process
4.3.1 Micro service splitting
4.3.1.1 Business split

4.3.1.2 Microservice framework


4.3.1.3 DDD With cost reduction and efficiency increase

- adapter: The external interface implementation of each field , The interface implementation of each business at each layer is different (OpenApi、 client 、web End etc. )
- application: Business mix
- domain: Domain layer
- infrastructure: The support of the most basic services
4.3.2 Microservice gateway layer transformation
- One side , It's based on SpringCould-Gateway Open source framework to expand , The ability of gateway layer foundation is realized : Request validation 、 Black and white list 、 be based on sentinel Fusing and current limiting ( Secondary development );
- On the other hand , Treasure gateway provides a lot of capability support for the business side , such as : Merge request 、 Retry optimization (Connection abnormal , Services that are not idempotent cannot be solved )、 Elegant shutdown 、 Start the warm-up 、 Access log reporting .

4.3.2.1 Merge request
- Split request : Resolve the custom agreement , Split the merge request into actual request groups .
- Parallel execution : Execute the actual request group in parallel , Set listening return .
- Merge response : rewrite response, Respond with the downstream service of the merge request group .
- Demote and retry : Configure timeout and abnormal degradation , And retry the failed request .
- Request monitoring : Monitor request groups with large time differences , To optimize the layout .

4.3.3 Data layer improvements
4.3.3.1 Facing problems

4.3.3.2 Data splitting

4.3.3.3 Remove the data middle layer

1) Sub database and sub table implementation

2) Configure isolation

- Business layer configuration : Page component configuration ;
- Data layer configuration :DB Account and password 、 Connection timeout, etc ;
3) Connection switching without shutdown

4.4 Framework capability upgrade
- Link level fuse degradation
- single IP Fuse
- Graceful shutdown of the whole link
- Start the warm-up

4.4.1 Fusing the drop
4.4.2 Graceful shutdown of the whole link
- Service offline
- The rest of the business logic is processed
- Destroy resources ( Thread pool 、 Scheduling tasks 、 Database connection 、 There are already requests for processing, etc )

- Open source components have achieved a set of elegant downtime , such as Dubbo, Then this framework can reuse their implementation directly ;
- If you self encapsulate a set of precious interfaces , So you need components that shut down gracefully , All implement a certain underlying interface , Then there is a set of unified specifications to ensure that elegant downtime does not affect the business .
4.4.3 Service restart flow control

4.4.4 Bytecode enhancement - Log monitoring

4.4.5 Redis encapsulation
4.4.6 web Layer capability encapsulation

5、 Architecture empowerment and research efficiency improvement
5.1 Facing problems
- Inadequate resource isolation
- Parallel demand joint commissioning / It's difficult to test
- Too many people participate in the deployment process
- Multiple environments are difficult to manage
5.2 R & D assembly line construction

5.2 Containerized plug-ins
- Check: Branch check 、k8s ns Check
- Hit the mirror: Use zhenai-dockerx-base As the foundation docker Mirror image
- Structure layout yaml:The simulation template renders k8s deploy/svc Of yaml
- Deployment launch: call k8s Interface deployment
- Multi-environment management: Arrange files to distinguish the environment
- Component management: according to mvn Parameter determines whether to deploy the corresponding component , Such as nginx, It's mainly used to develop 、 Test environment

5.4 Request dyeing test

5.5 DevOps The whole cycle

5.6 Double cloud and double life

5.6.1 Double cloud advantage

6、 Architecture experience sharing
- Do architecture in business enterprises , Cost effective approach is : Combine business pain points to find a framework , A framework that can solve business problems is a good framework ;
- The architect team does scheme design : It is recommended to give priority to open source components , Avoid making wheels repeatedly , Don't over design ;
- The best effect of the business framework is : After the framework is combined with the business , Can solve 90% Business problems ;
- Business development : Encountered 80% The problem is the database ,20% The problem is application deployment ,10% It's something else ;
- The team of architects : Solving existing problems is not the end , The technical architecture must be forward-looking ;
7、 summary

边栏推荐
- Get the solution to the slow running speed of Mengxin Xiaobai computer! ٩ ( ‘ ω‘ )و get! ٩ ( ‘ ω‘ )و
- Composability and Recursion in snarkyJS
- day10:声明式事务控制
- Projection regularization of line point set in PCL point cloud processing (56)
- ACL 2022 | 基于最优传输的对比学习实现可解释的语义文本相似性
- ACL 2022 | comparative learning based on optimal transmission to achieve interpretable semantic text similarity
- 集成Swagger 学习
- 使用frp实现内网穿透
- Circom 2.0: A Scalable Circuit Compiler
- PCL点云处理之直线点集投影规则化(五十六)
猜你喜欢

Composability and Recursion in snarkyJS

Ue5 reports an error using the plug-in quixel Bridge

Easily make 2D tile map with unity tilemap - Basics
![[Apipost和Apifox哪个更好用?看这篇就够了!]](/img/58/4dfe5c56d12e8e88b0a7f3583ff0a4.jpg)
[Apipost和Apifox哪个更好用?看这篇就够了!]

通讯异常判断之通讯心跳信号应用编程

ESP32C3 LED PWM使用和ESP32差异说明
![Cell special issue | application and future prediction of AI in protein structure, precision medicine, antibody therapy [review]](/img/2e/7f3cbae33c8a994b38e3bf4f9f13cb.png)
Cell special issue | application and future prediction of AI in protein structure, precision medicine, antibody therapy [review]

Monotonic stack structure exercise -- cumulative sum of minimum values of subarrays

Projection regularization of line point set in PCL point cloud processing (56)

【ICML2022】气候变化与机器学习:机遇、挑战与考虑,121页ppt
随机推荐
[icml2022] climate change and machine learning: opportunities, challenges and considerations, 121 ppt
Maixll dock QR code recognition
PCL点云处理之移动最小二乘拟合实验(六十二)
[postgraduate entrance examination vocabulary training camp] day 12 - native, separate, figure, contribution, categories, assessment, propose
Projection regularization of line point set in PCL point cloud processing (56)
Im instant messaging develops ten million level concurrent long connection Gateway Technology
Implement redis sentinel to simulate master failure scenarios
模板的使用
通讯异常判断之通讯心跳信号应用编程
[database learning] redis parser & single thread & Model
AC自动机
Win10 solution Base64
Gradle learning - gradle advanced instructions
Microcomputer principle: detailed explanation of CPU architecture
单调栈结构练习——子数组最小值的累加和
Random sampling and thinning of PCL point cloud processing randomsample (60)
day10:声明式事务控制
In the eyes of professionals in the robot industry, what is the current situation of the robot industry?
IndexTree
Update structure of maximum or minimum value in the window - maximum value in the window