当前位置:网站首页>Neutral energy optimization of transport layer triple handshake
Neutral energy optimization of transport layer triple handshake
2022-07-18 21:56:00 【Zhang quandan, Foxconn quality inspector】
Example of the server three-time handshake process
After understanding the state changes in the three handshakes , We can further explore some characteristics of the client and server in the implementation . In this way, we can know how to optimize the performance , And some security attacks in the handshake .

First, take the server as an example , Let's take a look at the process of three handshakes .
First, the client sends syn The packet arrived at the server , Server kernel , That is to say tcp The implementation of the , Will syn Group inserted into syn In the opposite column , At the same time syn+ack, At this time, the connection status is syn-received The state of , When will it come from syn-received The status changes to establish The state of ? It will send again on the client ack After grouping, you will enter establish Status quo .
But in fact, the operating system kernel will syn from syn Move out of the queue , Insert again accept queue , So our application nginx tomcat Calling accept The method is from accept The queue will take out the previous connection to the relevant methods to use .
So you can see this in the process syn Queue length and accept The queue length is related to our load .
If you are facing a machine with a high load of hundreds of thousands of requests per second , So right. syn Queue and accept The queue also needs to be extended .

Timeout and buffer queue
How is it right syn accept The queue will be extended ?
Client optimization
Fast Open Reduce delay
Is there room for further optimization in the three handshakes ?
For example, launch http get Request , It takes three handshakes , issue syn Receive a syn+ack, next ack One of them http get request , There are actually two rtt Time for .
tcp A name is provided fast open The function of , What is it doing ? The first time to establish a connection ,server Will generate a cookie, Sending syn+sck When , take cookie Gave us client,client Will cache this cookie, So the first time you initiate a connection, you still need to provide two rtt Only then get Request to be sent out , And receive the other party's response .
But when sending the request for the second time , We skipped three handshakes , because cookie It maintains the information related to the last connection , Like windows , Time stamp and so on tcp Option parameters for .
Direct will cooki stay syn Middle issue server, And you can put get The request is also sent to server, In this way... Is used tcp fsat open. In fact, three handshakes are eliminated rtt Delay of .

Linux Open up TCP Fast Open
net.ipv4.tcp_fastopen: System on TFO function
边栏推荐
- 浅学js中的关系运算符
- CANN体验官第五期体验纪实(上)
- 低代码平台搭建学生事务一门式管理系统解决方案
- 华为和荣耀手机升级鸿蒙系统之后与matebook无法多屏协同的问题
- Current limiting configuration of freeswitch
- No bugs.
- Istio灰度发布:部署Bookinfo微服务项目
- Case study on how low code helps the new growth of non-standard retail business
- 低代码搭建医疗企业数字化CRM案例分析
- Application of Apache abox-700 industrial computer minipicecan card in electric power inspection robot
猜你喜欢

Istio灰度发布:部署Bookinfo微服务项目

8大主流OA办公软件比拼,传统VS新秀你PICK谁?

音视频中的语音信号处理都包括哪些方向?

(笔记整理未完成)【图论:最小生成树】

淺學js中的關系運算符

数字员工未来可期?盘点RPA在八大行业领域的应用案例
![[PHP code audit] Introduction analysis of vulnerabilities in Pikachu shooting range](/img/27/cb7a97f28e92c832cd02d1810ed86c.png)
[PHP code audit] Introduction analysis of vulnerabilities in Pikachu shooting range

Everything you need to know about cognitive analysis

ES6-新增的数组方法之最常用的几种 map(),filter(),reduce(),forEach(),

Machine learning notes - data enhancement using Gan for defect detection
随机推荐
通感一体化融合架构及关键技术
Low code development builds business process management solutions
MySQL variables, process control and cursor exercises
Duplicate disk: problems when BN and dropout are used together
哪个品牌的蓝牙耳机降噪好?主动降噪耳机排行榜10强
What are the directions of voice signal processing in audio and video?
Leetcode high frequency question: three unordered arrays a, B, C with length N, find the total number of combinations of (I, J, K) with a[i] + b[j] + c[k] = 64
【图文并茂】U盘启动盘制作 U盘启动盘重装系统教程
机器学习笔记 - 基于Keras的GAN:图像去模糊的应用
Building a one-stop management system solution for student affairs on a low code platform
【黄啊码】为什么我建议您选择go,而不选择php?
降噪蓝牙耳机哪款好?性价比最高的主动降噪蓝牙耳机
NC15665 maze
[original] migration of rm500u-cn module driver
SQL notes
I rolled up a small and beautiful [markdown static blog program] at home
【微信小程序】progress(93/100)
Technology cloud report: what is the core ability to build observability?
Application of Apache E7 series industrial computer minipicecan card in meal delivery robot
conda 创建删除环境