当前位置:网站首页>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 .
边栏推荐
- 别找了,Chrome浏览器必装插件都在这了
- How to realize asynchronous programming in a synchronous way?
- Solution and analysis of Hanoi Tower problem
- 以字节跳动内部 Data Catalog 架构升级为例聊业务系统的性能优化
- 查看was发布的应用程序的端口
- Microservice practice | declarative service invocation openfeign practice
- 十年開發經驗的程序員告訴你,你還缺少哪些核心競爭力?
- Multi version concurrency control mvcc of MySQL
- ORA-12514问题解决方法
- Oracle modifies tablespace names and data files
猜你喜欢

Taking the upgrade of ByteDance internal data catalog architecture as an example, talk about the performance optimization of business system

破茧|一文说透什么是真正的云原生
![[go practical basis] how to verify request parameters in gin](/img/de/50db131d6993e5d955e3416c667c4c.png)
[go practical basis] how to verify request parameters in gin

Watermelon book -- Chapter 6 Support vector machine (SVM)

What is the future value of fluorite mine of karaqin Xinbao Mining Co., Ltd. under zhongang mining?

2022/2/13 summary

QT -- how to set shadow effect in QWidget

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

ORA-12514问题解决方法

Flink - use the streaming batch API to count the number of words
随机推荐
Redis sorted set data type API and application scenario analysis
Oracle modify database character set
Probability is not yet. Look at statistical learning methods -- Chapter 4, naive Bayesian method
QT qtimer class
[go practical basis] how to verify request parameters in gin
C Gaode map obtains the address according to longitude and latitude
Complete solution of servlet: inheritance relationship, life cycle, container, request forwarding and redirection, etc
十年開發經驗的程序員告訴你,你還缺少哪些核心競爭力?
Knowledge points are very detailed (code is annotated) number structure (C language) -- Chapter 3, stack and queue
分布式服务架构精讲pdf文档:原理+设计+实战,(收藏再看)
Micro service practice | introduction and practice of zuul, a micro service gateway
C language implementation of mine sweeping game
C4D quick start tutorial - C4d mapping
[staff] time mark and note duration (staff time mark | full note rest | half note rest | quarter note rest | eighth note rest | sixteenth note rest | thirty second note rest)
告别996,IDEA中必装插件有哪些?
查看was发布的应用程序的端口
洞见云原生|微服务及微服务架构浅析
Gocv split color channel
Use of libusb
《统计学习方法》——第五章、决策树模型与学习(上)