当前位置:网站首页>Stop saying that microservices can solve all problems

Stop saying that microservices can solve all problems

2022-07-06 23:15:00 Blog viewpoint

Microservice architecture advocates dividing a single application into a group of small services , Services coordinate with each other 、 Cooperate with each other , Form distributed calls , Provide the ultimate value for users .

Therefore, whether it is an entrepreneurial company or an Internet Unicorn enterprise , All regard micro service architecture as a sharp blade , Use it to solve all the problems encountered in the development of the project .

at present , There are many open source technologies that can support microservice architecture , So is microservice architecture really easy ?

Through Internet conferences, internal training and other ways, and a number of entrepreneurial companies CTO After communicating with architects, I found , Many projects begin with microservice Architecture Planning , After several iterations, it ends with a single architecture , Cause the project to fail .

After the analysis of the project, it is concluded that , The failure was mainly due to the lack of practical experience , In the architecture design stage, we can't quickly identify and effectively solve the side effects caused by the microarray architecture .

actually , Microservice architecture is a double-edged sword , Its goal is to split a single application into stateless Services , Solve the bottleneck of the project through horizontal expansion , It can also solve code conflicts in the project 、 Module coupling 、 The quality of project delivery declines 、 The problem of team work efficiency decline 、 Interface performance bottleneck and other problems .

The disadvantages of microservice architecture are also obvious , For example, the integrity of transactions cannot be guaranteed simply by a line of annotations , It is prone to data inconsistency .

that , How to use distributed transactions to solve the problem of data inconsistency in the simplest and most reliable way ?

Originally, the internal interface calls become inter service RPC call , Compared with monomer application , The interface performance under the microservice architecture is lower , How to avoid this problem ?

RPC Repeated calls are inevitable in the calling process because of network problems , Cause dirty data , Therefore, under the microservice architecture, every interface is required to have idempotency , that , What are the common solutions to idempotency ?

There is no technical standard for microservice splitting , This involves how to split the services reasonably , How to grasp the granularity of service splitting , How many people are suitable for a service maintenance team ?

When designing the system architecture, separate services should be divided according to functions , To introduce Dubbo perhaps SpringCloud frame , Has the system become a microservice architecture ?

Why does the original interface slow down after changing from monomer to microservice architecture ?

How to optimize the code under the microservice framework ?

After the transformation of microservice architecture , The testing team still performs interface testing according to the previous thinking 、 A functional test , Whether to cover all scenes ?

Whether the framework needs to be tested , How to test the exceptions invoked between services ?

When these technical problems are in front of the R & D team , There are some CTO Began to hesitate :

Whether it is necessary for entrepreneurial companies to design the project according to the micro service architecture at the start of the project ?

If you don't use the microservice architecture, how to solve the performance problems during the project operation ?

Suppose it is a single architecture , How to smoothly migrate to the microservice architecture in the future ?

With the gradual expansion of the project team and continuous trial and error in the production environment , The team has experienced many online battles , Gained a lot of valuable production experience , Eventually, we will find ways or skills to deal with these side effects .

However , When the company's business transformation from a single business line to a diversified business line , It seems that there are new problems in the system under the microservice architecture :

The data between business lines forms an island , Repeated development of the same function , Sometimes, in order to speed up the project development progress, we even copy the code of the original function directly from other business lines and complete the development of new requirements after simple modification , Lead to similar bug In every business line .

The number of R & D teams has been increasing , But I always feel that R & D personnel are not enough .

here , The emergence of Zhongtai just solves these problems , Zhongtai advocates the idea of enterprise level capability reuse , It is advocated to sink the common needs to the middle stage to form the export of general capabilities , To reduce repeated development . therefore , Microservice architecture turns to middle office architecture , Is it just a slogan or a systematic process ?

《 Architecture evolution practice : From monomer to microservice and then to Zhongtai 》 Through real cases, this book completely describes how to gradually transform from a single architecture to a middle platform !

 Insert picture description here

Content abstract

The whole book consists of 9 Chapters :

The first 1 The chapter explains how to optimize the single architecture after encountering problems through cases , Secondly, a failed case is used to describe what preparations need to be made before really planning to use the microservice architecture .

The first 2 The chapter introduces how to split Services , And what are the advantages of the project structure of standardized microservice architecture .

The first 3 The chapter introduces the commonly used microservice start modes in terms of concept and practice .

The first 4 The rules are based on actual cases , Describe how to transform from a single architecture to a microservice architecture , What needs to be done in this process .

Microservices focus on polishing each service , So the first 5 The chapter describes how to polish each service through specific programs , How to use multi-level cache 、 Parallel calls and other means to improve the throughput of the system , If mixed current limiting is used to ensure the stability of the service , How to use message queue to cut peak . Gateway is the unified entrance of the system , It is a very important component under the microservice architecture , When the open source gateway does not meet the business needs , How to develop a set of microservice gateway by yourself ?

