当前位置:网站首页>Insight into cloud native | microservices and microservice architecture
Insight into cloud native | microservices and microservice architecture
2022-07-02 09:17:00 【_ Time boiled the rain】
Preface
2014 year Martin Fowler Officially put forward “ Microservices ” The concept of : Microservice architecture is an architecture pattern , It promotes the division of a single application into a small set of services , Services coordinate with each other 、 Cooperate with each other , Provide the ultimate value for users . Each service runs in its own process , Services and services use lightweight communication mechanism to communicate with each other ( Usually based on HTTP Of RESTful API). Each service is built around a specific business , And can be independently deployed to the production environment 、 Class production environment, etc . in addition , Try to avoid unified 、 Centralized service management mechanism , For a specific service , Should be based on business up and down writing , Choose the right language 、 Tools to build it .

Martin Fowler, Godfather in software development ,ThoughtWorks Chief scientist , The author of 《 restructure : Improve the design of existing code 》《 Analysis mode : Reusable object model 》《 Domain specific language 》《 Enterprise Application Architecture 》 And so on , Agile development methodology The founders , Microservices Concept proposer .
One 、 Monomer architecture and micro service architecture
1、 Monomer architecture
A single system is a large and complete set of functions , Each server runs the complete service of the application . All functions of an application are in a project , In the project classes、jsp、css、js Wait until the back-end resources are finally archived as one war Package deployment to server .

Advantages of monomer Architecture :
- Development 、 test 、 Deployment is relatively simple ;
- Simple technical architecture .
Disadvantages of monomer Architecture :
- Low development efficiency , Developers often need to understand the overall business functions
- Maintenance costs are high , Poor scalability
- Each upgrade deployment has a great impact 、 All services will be unavailable , Pull one hair and move the whole body
- The cost of technology selection is high
2、 Microservice architecture
Microservice architecture is relative to single application , be based on “ Low coupling 、 High cohesion ” principle , Split a single application into multiple services according to the actual business functions , Each service provides specific business functions ( Principle of single responsibility ), Each service can be deployed separately , Are independent of each other .
The advantages of microservice Architecture :
- Each service is split according to the principle of high cohesion and low coupling , The code is simpler and easier to understand
- Development of simple 、 Just focus on one business module
- extensible
- Fore and aft end separation , Easy to deploy
The shortcomings of microservice architecture
- The complexity of operation and maintenance deployment has increased
- Between services REST And so on , Increased communication costs
- Other problems caused by splitting : Such as data consistency , Distributed transaction problems
There is no problem between monomer architecture and microservice architecture , Only the question of suitability . If the business is relatively stable , Long publishing cycle , It is more suitable for single architecture . and Microservice architecture is responding to changes in demand 、 Fault tolerant processing 、 Service reuse and extension 、 Improve development efficiency 、 Simplifying interaction and other aspects have obvious advantages . meanwhile , agile development 、DevOps、 Continuous integration / Continuous delivery 、 Container technology 、Spring Cloud frame 、 Lightweight Directory Service 、 The emergence of technology such as domain driven design also makes microservice architecture a panacea for solving complex problems .
Two 、 What are the microservice architecture solutions ?
- Spring Cloud: It's an ordered set of frames , It USES Spring Boot The development convenience of cleverly simplifies the distributed system base Infrastructure development , Such as service discovery registration 、 Configuration center 、 The message bus 、 Load balancing 、 Circuit breaker 、 Data monitoring, etc. , Both can be used. Spring Boot The development style of one-click startup and deployment .

- Apache ServiceComb: Is the first Apache Microservices , It's an open source microservice solution , Realize efficient operation and maintenance management of microservice applications . It provides one-stop open source microservice solutions , The fusion SDK Frame level 、0 invasion ServiceMesh Scene and support multi language .

- ZeroC IceGrid:ZeroC The company's masterpiece , Inherited CORBA Of blood , It is an object-oriented distributed system middleware . be based on RPC Framework developed , Good performance and distributed capability .

- Motan: It's open source. RPC frame , Only support Java Language implementation , Need to be in Client End ( Serving consumers ) and Server End ( Service providers ) introduce SDK.
- Thrift: It's a lightweight cross language RPC Communication scheme , Support up to 25 Programming languages .Thrift Has its own interface definition language IDL
- ......
summary
Microservice architecture selection , We have to rely on Community maturity 、 Popularity 、 Development difficulty 、 The learning curve 、 Business reality And other multidimensional factors , Microservice architecture has played an important role in cloud native architecture , and SpingCloud Undoubtedly, it is one of our preferred technical solutions for developing micro Services .
边栏推荐
- 盘点典型错误之TypeError: X() got multiple values for argument ‘Y‘
- Solution to amq4036 error in remote connection to IBM MQ
- Cloudrev self built cloud disk practice, I said that no one can limit my capacity and speed
- 2022/2/13 summary
- 分布式服务架构精讲pdf文档:原理+设计+实战,(收藏再看)
- oracle修改数据库字符集
- Redis installation and deployment (windows/linux)
- 概念到方法,绝了《统计学习方法》——第三章、k近邻法
- Chrome用户脚本管理器-Tampermonkey 油猴
- Micro service practice | introduction and practice of zuul, a micro service gateway
猜你喜欢

WSL安装、美化、网络代理和远程开发

盘点典型错误之TypeError: X() got multiple values for argument ‘Y‘

Number structure (C language -- code with comments) -- Chapter 2, linear table (updated version)

微服务实战|负载均衡组件及源码分析

Cloudrev self built cloud disk practice, I said that no one can limit my capacity and speed

Number structure (C language) -- Chapter 4, compressed storage of matrices (Part 2)

告别996,IDEA中必装插件有哪些?

Ora-12514 problem solving method

Complete solution of servlet: inheritance relationship, life cycle, container, request forwarding and redirection, etc

Matplotlib剑客行——没有工具用代码也能画图的造型师
随机推荐
【Go实战基础】gin 如何绑定与使用 url 参数
Move a string of numbers backward in sequence
使用IBM MQ远程连接时报错AMQ 4043解决思路
[go practical basis] gin efficient artifact, how to bind parameters to structures
京东面试官问:LEFT JOIN关联表中用ON还是WHERE跟条件有什么区别
C language - Blue Bridge Cup - 7 segment code
查看was发布的应用程序的端口
洞见云原生|微服务及微服务架构浅析
Function ‘ngram‘ is not defined
Pyspark de duplication dropduplicates, distinct; withColumn、lit、col; unionByName、groupBy
[go practical basis] how can gin get the request parameters of get and post
微服务实战|熔断器Hystrix初体验
数构(C语言)——第四章、矩阵的压缩存储(下)
Using recursive functions to solve the inverse problem of strings
Win10 uses docker to pull the redis image and reports an error read only file system: unknown
Don't spend money, spend an hour to build your own blog website
Redis zadd导致的一次线上问题排查和处理
机器学习实战:《美人鱼》属于爱情片还是动作片?KNN揭晓答案
【Go实战基础】gin 如何设置路由
Matplotlib swordsman line - first acquaintance with Matplotlib