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

同步通信的优点:
时效性较强,可以立即得到结果
同步通信的缺点:
耦合度高
性能和吞吐能力下降
有额外的资源消耗
有级联失败问题
异步通信的优点:
吞吐量提升:无需等待订阅者处理完成,响应更快速
故障隔离:服务没有直接调用,不存在级联失败问题
调用间没有阻塞,不会造成无效的资源占用
耦合度极低,每个服务都可以灵活插拔,可替换
流量削峰:不管发布事件的流量波动多大,都由Broker接收,订阅者可以按照自己的速度去处理事件
异步通信的缺点:
架构复杂了,业务没有明显的流程线,不好管理
需要依赖于Broker的可靠、安全、性能
边栏推荐
- EFK升级到ClickHouse的日志存储实战
- Self attention and multi head self attention (MSA) in transformer
- API and encapsulation of cookies
- Pytorch mixing accuracy principle and how to start this method
- Five solutions across domains
- A new paradigm for large model application: unified feature representation optimization (UFO)
- How to select and build a real-time data warehouse scheme
- How can an enterprise successfully complete cloud migration?
- PyTorch混合精度原理及如何开启该方法
- 跨域的五种解决方案
猜你喜欢

消息队列-功能、性能、运维对比

Handwritten background management framework template (I)

Gof23 - prototype mode

DPDK——TCP/UDP协议栈服务端实现(二)

Introduction to canal deployment, principle and use

The interviewer with ByteDance threw me an interview question and said that if I could answer it, other companies would have an 80% chance of passing the technical level

Design and practice of low code real-time data warehouse construction system

Gof23 - factory mode

University Information Management System
Play with a variety of application scenarios and share secrets with Kwai MMU
随机推荐
Experience the new features of Milvus 2.0 together
【Spark】Spark SQL 字段血缘如何实现
Solve the problem that Cmdr cannot use find command under win10
Laravel 实现 groupBy 查询分组数量
Play with a variety of application scenarios and share secrets with Kwai MMU
Underlying principle of MySQL index
302. 包含全部黑色像素的最小矩形 BFS
Connexion et déconnexion TCP, détails du diagramme de migration de l'état
数据治理工作的几种推进套路
typescript的type
Volatile application scenarios
如何让主线程等待子线程执行完毕后再执行
typescript的type
canal部署、原理和使用介绍
Top down transformation method
Number of connections server database message: error number 2003can't connect to MySQL server on 'server address' (10061)
TCP connection and disconnection, detailed explanation of state transition diagram
[intra group questions semester summary] some reference questions for beginners
实时数仓方案如何选型和构建
Work accumulation - problems encountered in using ThreadLocal in web requests