The first 6 The chapter introduces how to learn from 0 Start to develop a gateway to meet personalized needs . Microservice architecture not only needs to change the development mode , Testing methods also need to change , How to do system testing under the microservice architecture , Why introduce chaos experiment ?

The first 7 Zhang looks at the testing under the microservice architecture from the perspective of testing .

The first 8 Chapter to evaluate whether it can ensure the stable operation of the service , It can also avoid waste , Based on the full link voltage measurement platform in a scientific and effective way , Evaluate online capacity systematically and scientifically .

The first 9 The chapter describes how to move from the micro service architecture to the middle stage , In this process, how to build a middle office team , What support and cooperation of the company are needed , How to meet the needs of the center console and how to assess the center console in stages .

This book is based on real cases , Key points of re fusion technology , Gradually introduce how to design an architecture that meets business and performance requirements , It is a reference book for architects , It is also a reference book for technical optimization .

Expert comment

Microservices have strong scalability 、 loose coupling 、 Facilitate agile development and other features , In the era of cloud computing, it is adopted by more and more organizations , The adoption of micro service architecture has become the only way for modern enterprises' digital transformation .

This book starts with single application , The architecture selection is elaborated 、 Split 、 The implementation of 、 Problems and solutions encountered in the implementation of microservices such as optimization . The book is easy to understand , There is an overall theoretical guidance , Another pair Dubbo、Spring Cloud And other microservice tools , It has very high reference and learning value for microservice practitioners .

—— Li Qipeng ,Apache RocketMQ PMC M ember、RocketMQ Sponsor of Chinese community

I first met the author of this book in Dubbo In the offline Salon of the community , Follow up Dubbo We have also had some in-depth exchanges and discussions during the maintenance of the community . The author of Dubbo、 The deep understanding and rich practical experience of microservice architecture are impressive .

This book starts from the current popular micro service architecture , It introduces in detail how to upgrade from a single architecture to a micro service architecture , And start with the basic theory in the form of actual combat , Gradually optimize every detail of the microservice architecture , Finally, it will be upgraded to the medium platform architecture , The whole upgrade idea is explained clearly . This book combines theory with practice , It can be used as a reference book for microservice architecture technology selection or implementation .

—— Liu Jun ,Apache Dubbo PMC Chair、Dubbo3 Head of open source

The biggest feature of this book is to talk about architecture according to business , It gives targeted solutions for different business scenarios 、 The architectural paradigm of grounding gas 、 Evolution ideas and landing strategies , At the same time, it integrates teacher Pan's in-depth summary based on his own practical experience . I believe this sincere work will benefit readers a lot !

—— Li Xin ,《 Micro service governance : system 、 Architecture and practice 》 author 、 Tianhong fund online channel technical director

From the basic knowledge of microservices , Advanced knowledge of microservices , And to the final actual combat of the middle platform system , The author is well organized 、 This paper introduces the key technologies and principles involved in all aspects of service architecture from simple to in-depth . It is suggested that relevant practitioners read this book .

—— Wang Xindong , JD retail technical director 、《 The way of building cultivation 》 author

This book starts from a practical case of a startup company's transformation from a single architecture to a micro service architecture , It shows readers the whole life cycle of building distributed systems . Through detailed case analysis 、 In depth principle explanation and practical operation sharing , Readers not only know it , Better to know why . This book is a practical treasure book that can always be kept on your desk . I believe that no matter beginners who are interested in the distributed principle , Or a senior engineer who is working on distributed transformation , By reading this book , There will be gains .

—— Song Shun ( Qitian ), Senior technical expert of ant group 、Apollo Config PM C

This book is based on teacher Pan's own experience , It makes an objective exposition of the middle platform architecture and its implementation , Both advantages and disadvantages are well explained “ A sense of reality ”. There is no perfect architecture , There is no perfect way , Gu “ this ” It is very likely to lose “ That ”, This also verifies many people's views on architecture . Architecture is the way of balance , Architecture is the choice . Architecture theory has something in common , Architecture implementation is full of personality , You need to remind yourself all the time in the implementation , Choose between others' experience and your own environment , Balance the abilities of others with your own limitations . Otherwise , This book 1 Chapter “ Rollover ” accident , It is possible for you to practice chapter 9 The design of chapter reappears . Great success is not easy to repeat , Big failures are easy to happen again .

—— Fu Xiaoyan ,《 Enterprise business architecture design : Methodology and Practice 》《 Aggregate Architecture : Component oriented enterprise architecture for digital ecology 》 author
 Insert picture description here
 Insert picture description here

原网站

版权声明
本文为[Blog viewpoint]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207061540411473.html