<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>lbtsm 的博客</title>
    <link>https://blog.lbtsm.site/network/</link>
    <description>Recent content on lbtsm 的博客</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <copyright>
</copyright>
    <lastBuildDate>Thu, 22 Oct 2026 15:30:11 +0800</lastBuildDate>
    <atom:link href="https://blog.lbtsm.site/network/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Websocket</title>
      <link>https://blog.lbtsm.site/network/websocket/</link>
      <pubDate>Thu, 22 Oct 2026 15:30:11 +0800</pubDate>
      <guid>https://blog.lbtsm.site/network/websocket/</guid>
      <description><![CDATA[<h2 id="summary" data-numberify>Summary<a class="anchor ms-1" href="#summary"></a></h2>
<p>在实际工作中产品经理给你的 SaaS 后台提了一个需求:加一个在线客服。客户在网页右下角的聊天框里提问,客服在管理后台里回复;客服后台的右上角有个小铃铛,来了新工单就亮一个红点,这个需求你会怎么处理呢,需要用到哪些网络知识呢。</p>]]></description><enclosure url="https://blog.lbtsm.site/network/websocket/cover.png" length="1102379" type="image/png" />
    </item>
    
    <item>
      <title>负载均衡 四层 vs 七层</title>
      <link>https://blog.lbtsm.site/network/lb/</link>
      <pubDate>Mon, 19 Oct 2026 15:08:07 +0800</pubDate>
      <guid>https://blog.lbtsm.site/network/lb/</guid>
      <description><![CDATA[<h2 id="summary" data-numberify>Summary<a class="anchor ms-1" href="#summary"></a></h2>
<p>在实际工作中，一台服务器的处理能力总有上限。业务长大之后,唯一的出路是<strong>加机器</strong>——但加了机器,立刻冒出一个新问题? 用户的请求,该发给哪一台?</p>]]></description><enclosure url="https://blog.lbtsm.site/network/lb/cover.png" length="1085381" type="image/png" />
    </item>
    
    <item>
      <title>Http的演进史</title>
      <link>https://blog.lbtsm.site/network/http/</link>
      <pubDate>Wed, 14 Oct 2026 18:09:59 +0800</pubDate>
      <guid>https://blog.lbtsm.site/network/http/</guid>
      <description><![CDATA[<h2 id="summary" data-numberify>Summary<a class="anchor ms-1" href="#summary"></a></h2>
<p>前面几篇我们一直在讲&quot;<strong>怎么把一堆字节可靠地送到对面</strong>&quot;。TCP 把这件事做完了,但它送过去的只是一串没有含义的字节流，至于这些字节怎么表示,TCP 完全不关心。</p>]]></description><enclosure url="https://blog.lbtsm.site/network/http/cover.png" length="1098484" type="image/png" />
    </item>
    
    <item>
      <title>Dns</title>
      <link>https://blog.lbtsm.site/network/dns/</link>
      <pubDate>Sat, 10 Oct 2026 16:44:03 +0800</pubDate>
      <guid>https://blog.lbtsm.site/network/dns/</guid>
      <description><![CDATA[<h2 id="summary" data-numberify>Summary<a class="anchor ms-1" href="#summary"></a></h2>
<p>在网络中发送消息又一个前提:<strong>需要知道对方的 IP 地址</strong>。TCP 要 IP 才能握手,TLS 要 IP 才能连接。</p>
<p>可你在浏览器里敲的是 <code>github.com</code>,在代码里写的是 <code>https://eth-mainnet.g.alchemy.com</code>——<strong>这些名字对网络层毫无意义</strong>,IP 包的头部里只有 <code>140.82.121.4</code> 这样的数字。</p>]]></description><enclosure url="https://blog.lbtsm.site/network/dns/cover.png" length="695408" type="image/png" />
    </item>
    
    <item>
      <title>Udp</title>
      <link>https://blog.lbtsm.site/network/udp/</link>
      <pubDate>Fri, 09 Oct 2026 19:53:25 +0800</pubDate>
      <guid>https://blog.lbtsm.site/network/udp/</guid>
      <description><![CDATA[<h2 id="summary" data-numberify>Summary<a class="anchor ms-1" href="#summary"></a></h2>
<p>前面几篇,我们看着 TCP 一层层往上搭:序号、确认、重传、排序、去重、流量控制、拥塞控制。每一样都是为了同一个目标——<strong>让应用拿到一段完美的字节流</strong>。</p>]]></description><enclosure url="https://blog.lbtsm.site/network/udp/cover.png" length="1073575" type="image/png" />
    </item>
    
    <item>
      <title>TCP流量控制和拥塞控制</title>
      <link>https://blog.lbtsm.site/network/tcp/flow/</link>
      <pubDate>Wed, 07 Oct 2026 15:39:47 +0800</pubDate>
      <guid>https://blog.lbtsm.site/network/tcp/flow/</guid>
      <description><![CDATA[<h2 id="summary" data-numberify>Summary<a class="anchor ms-1" href="#summary"></a></h2>
<p>上一篇讲清了 TCP 怎么保证&quot;不丢不乱&quot;,但留了个关键的空:发送方一次能往外扔多少数据?</p>
<p>这个数字定小了,带宽白白浪费;定大了,轻则把接收方撑爆,重则把整个网络堵死。而且它还<strong>不能是个固定值</strong>——网络状况和对方的处理能力时时刻刻都在变。</p>]]></description><enclosure url="https://blog.lbtsm.site/network/tcp/flow/cover.png" length="1078989" type="image/png" />
    </item>
    
    <item>
      <title>TCP的可靠传输</title>
      <link>https://blog.lbtsm.site/network/tcp/reliable/</link>
      <pubDate>Sun, 04 Oct 2026 22:29:54 +0800</pubDate>
      <guid>https://blog.lbtsm.site/network/tcp/reliable/</guid>
      <description><![CDATA[<p>上一篇我们提到,网络层的IP协议是&quot;尽力而为&quot;的——它会丢包、乱序、重复、损坏,却什么都不保证。而你用 Go 写 <code>conn.Read</code>,拿到的却是一段<strong>完整、有序、正确</strong>的字节流。这中间的落差,全靠 TCP 的一套可靠传输机制填平。这套机制的思想(编号、确认、超时重传、去重),不只是网络知识,更是<strong>一切&quot;在不可靠信道上做可靠通信&quot;问题的通用解法</strong>——包括你以后要设计的跨链消息协议。</p>]]></description><enclosure url="https://blog.lbtsm.site/network/tcp/reliable/cover.png" length="1053055" type="image/png" />
    </item>
    
    <item>
      <title>Tcp的三次握手和四次挥手</title>
      <link>https://blog.lbtsm.site/network/tcp/hanndshake/</link>
      <pubDate>Sun, 04 Oct 2026 20:58:15 +0800</pubDate>
      <guid>https://blog.lbtsm.site/network/tcp/hanndshake/</guid>
      <description><![CDATA[<h2 id="tcp-的连接到底是什么" data-numberify>TCP 的"连接"到底是什么<a class="anchor ms-1" href="#tcp-的连接到底是什么"></a></h2>
<p>物理世界里并没有一根线真的从你连到服务器,数据包依然是一个个独立地在互联网上乱窜、走不同的路线。<strong>所谓&quot;连接&quot;,纯粹是通信双方各自在内存里记的一本账。</strong></p>]]></description><enclosure url="https://blog.lbtsm.site/network/tcp/hanndshake/cover.png" length="626992" type="image/png" />
    </item>
    
    <item>
      <title>TCP/IP分层模型</title>
      <link>https://blog.lbtsm.site/network/tcplayer/</link>
      <pubDate>Sun, 04 Oct 2026 12:27:56 +0800</pubDate>
      <guid>https://blog.lbtsm.site/network/tcplayer/</guid>
      <description><![CDATA[<h2 id="当我们打开一个网页浏览器到底经历了什么" data-numberify>当我们打开一个网页，浏览器到底经历了什么<a class="anchor ms-1" href="#当我们打开一个网页浏览器到底经历了什么"></a></h2>
<p>首先我们看一次完整的网络请求(经典面试题):</p>
<ol>
<li><strong>DNS 解析(应用层)</strong>:浏览器要访问 <code>example.com</code>,先问 DNS:&ldquo;它的 IP 是多少?&rdquo; DNS 返回如 <code>93.184.216.34</code>。(DNS 查询本身通常走 UDP。)</li>
<li><strong>建立 TCP 连接(传输层)</strong>:浏览器和服务器的 443 端口做 <strong>TCP 三次握手</strong>,建立可靠连接。</li>
<li><strong>TLS 握手(应用层/安全)</strong>:HTTPS 还要再做 TLS 握手,协商加密密钥(后面 TLS 篇细讲)。</li>
<li><strong>发送 HTTP 请求(应用层)</strong>:浏览器构造 HTTP 请求报文,交给 TCP。</li>
<li><strong>一路封装下行</strong>:HTTP 报文 → 加 TCP 头 → 加 IP 头 → 加以太网帧头 → 变比特流,从网卡发出。</li>
<li><strong>跨互联网路由(网络层)</strong>:数据包经过家里的路由器、运营商、一个个骨干路由器接力转发,每一跳链路层的 MAC 地址都在变(下一跳变了),但 IP 头里的<strong>最终目标 IP 始终不变</strong>——这是网络层和链路层分工的绝佳体现。</li>
<li><strong>服务器解封装上行</strong>:服务器网卡收到比特流 → 链路层拆帧 → 网络层确认目标 IP 是自己 → 传输层按端口 443 交给 web 服务 → 应用层拿到 HTTP 请求。</li>
<li><strong>响应原路返回</strong>,浏览器渲染页面。</li>
</ol>
<p>当我们在浏览器敲一个网址、Web 服务收到一个请求、区块链节点之间同步一个区块——这些看起来完全不同的事,底层走的是<strong>同一套分层协议</strong>。理解&quot;数据是怎么一层层被包起来、发出去、再一层层拆开&quot;的,是理解一切网络问题(为什么慢、为什么断、为什么要握手)的前提。今天我们要理解的是网络分层。</p>]]></description><enclosure url="https://blog.lbtsm.site/network/tcplayer/cover.png" length="1053647" type="image/png" />
    </item>
    
    <item>
      <title>网络基础设施</title>
      <link>https://blog.lbtsm.site/network/basic/</link>
      <pubDate>Fri, 02 Oct 2026 14:48:56 +0800</pubDate>
      <guid>https://blog.lbtsm.site/network/basic/</guid>
      <description><![CDATA[<h2 id="summary" data-numberify>Summary<a class="anchor ms-1" href="#summary"></a></h2>
<p>说到网络，大家第一个想到的都是TCP、IP协议这些的，很容易忽略网络的硬件设施，我们这一篇主要讲网络的硬件基础设施。</p>

<h2 id="一个前提互联网是分组交换的" data-numberify>一个前提:互联网是"分组交换"的<a class="anchor ms-1" href="#一个前提互联网是分组交换的"></a></h2>
<p>在讲设备之前,先建立一个总观念。这两种方式的差别,用<strong>包车 vs 拼车</strong>一比就清楚了。</p>]]></description><enclosure url="https://blog.lbtsm.site/network/basic/cover.png" length="1044567" type="image/png" />
    </item>
    
  </channel>
</rss>

