当前位置:网站首页>[微服务]认识微服务
[微服务]认识微服务
2022-06-26 23:09:00 【fate _zore】
认识微服务
单体架构:将业务的所有功能集中在一个项目中开发,打成一个包部署。
**优点:**架构简单,部署成本低
**缺点:**耦合度高(维护困难、升级困难)

分布式架构:根据业务功能对系统做拆分,每个业务功能模块作为独立项目开发,称为一个服务。
**优点:**降低服务耦合,有利于服务升级和拓展
**缺点:**服务调用关系错综复杂

分布式架构虽然降低了服务耦合,但是服务拆分时也有很多问题需要思考:
- 服务拆分的粒度如何界定?
- 服务之间如何实现远程调用?
- 服务的调用关系如何管理?
- 服务健康状态如何感知?
- 服务集群地址如何维护?
人们需要制定一套行之有效的标准来约束分布式架构。
微服务
微服务的架构特征:
- 单一职责:微服务拆分粒度更小,每一个服务都对应唯一的业务能力,做到单一职责
- 自治:团队独立、技术独立、数据独立,独立部署和交付
- 面向服务:服务提供统一标准的接口,与语言和技术无关
- 隔离性强:服务调用做好隔离、容错、降级,避免出现级联问题

微服务的上述特性其实是在给分布式架构制定一个标准,进一步降低服务之间的耦合度,提供服务的独立性和灵活性。做到高内聚,低耦合。
因此,可以认为微服务是一种经过良好架构设计的分布式架构方案 。
其中在 Java 领域最引人注目的就是 SpringCloud 提供的方案了。
微服务结构
微服务这种方案需要技术框架来落地,全球的互联网公司都在积极尝试自己的微服务落地技术,国内最知名的就是SpringCould和阿里的Dubbo
微服务技术对比
| Dobbo | springCloud | springCloudAlibaba | |
|---|---|---|---|
| 注册中心 | zookeeper,Redis | Eureka,Consul | Nacos,Eureka |
| 服务远程调用 | Dubbo协议 | Feign(http协议) | Dubbo,Feign |
| 配置中心 | null | SpringCloudConfig | SpringCloudConfig,Nacos |
| 服务网关 | null | SpringCloudGateway,Zuul | SpringCloudGateway,Zuul |
| 服务监控和保护 | dubbo-admin,功能弱 | Hystrix | Sentinel |

边栏推荐
- ASP.Net Core创建MVC项目上传文件(缓冲方式)
- DAST black box vulnerability scanner part 5: vulnerability scanning engine and service capability
- go中的微服务和容器编排
- leetcode 1143. Longest Commom Subsequence 最长公共子序列(中等)
- VB. Net class library - 4 screen shots, clipping
- [kotlin] keyword suspend learning of thread operation and async understanding
- 300 questions lesson 3 vector group
- 【710. 黑名单中的随机数】
- 邮箱附件钓鱼常用技法
- On cap theorem in distributed system development technology
猜你喜欢
![How to download on selenium computer -selenium download and installation graphic tutorial [ultra detailed]](/img/ec/1c324dcf38d07742a139aac2bab02e.png)
How to download on selenium computer -selenium download and installation graphic tutorial [ultra detailed]

【测试】最火的测试开发学习路线内容再次大更新,助力通关大厂测开

微信小程序自动生成打卡海报

From bitmap to bloom filter, C # implementation

代码之外:写作是倒逼成长的最佳方式

入侵痕迹清理

Redcap is ready to come out. It is indispensable to build a "meta universe"

Learun low code OA system construction platform

Weaving dream collection plug-ins are recommended to be free collection plug-ins

ASP.Net Core创建MVC项目上传文件(缓冲方式)
随机推荐
【混合编程jni 】第七篇之JNI 的命令行们
Development and learning route of golang language
300题 第三讲 向量组
golang语言的开发学习路线
Leetcode 718. 最长重复子数组(暴力枚举,待解决)
ASP.Net Core创建MVC项目上传文件(缓冲方式)
阿里云服务器的购买、基本配置、(xshell)远程连接、搭建环境
树莓派初步使用
Is it reliable to open an account on a stock trading mobile phone? Is it safe to open an account online and speculate in stocks
Unity method for setting material and shader
[cloud native topic -51]:kubesphere cloud Governance - operation - step by step deployment of microservice based business applications - database middleware redis microservice deployment process
Electronic Society C language level 1 29, alignment output
代码之外:写作是倒逼成长的最佳方式
为什么我不推荐去SAP培训机构参加培训?
Raspberry pie preliminary use
【混合编程jni 】第九篇之Jni总结
Installing MySQL on Ubuntu
Unity布料系统_Cloth组件(包含动态调用相关)
UnityEditor編輯器擴展-錶格功能
Unity3d plug-in anyportrait 2D bone animation