-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
139 lines (69 loc) · 16.1 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Hexo</title>
<link href="https://errocks.github.io/atom.xml" rel="self"/>
<link href="https://errocks.github.io/"/>
<updated>2023-03-03T10:00:44.484Z</updated>
<id>https://errocks.github.io/</id>
<author>
<name>John Doe</name>
</author>
<generator uri="https://hexo.io/">Hexo</generator>
<entry>
<title>test blog2233</title>
<link href="https://errocks.github.io/2022/11/09/yuque/test%20blog223/"/>
<id>https://errocks.github.io/2022/11/09/yuque/test%20blog223/</id>
<published>2022-11-08T16:43:30.000Z</published>
<updated>2023-03-03T10:00:44.484Z</updated>
<content type="html"><![CDATA[<p><img src="https://cdn.nlark.com/yuque/0/2022/jpeg/545431/1668145187458-a888af15-865a-4fae-b11f-85c2d8d8b89c.jpeg"><br><img src="https://cdn.nlark.com/yuque/0/2022/jpeg/545431/1668145678088-09a169a7-c77f-4f66-9e48-ec95000c4e89.jpeg"><br><img src="https://cdn.nlark.com/yuque/0/2022/jpeg/545431/1668045253759-e0ce49e6-3205-4387-b581-6a87e4168a35.jpeg"></p>]]></content>
<summary type="html"><p><img src="https://cdn.nlark.com/yuque/0/2022/jpeg/545431/1668145187458-a888af15-865a-4fae-b11f-85c2d8d8b89c.jpeg"><br><img src="https://c</summary>
<category term="分类3" scheme="https://errocks.github.io/categories/%E5%88%86%E7%B1%BB3/"/>
<category term="232" scheme="https://errocks.github.io/tags/232/"/>
</entry>
<entry>
<title>test blog</title>
<link href="https://errocks.github.io/2022/11/08/yuque/test%20blog/"/>
<id>https://errocks.github.io/2022/11/08/yuque/test%20blog/</id>
<published>2022-11-07T16:43:30.000Z</published>
<updated>2022-11-07T16:57:43.055Z</updated>
<content type="html"><![CDATA[<p><img src="https://cdn.nlark.com/yuque/0/2022/png/545431/1667840257001-3229199f-4f6a-4ae5-9208-6148421ada7f.png#averageHue=%23fafafa&clientId=u6cd62893-b331-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=114&id=u35342abe&margin=%5Bobject%20Object%5D&name=image.png&originHeight=228&originWidth=592&originalType=binary%E2%88%B6=1&rotation=0&showTitle=false&size=22856&status=done&style=none&taskId=ubf02a705-660f-4937-9346-2dae34db498&title=&width=296" alt="image.png"></p>]]></content>
<summary type="html"><p><img src="https://cdn.nlark.com/yuque/0/2022/png/545431/1667840257001-3229199f-4f6a-4ae5-9208-6148421ada7f.png#averageHue=%23fafafa&clien</summary>
</entry>
<entry>
<title>Hello World2323</title>
<link href="https://errocks.github.io/2022/08/09/hello-world2/"/>
<id>https://errocks.github.io/2022/08/09/hello-world2/</id>
<published>2022-08-09T07:12:13.883Z</published>
<updated>2022-08-09T07:12:44.812Z</updated>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p><h3 id="Deploy-to-remote-sites1"><a href="#Deploy-to-remote-sites1" class="headerlink" title="Deploy to remote sites1"></a>Deploy to remote sites1</h3>]]></content>
<summary type="html"><p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for</summary>
<category term="文章分类" scheme="https://errocks.github.io/categories/%E6%96%87%E7%AB%A0%E5%88%86%E7%B1%BB/"/>
<category term="hello" scheme="https://errocks.github.io/tags/hello/"/>
</entry>
<entry>
<title>Hello World</title>
<link href="https://errocks.github.io/2022/08/09/hello-world/"/>
<id>https://errocks.github.io/2022/08/09/hello-world/</id>
<published>2022-08-09T01:25:24.102Z</published>
<updated>2022-11-07T15:55:01.508Z</updated>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p><h3 id="Deploy-to-remote-sites1"><a href="#Deploy-to-remote-sites1" class="headerlink" title="Deploy to remote sites1"></a>Deploy to remote sites1</h3>]]></content>
<summary type="html"><p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for</summary>
<category term="文章分类1" scheme="https://errocks.github.io/categories/%E6%96%87%E7%AB%A0%E5%88%86%E7%B1%BB1/"/>
<category term="hello" scheme="https://errocks.github.io/tags/hello/"/>
</entry>
<entry>
<title>网络问题总结</title>
<link href="https://errocks.github.io/2022/08/08/%E7%BD%91%E7%BB%9C%E9%97%AE%E9%A2%98%E6%80%BB%E7%BB%93/"/>
<id>https://errocks.github.io/2022/08/08/%E7%BD%91%E7%BB%9C%E9%97%AE%E9%A2%98%E6%80%BB%E7%BB%93/</id>
<published>2022-08-08T15:53:58.517Z</published>
<updated>2022-08-09T08:28:46.265Z</updated>
<content type="html"><![CDATA[<h2 id="运输层"><a href="#运输层" class="headerlink" title="运输层"></a>运输层</h2><p>运输层主要是UDP、TCP相关的问题。</p><ul><li><p>为什么需要三次握手</p><blockquote><p>tcp连接的双方要确保各自的收发消息的能力都是正常的。 客户端第一次发送握手消息到服务端, 服务端接收到握手消息后把ack和自己的syn一同发送给客户端,这是第二次握手, 当客户端接收到服务端发送来的第二次握手消息后,客户端可以确认“服务端的收发能力OK,客户端的收发能力OK”,但是服务端只能确认“客户端的发送OK,服务端的接收OK”, 所以还需要第三次握手,客户端收到服务端的第二次握手消息后,发起第三次握手消息,服务端收到客户端发送的第三次握手消息后,就能够确定“服务端的发送OK,客户端的接收OK”, 至此,客户端和服务端都能够确认自己和对方的收发能力OK,,tcp连接建立完成。</p></blockquote></li><li><p>什么是TIME_WAIT </p><blockquote><p><img src="https://cdn.nlark.com/yuque/0/2022/png/545431/1652530678440-1dda5193-fb5d-4c13-bd2f-4b7340437395.png#clientId=u7140745c-d3a4-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=368&id=ud5fb29e1&margin=%5Bobject%20Object%5D&name=image.png&originHeight=736&originWidth=1088&originalType=binary&ratio=1&rotation=0&showTitle=false&size=187259&status=done&style=none&taskId=uaf3f6bdf-6aab-4484-93f3-2186a7eda89&title=&width=544" alt="image.png"><br>主动发起关闭放, 收到对方的FIN-n的时候就会进入TIME_WAIT, 等待2MSL 时间(60秒) 就会关闭连接</p></blockquote></li><li><p>为什么要有TIME_WAIT?</p><blockquote><p>为了网络传输的可靠性->容错性<br>如果主机 1 没有维护 TIME_WAIT 状态,而直接进入 CLOSED 状态,它就失去了当前状态的上下文,只能回复一个 RST 操作,从而导致被动关闭方出现错误。<br>可能还有数据没发完<br>第二个理由和连接“化身”和报文迷走有关系,为了让旧连接的重复分节在网络中自然消失。我们知道,在网络中,经常会发生报文经过一段时间才能到达目的地的情况,产生的原因是多种多样的,如路由器重启,链路突然出现故障等。如果迷走报文到达时,发现 TCP 连接四元组(源 IP,源端口,目的 IP,目的端口)所代表的连接不复存在,那么很简单,这个报文自然丢弃。我们考虑这样一个场景,在原连接中断后,又重新创建了一个原连接的“化身”,说是化身其实是因为这个连接和原先的连接四元组完全相同,如果迷失报文经过一段时间也到达,那么这个报文会被误认为是连接“化身”的一个 TCP 分节,这样就会对 TCP 通信产生影响。</p></blockquote></li><li><p>出现大量TIME_WAIT的原因</p><blockquote><p>同时大量关闭连接<br>大量TIME_WAIT可能导致以下的问题</p><ol><li>是内存占用</li><li>端口资源占用</li></ol></blockquote></li><li><p>TCP协议如何提高传输效率</p><blockquote><ol><li>发送窗口</li><li>糊涂窗口问题</li></ol></blockquote><p>需要在自己的缓冲区大到一个合理的值之后,再向发送端发送窗口更新通知。这个合理的值,由对应的 RFC 规范定义</p><blockquote><ol start="3"><li>在发送端进行优化。这个优化的算法叫做** Nagle 算法**,Nagle 算法的本质其实就是限制大批量的小数据包同时发送,为此,它提出,在任何一个时刻,未被确认的小数据包不能超过一个。这里的小数据包,指的是长度小于最大报文段长度 MSS 的 TCP 分组。这样,发送端就可以把接下来连续的几个小数据包存储起来,等待接收到前一个小数据包的 ACK 分组之后,再将数据一次性发送出去。</li><li>在接收端进行优化,这个优化的算法叫做<strong>延时 ACK</strong>。延时 ACK 在收到数据后并不马上回复,而是累计需要发送的 ACK 报文,等到有数据需要发送给对端时,将累计的 ACK捎带一并发送出去。当然,延时 ACK 机制,不能无限地延时下去,否则发送端误认为数据包没有发送成功,引起重传,反而会占用额外的网络带宽</li><li></li></ol></blockquote></li><li><p>为什么断连要四次?</p><blockquote><p>不一定四次, 有可能第二第三次会合并, 要确认双方的可靠传输, 可靠传输 , 其中包括不影响原有的业务, 客户端, 服务端都需要一来一回的确认收发没问题, 才关闭</p></blockquote></li><li></li><li><p>TCP协议切片</p></li><li><p>流量控制机制</p><blockquote><p>发送窗口反应了作为单 TCP 连接、点对点之间的流量控制模型,它是需要和接收端一起共同协调来调整大小的;而拥塞窗口则是反应了作为多个 TCP 连接共享带宽的拥塞控制模型,它是发送端独立地根据网络状况来动态调整的<br>在任何一个时刻,TCP 发送缓冲区的数据是否能真正发送出去,至少取决于两个因素,一个是当前的发送窗口大小,另一个是拥塞窗口大小,而 TCP 协议中总是取两者中最小值作为判断依据</p></blockquote></li><li><p>滑动窗口为0时怎么办?</p><blockquote><p>如果在PT超时之前没有接收到B window更新,则定时器触发,动作为<br>1)发送一个byte 合法数据(滑动窗口内)或非法数据(滑动窗口外)<br>2)刷新定时器<br>3)记录超时次数<br>如果超时次数到达极限,则事件触发,动作为<br>1)reset 或关闭TCP连接<br>2)通知应用层出错原因</p></blockquote></li><li><p>TCP首部结构 </p></li><li><p>TCP怎么保证可靠性?(控制包大小、包序号、校验和、接收端丢弃重复数据、流量控制、拥塞控制、ARQ协议、超时重传)</p></li><li><p>seq为何要各自保存?ack的计算方法?</p></li><li><p>第三次握手失败了怎么办?</p></li><li><p>UDP和TCP的区别</p></li><li><p>如何改造UDP,确保数据有序?</p></li><li><p>什么是多路复用?</p></li><li></li></ul><p>极客时间</p><ul><li>一段数据流从客户端到服务端, 总共拷贝了多少次?</li></ul><p>如果是mmp, 0拷贝, 应该是1次? 内核到发送缓冲区, 包括服务端就2次</p><ul><li>socket的缓冲区能否搞的很大? 增加程序的吞吐量</li></ul>]]></content>
<summary type="html"><h2 id="运输层"><a href="#运输层" class="headerlink" title="运输层"></a>运输层</h2><p>运输层主要是UDP、TCP相关的问题。</p>
<ul>
<li><p>为什么需要三次握手</p>
<blockquote>
<p></summary>
<category term="文章分类" scheme="https://errocks.github.io/categories/%E6%96%87%E7%AB%A0%E5%88%86%E7%B1%BB/"/>
<category term="hello" scheme="https://errocks.github.io/tags/hello/"/>
</entry>
</feed>