当前位置:网站首页>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 .
边栏推荐
- 一篇详解带你再次重现《统计学习方法》——第二章、感知机模型
- 十年开发经验的程序员告诉你,你还缺少哪些核心竞争力?
- A detailed explanation takes you to reproduce the statistical learning method again -- Chapter 2, perceptron model
- Redis sorted set data type API and application scenario analysis
- hystrix 实现请求合并
- Dix ans d'expérience dans le développement de programmeurs vous disent quelles compétences de base vous manquez encore?
- Sentinel reports failed to fetch metric connection timeout and connection rejection
- 盘点典型错误之TypeError: X() got multiple values for argument ‘Y‘
- Function ‘ngram‘ is not defined
- MYSQL安装出现问题(The service already exists)
猜你喜欢
2022/2/13 summary
Microservice practice | fuse hytrix initial experience
C language - Blue Bridge Cup - 7 segment code
【Go实战基础】gin 如何获取 GET 和 POST 的请求参数
告别996,IDEA中必装插件有哪些?
Dix ans d'expérience dans le développement de programmeurs vous disent quelles compétences de base vous manquez encore?
一篇详解带你再次重现《统计学习方法》——第二章、感知机模型
【Go实战基础】gin 如何自定义和使用一个中间件
Solution to amq4036 error in remote connection to IBM MQ
Chrome视频下载插件–Video Downloader for Chrome
随机推荐
微服务实战|负载均衡组件及源码分析
Microservice practice | teach you to develop load balancing components hand in hand
[go practical basis] how to customize and use a middleware in gin
Oracle modifies tablespace names and data files
Gocv image cutting and display
Knowledge points are very detailed (code is annotated) number structure (C language) -- Chapter 3, stack and queue
There is a problem with MySQL installation (the service already exists)
Solutions to Chinese garbled code in CMD window
WSL installation, beautification, network agent and remote development
Matplotlib剑客行——布局指南与多图实现(更新)
Count the number of various characters in the string
以字节跳动内部 Data Catalog 架构升级为例聊业务系统的性能优化
Number structure (C language) -- Chapter 4, compressed storage of matrices (Part 2)
Chrome用户脚本管理器-Tampermonkey 油猴
队列管理器running状态下无法查看通道
WSL安装、美化、网络代理和远程开发
Select sort and insert sort
View the port of the application published by was
Introduction to the basic concept of queue and typical application examples
JVM指令助记符