当前位置:网站首页>同步通信和异步通信的区别以及优缺点
同步通信和异步通信的区别以及优缺点
2022-06-26 06:20:00 【塞班呢】
同步通讯:就像打电话,需要实时响应。
异步通讯:就像发邮件,不需要马上回复。

同步通信的优点:
时效性较强,可以立即得到结果
同步通信的缺点:
耦合度高
性能和吞吐能力下降
有额外的资源消耗
有级联失败问题
异步通信的优点:
吞吐量提升:无需等待订阅者处理完成,响应更快速
故障隔离:服务没有直接调用,不存在级联失败问题
调用间没有阻塞,不会造成无效的资源占用
耦合度极低,每个服务都可以灵活插拔,可替换
流量削峰:不管发布事件的流量波动多大,都由Broker接收,订阅者可以按照自己的速度去处理事件
异步通信的缺点:
架构复杂了,业务没有明显的流程线,不好管理
需要依赖于Broker的可靠、安全、性能
边栏推荐
- Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
- 浏览器的四大内核:Trident,Gecko,Webkit,Blink
- Library management system
- GoF23—原型模式
- MVC source code sharing
- 如何让主线程等待子线程执行完毕后再执行
- Message queue - message transaction management comparison
- 视图简析
- Pytorch mixing accuracy principle and how to start this method
- GoF23—工厂模式
猜你喜欢

Keepalived to achieve high service availability
![Selective search for object recognition paper notes [image object segmentation]](/img/cf/d3b08d41083f37c164b26a96b989c9.png)
Selective search for object recognition paper notes [image object segmentation]

TCP connection and disconnection, detailed explanation of state transition diagram

TCP连接与断开,状态迁移图详解
Play with a variety of application scenarios and share secrets with Kwai MMU

Library management system

GoF23—抽象工厂模式

Import / export function implementation

Tencent's 2022 school recruitment of large factories started with salary, and the general contracting of cabbage is close to 40W!

数据治理工作的几种推进套路
随机推荐
Deeply uncover Ali (ant financial) technical interview process with preliminary preparation and learning direction
[intra group questions semester summary] some reference questions for beginners
Five solutions across domains
EFK升级到ClickHouse的日志存储实战
Go语言学习笔记 1.1
Thinking skills of technical leaders
[alluxio & Dachang] the original boss direct employment was applied in this way
实时数仓方案如何选型和构建
Solve the problem that Cmdr cannot use find command under win10
How to design a good technical scheme
如何让主线程等待子线程执行完毕后再执行
Logstash——Logstash将数据推送至Redis
typescript的type
Use the fast proxy to build your own proxy pool (mom doesn't have to worry about IP being blocked anymore)
DPDK——TCP/UDP协议栈服务端实现(一)
个人博客系统需求分析
How can an enterprise successfully complete cloud migration?
MySQL-09
在web页面播放rtsp流视频(webrtc)
Work accumulation - problems encountered in using ThreadLocal in web requests