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

同步通信的优点:
时效性较强,可以立即得到结果
同步通信的缺点:
耦合度高
性能和吞吐能力下降
有额外的资源消耗
有级联失败问题
异步通信的优点:
吞吐量提升:无需等待订阅者处理完成,响应更快速
故障隔离:服务没有直接调用,不存在级联失败问题
调用间没有阻塞,不会造成无效的资源占用
耦合度极低,每个服务都可以灵活插拔,可替换
流量削峰:不管发布事件的流量波动多大,都由Broker接收,订阅者可以按照自己的速度去处理事件
异步通信的缺点:
架构复杂了,业务没有明显的流程线,不好管理
需要依赖于Broker的可靠、安全、性能
边栏推荐
- Tortoise and rabbit race example
- Deeply uncover Ali (ant financial) technical interview process with preliminary preparation and learning direction
- 数据可视化实战:实验报告
- Everything is a vector. The service practice of iqiyi online vector recall project
- Zotero文献管理工具之Jasminum(茉莉花)插件
- Logstash - logstash pushes data to redis
- [spark] how to implement spark SQL field blood relationship
- Customer Stories | Netease spring breeze: the "spring breeze" of the fun industry, reaching out to all areas through in-depth interaction
- Ppt template crawler case
- Multi thread synchronous downloading of network pictures
猜你喜欢

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

如何设计好的技术方案

消息队列-消息事务管理对比

Thinking skills of technical leaders

Tortoise and rabbit race example

100 cases of go language

MySQL-07

Younger sister Juan takes you to learn JDBC -- two days' Sprint Day2

ByteDance starts the employee's sudden wealth plan and buys back options with a large amount of money. Some people can earn up to 175%

Logstash——使用throttle过滤器向钉钉发送预警消息
随机推荐
Thinking and summary of technical ability
Library management system
Mysql-10 (key)
Requirement analysis of personal blog system
成水最多的容器
Design and practice of low code real-time data warehouse construction system
Logstash——使用throttle过滤器向钉钉发送预警消息
浏览器的四大内核:Trident,Gecko,Webkit,Blink
How can an enterprise successfully complete cloud migration?
Gof23 - prototype mode
Pychart cannot run designer Exe (this application failed to start because no Qt platform plugin could be I appears)
How to design a good technical scheme
TCP连接与断开,状态迁移图详解
TCP連接與斷開,狀態遷移圖詳解
【Spark】Spark SQL 字段血缘如何实现
去哪儿网BI平台建设演进史
Tortoise and rabbit race example
Thinking skills of technical leaders
MYSQL索引不生效的原因
Static proxy mode