当前位置:网站首页>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

边栏推荐
- Gee - dataset introduction mcd12q1
- Day10: declarative transaction control
- Dialogue with celebrities: where are the opportunities and challenges in the second half when brands gather at the shuzang track?
- 第二十周作业
- CAD text styles
- Maixll dock QR code recognition
- Helm —— 强大的 Kubernetes 应用的包管理工具
- Boundary extraction of PCL point cloud processing (58)
- IndexTree
- Tencent +360+ Sogou school recruitment test + summary of knowledge points
猜你喜欢
![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]

Everything about database, database and table is here

Plane regularization of PCL point cloud processing (55)

Ranking of engineering project management software

ICML2022 | 图神经网络的局域数据增强方法

Ue5 reports an error using the plug-in quixel Bridge

CAD text styles

Multi task face attribute analysis based on deep learning (based on paddlepaddle)
![[postgraduate entrance examination vocabulary training camp] day 12 - native, separate, figure, contribution, categories, assessment, propose](/img/6e/97e9335b7017e6e40d248252493e80.png)
[postgraduate entrance examination vocabulary training camp] day 12 - native, separate, figure, contribution, categories, assessment, propose

Application programming of communication heartbeat signal for communication abnormality judgment
随机推荐
Gradle 学习 ----Gradle 进阶说明
ACL 2022 | 基于最优传输的对比学习实现可解释的语义文本相似性
Moving least squares fitting experiment of PCL point cloud processing (62)
Multi task face attribute analysis based on deep learning (based on paddlepaddle)
[Apipost和Apifox哪个更好用?看这篇就够了!]
Day10: declarative transaction control
PCL点云处理之随机采样抽稀RandomSample(六十)
线段树,,
Go+ language
CAD copy commands
Implement redis sentinel to simulate master failure scenarios
SVM——针对线性可分(下)
Gradle learning - getting started with gradle
Cell专刊|AI在蛋白结构、精准医疗、抗体疗法[综述]等的应用与未来预测
PCL点云处理之ply文件读取与保存(五十四)
PCL point cloud processing ply file reading and saving (54)
Web3安全 Go+Security
工程项目管理软件排名
Win10 解base64
Homework of the 20th week