当前位置:网站首页>Microservice architecture debate between radical technologists vs Project conservatives
Microservice architecture debate between radical technologists vs Project conservatives
2022-07-06 19:41:00 【Bocloud bocloud】
Preface
In recent years, more and more enterprises have begun to build their own micro service system , In the process of model selection, there will inevitably be disputes over routes . Radical technocrats often insist on the idea of buying the new rather than the old , Stand firmly on the side of the service grid . The relatively conservative project faction will pay more attention to the stability and ease of use of Technology , Thus, it advocates to give priority to the traditional micro service scheme . If it's you , What would you choose ?
Before answering , Let's try to answer a few questions first :
What is microservice ?
What is the purpose of your enterprise trying to build a micro service system ? Have you encountered any challenges ?
Do you know about service grid ? Do you know what kind of mission it was born with ?
If you can answer the above questions quickly , I believe your conclusion on the selection of micro services should be considered . If the above questions confuse you , Why don't you sort out the logic of micro services with me .
01 When we talk about micro Services , What do you think ?
When it comes to microservices, the first thing most people think of is Spring Cloud、Dubbo perhaps Istio. in fact , This understanding has certain limitations . Strictly speaking, microservice means literally , Refers to micro services . And what we often say Spring Cloud、Dubbo and Istio It is the specific practice of the idea of micro service architecture . Of course , Knowing only this is nonsense literature , What we want to know more is why we need microservices ? What benefits can microservice bring ?
It should be said The evolution of any architecture will clearly point to the core pain point of the previous generation architecture , The initial pain point of microservices is centralization and tight coupling . I'm afraid that all programmers who have experienced the previous era will be interested in the system code “ Pull one hair and move the whole body ” impressive .
Microservices can be divided into relatively simple and interconnected micro modules , Realize the full decoupling of business , The more independent service splitting method also makes microservices more in line with the needs of distributed deployment . Microservice system also brings other advantages , such as : Improve fault isolation capability 、 Scalability enhancements 、 Reduce code complexity, etc . Since then, the great gods of technology have been highly cohesive 、 Low coupling has a more people-friendly implementation , And the burgeoning distribution also has more uses .
Of course, like all things , Microservices are not perfect . Completely fragmented services reduce code complexity , But it greatly increases the complexity of the architecture , This makes it difficult for services to find each other and track quality problems . meanwhile , The transaction problems caused by distribution are also highlighted . For the designers of the project , How to reasonably plan the functions of each microservice , It has also become a thorny problem that needs to be tangled repeatedly .
02 Service grid is a micro service 2.0 Do you ?
I often hear people say that service grid (Service Mesh) It is the next generation of microservice Technology ,Service Mesh Will replace with Spring Cloud The first generation of microservice architecture technology represented by . The author has different views on this .
With Spring Cloud For the microservice architecture and service grid The biggest difference is actually the intrusiveness of the code . Usually Spring Cloud The program of the architecture needs to be comprehensively considered with the business logic when designing , Although it will not invade the business , But active in every corner of the business code .
The service grid technology completely adopts a non-invasive processing method ,sidecar Become the only spokesperson for business services . Service discovery that previously required business systems to complete 、 Traffic management and other work , Now turn to the control surface and sidecar Formed a professional team to take care of .
thus it can be seen , In solving the problems encountered by micro Services , Service grid technology and Spring Cloud There is no essential difference between the basic ideas of microservice architecture technology represented by , There are only obvious differences in the specific implementation path .
It should be acknowledged that the emergence of service grid technology is based on the demand of technicians for further separation of business and governance capabilities , But from this point of view, the service grid is a micro service 2.0 Time , It's too early . In my opinion , At this stage, service grid technology is more like a half generation upgrade of microservice Technology .
03 Let's solve the problem of how to choose
Mountain impermanence , The water is impermanent , There is no fixed rule about what kind of technical architecture to choose in the project . As we mentioned above , The old architecture inevitably has many disadvantages in the process of use , And the new architecture will also bring new problems . It cannot be said that the most advanced architecture is the best , Similarly, the oldest architecture is not without value . All choices should be based on the reality of the enterprise and the project .
So what factors should we consider ?
1. The purpose of the project or the development stage of the product . If the purpose of the project is to verify a technical or business solution , Or the product is still in MVP Validation phase , Please remove your attention from the myth of micro service architecture , For the sake of rapid development, monomer architecture is your best choice .
2. Business scale and market expectations . Of course, microservices have enough advantages to make people yearn , But we should never choose technology for Technology . A daily life is high enough 2C Of course, the scenario requires microservices , A transaction volume is large enough 2B The scenario is also inseparable from the guarantee of micro Services . However, small and beautiful vertical fields do not necessarily need the blessing of micro Services .
3. Technical personnel reserve . The core value of technology lies in people , For enterprises, it is best to inventory the human resources at hand before carrying out micro service transformation .Java The language has more developers , Labor costs are relatively low ,Spring Cloud and Dubbo It's very suitable for Java Enterprises with more programmers .Kubernetes And container technology is an important foundation of the current popular cloud native technology , The salaries of relevant operation and maintenance personnel and developers have also risen , If the accumulation of such personnel in the enterprise is good , Use one that has stronger affinity with the cloud Service Mesh The plan is also very good .
4. Project resources . The project is always to complete the work of determining the scope with limited resources . A project that will only run in a virtual machine environment , In fact, there is no need to use it forcibly Service Mesh. A non Java Language development system , There is no need to use Spring Cloud And forcibly restructure into Java System .
5. Tolerance for request delays .Sidecar While bringing convenience , It also brings additional delay . With Istio The use of Envoy For example , The official test conclusion is that every time sidecar It will produce 3ms Left right delay , For general application systems 3ms Is a completely acceptable number . But for complex business systems with deep call links , On the link sidecar The accumulated delay will be a large number . In a scene that is very sensitive to delay ,3ms Whether it is an acceptable number also needs to be fully considered .
With limited space, the author cannot and cannot exhaust all the situations , The above content is just a guide . Technology is ultimately just a means to achieve our practical goals , Making good use of bricks is also a powerful weapon of a generation .
边栏推荐
- 【翻译】云原生观察能力微调查。普罗米修斯引领潮流,但要了解系统的健康状况仍有障碍...
- Leetcode 30. 串联所有单词的子串
- Tensorflow2.0 自定义训练的方式求解函数系数
- Hudi vs Delta vs Iceberg
- 深入分析,Android面试真题解析火爆全网
- From spark csc. csr_ Matrix generate adjacency matrix
- swagger2报错Illegal DefaultValue null for parameter type integer
- 打家劫舍III[后序遍历与回溯+动态规划]
- Synchronous development of business and application: strategic suggestions for application modernization
- [infrastructure] deployment and configuration of Flink / Flink CDC (MySQL / es)
猜你喜欢
【基础架构】Flink/Flink-CDC的部署和配置(MySQL / ES)
接雨水问题解析
腾讯Android面试必问,10年Android开发经验
[translation] micro survey of cloud native observation ability. Prometheus leads the trend, but there are still obstacles to understanding the health of the system
深入分析,Android面试真题解析火爆全网
快速幂模板求逆元,逆元的作用以及例题【第20届上海大学程序设计联赛夏季赛】排列计数
中缀表达式转后缀表达式详细思路及代码实现
Looting iii[post sequence traversal and backtracking + dynamic planning]
面试突击63:MySQL 中如何去重?
史上超级详细,想找工作的你还不看这份资料就晚了
随机推荐
MATLAB中deg2rad和rad2deg函数的使用
usb host 驱动 - UVC 掉包
350. 两个数组的交集 II
[infrastructure] deployment and configuration of Flink / Flink CDC (MySQL / es)
Mysql Information Schema 學習(一)--通用錶
Live broadcast today | the 2022 Hongji ecological partnership conference of "Renji collaboration has come" is ready to go
【翻译】数字内幕。KubeCon + CloudNativeCon在2022年欧洲的选择过程
IC设计流程中需要使用到的文件
10 schemes to ensure interface data security
接雨水问题解析
算法面试经典100题,Android程序员最新职业规划
USB host driver - UVC swap
《数字经济全景白皮书》保险数字化篇 重磅发布
Is not a drawable (color or path): the vector graph downloaded externally cannot be called when it is put into mipmap, and the calling error program crashes
Carte de réflexion + code source + notes + projet, saut d'octets + jd + 360 + tri des questions d'entrevue Netease
黑馬--Redis篇
MySql必知必会学习
From spark csc. csr_ Matrix generate adjacency matrix
Learning and Exploration - function anti shake
反射及在运用过程中出现的IllegalAccessException异常