当前位置:网站首页>Transport layer uses sliding window to realize flow control
Transport layer uses sliding window to realize flow control
2022-06-30 19:56:00 【Foxconn quality inspector zhangquandan】
Sliding window mechanism
Traffic buffering : Solve the speed mismatch problem ( Client and server , The speeds at these two ends are completely inconsistent , Inconsistent machine performance , At this time, the processing speed is not matched )
TCP Use sliding window to realize flow control . Flow control is to control the sending rate of the sender , To ensure that the receiving party can receive .
TCP Both sides of the session maintain a sending window and a receiving window . The size of the receive window depends on the application 、 System 、 Hardware limitations . The sending window depends on the receiving window of the peer notification .
In the confirmation message sent by the receiver window Field can be used to control the size of the sender's window , Thus, the transmission rate of the sender is affected . Send the receiver's confirmation message window Field set to 0, Then the sender cannot send data .

TCP Header contains window Field ,16bit position , It represents the byte capacity of the window , The maximum is 65535. This field tells the sender how many buffers it has to receive data . So the sender can send data according to the processing power of the receiver , The receiver will not be unable to handle it . The size of the receiving window is approximately equal to the size of the transmitting window .
Flow control means that the sender sends to the receiver too fast , The receiver can tell it to slow down .( Sliding window to achieve flow control , Flow control is that the receiver controls the sender )
Receiving end setting window , The sending end sets the sending window according to the window of the receiving end , The window can be adjusted during the whole communication process .

There are window fields when the above connection is established 64240 Bytes , The largest data segment is 1460, The maximum transmission unit of the network card MTU The largest transmission unit in the data link layer is 1500 Bytes , The first part of the network layer is 20 Bytes , The first part of the transport layer is 20 Bytes , Then the data becomes 1460 Bytes . So slide the window 64240/1460 You can send it continuously 44 A packet .
At the same time, it can also support selective confirmation SACK_PERM=1.
In establishment TCP These parameters can be negotiated when connecting , How big is the receiving window ,MSS How much is the , Then support selective confirmation .
Confirm that the length of the data inside is 0 Of , The window size is specified when the confirmation is given , You can see that the window can be resized . When the receiving window becomes smaller, the sending window becomes smaller , The sender doesn't send it so fast .

b tell a, Its acceptance window is 400, The maximum length of the segment is 100 Bytes , In the hair 1 2 here we are 3 lost , Confirm it , Let it send a third packet , Then the window starts moving , Then send a message 4 5 A second time 3 individual , Confirm to it after receiving ........
The window becomes 0 After that, I stopped sending it , The sender stops , Send confirmation after processing , The window is adjusted to 400.
边栏推荐
- Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
- 更智能!AIRIOT加速煤炭行业节能减排升级
- 盘点华为云GaussDB(for Redis)六大秒级能力
- 传输层 使用滑动窗口实现流量控制
- 网易云签到可抽奖?那一年我能签到365天。不信?你看。
- 企业中台规划和IT架构微服务转型
- 正则系列之字符类
- 启动PHP报错ERROR: [pool www] cannot get uid for user ‘@[email protected]’
- 超视频时代的音视频架构建设|Science和英特尔联袂推出“架构师成长计划”第二季
- QQmlApplicationEngine failed to load component qrc:/main.qml:-1 No such file or directory
猜你喜欢

What is the difference between tolocal8bit and toutf8() in QT

Tencent conference application market was officially launched, with more than 20 applications in the first batch

线下门店为什么要做新零售?

Spark - 一文搞懂 Partitioner

腾讯会议应用市场正式上线,首批入驻超20款应用

【论文阅读】Trajectory-guided Control Prediction for End-to-end Autonomous Driving: A Simple yet Strong Baseline

RP prototype resource sharing - shopping app

【NLP】【TextCNN】 文本分类

4.3寸触控屏12路控制端口可编程网络中控支持5台中控主机相互备份

小学期,第三场-下午:WEB_sessionlfi
随机推荐
【450. 删除二叉搜索树中的节点】
测试人进阶技能:单元测试报告应用指南
Code shoe set - mt3435 · assignment - bipartite graph problem - Graphic explanation
DELL R720服务器安装网卡Broadcom 5720驱动
Redis beginner to master 01
更智能!AIRIOT加速煤炭行业节能减排升级
matlab 将三角剖分结果保存为STL文件
Taiwan SSS Xinchuang sss1700 replaces cmedia cm6533 24bit 96KHz USB audio codec chip
mysql主从同步
MySQL数据库误删回滚的解决
将 EMQX Cloud 数据通过公网桥接到 AWS IoT
Lombok
Kubevela 1.4: make application delivery safer, easier to use, and more transparent
杭州炒股开户选择手机办理安全吗?
QQmlApplicationEngine failed to load component qrc:/main.qml:-1 No such file or directory
MySQL billing Statistics (Part 1): MySQL installation and client dbeaver connection
【多线程】使用线程池、实现一个简单线程池
无线充U型超声波电动牙刷方案开发
KubeVela 1.4:让应用交付更安全、上手更简单、过程更透明
超视频时代的音视频架构建设|Science和英特尔联袂推出“架构师成长计划”第二季