<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Cà Phê &amp; Code — Mạng</title>
    <link>https://coffeecode.vn/categories/mang-2</link>
    <description>Cà Phê &amp; Code là blog dành cho những người yêu công nghệ và lập trình. Nơi chia sẻ kiến thức coding, công cụ hữu ích, xu hướng công nghệ, kinh nghiệm phát triển phần mềm và những câu chuyện phía sau màn hình — tất cả được kể theo cách gần gũi, dễ hiểu, như một cuộc trò chuyện bên tách cà phê.</description>
    <language>vi</language>
    <atom:link href="https://coffeecode.vn/categories/mang-2/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>HTTP/3 QUIC</title>
      <link>https://coffeecode.vn/posts/http3-quic</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/http3-quic</guid>
      <description>Tôi định đo HTTP/3 bắt tay nhanh hơn và chịu mất gói tốt hơn HTTP/2 — nhưng phép đo cho kết quả ngược, vì QUIC thuần Python không thể đua với TCP của nhân.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Chuyển hướng</title>
      <link>https://coffeecode.vn/posts/chuyen-huong</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/chuyen-huong</guid>
      <description>Mỗi 301/302 thêm một vòng khứ hồi (~60 ms) khi dùng lại kết nối, nhưng ~2 vòng nếu đổi host. 301 được cache nên lần sau miễn phí; 302 thì không. Đo thật.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Range request</title>
      <link>https://coffeecode.vn/posts/range-request</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/range-request</guid>
      <description>Xin bytes=30000- để tiếp tục tải dở chỉ lấy về 70 KB còn lại thay vì cả 100 KB; xin một khúc giữa chỉ lấy 100 byte. Đo thật, kèm cái bẫy off-by-one.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Proxy ngược</title>
      <link>https://coffeecode.vn/posts/proxy-nguoc</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/proxy-nguoc</guid>
      <description>Một lớp proxy ngược thêm bao nhiêu độ trễ? Cùng máy với backend thì gần như 0; khác máy thì thêm đúng một vòng khứ hồi giữa chúng. Đo thật bằng nginx.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Cookie theo request</title>
      <link>https://coffeecode.vn/posts/cookie-theo-request</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/cookie-theo-request</guid>
      <description>Một kho cookie 147 byte được kèm vào MỌI request tới miền — kể cả ảnh và CSS không dùng nó. Một trang 30 request tải lên ~4,4 KB chỉ riêng cookie. Đo thật.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>gRPC trên HTTP/2</title>
      <link>https://coffeecode.vn/posts/grpc-http2</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/grpc-http2</guid>
      <description>Cùng một bản ghi, protobuf nhỏ hơn JSON ~2 lần và mã hóa nhanh hơn 7 lần — nhưng không phải &apos;nhỏ hơn chục lần&apos; như đồn, và gzip còn làm phình payload nhỏ. Đo thật.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Nén HTTP</title>
      <link>https://coffeecode.vn/posts/nen-http</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/nen-http</guid>
      <description>gzip giảm một JSON 20 KB còn 2,3 KB (88%); Brotli còn 1 KB (95%) — nhưng nén dữ liệu ngẫu nhiên hay tí xíu chỉ làm PHÌNH thêm. Đo thật gzip vs Brotli.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Bộ nhớ đệm HTTP</title>
      <link>https://coffeecode.vn/posts/bo-nho-dem-http</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/bo-nho-dem-http</guid>
      <description>Một revalidate với ETag khớp trả về 304 không kèm thân — 56 KB co xuống 152 byte. Nhưng ETag tính sai (đổi mỗi lần) biến 304 thành 200. Đo thật.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>HTTP/2 ghép luồng</title>
      <link>https://coffeecode.vn/posts/http2-ghep-luong</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/http2-ghep-luong</guid>
      <description>20 request qua HTTP/2 trên MỘT kết nối xong trong 249 ms; HTTP/1.1 sáu kết nối mất 823 ms, một kết nối nối đuôi mất 3396 ms. Đo thật, kèm một giả thuyết sai.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>HTTP/2 server push</title>
      <link>https://coffeecode.vn/posts/http2-server-push</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/http2-server-push</guid>
      <description>Push né được một vòng khứ hồi cho khách mới, nhưng với khách quay lại đã cache CSS, nó gửi lại nguyên 33 KB để tiết kiệm vài ms. Đo cả lợi lẫn hại.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Nagle và ACK trễ</title>
      <link>https://coffeecode.vn/posts/nagle-va-ack-tre</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/nagle-va-ack-tre</guid>
      <description>Một vòng request/response lẽ ra vài chục micro giây có thể kẹt đúng 40 ms vì Nagle và delayed ACK chờ nhau. Đo thật, và cách nó ẩn hiện.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Trạng thái TIME_WAIT</title>
      <link>https://coffeecode.vn/posts/trang-thai-time-wait</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/trang-thai-time-wait</guid>
      <description>Bên đóng kết nối trước phải nằm TIME_WAIT đúng 60 giây trên Linux — và tcp_fin_timeout KHÔNG chỉnh được con số đó. Đo thật ai gánh, bao lâu.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Keepalive TCP</title>
      <link>https://coffeecode.vn/posts/keepalive-tcp</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/keepalive-tcp</guid>
      <description>Một kết nối có đầu kia biến mất im lặng: mặc định TCP mất hơn 2 giờ mới phát hiện. Bật keepalive tuỳ chỉnh thì xuống vài giây — đo thật công thức IDLE + CNT×INTVL.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Phân giải DNS</title>
      <link>https://coffeecode.vn/posts/phan-giai-dns</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/phan-giai-dns</guid>
      <description>Một getaddrinfo gửi HAI truy vấn (A và AAAA) và chờ cả hai; nếu AAAA bị bỏ rơi, lookup stall ~6 giây dù IPv4 sẵn ngay. Đo thật, kèm chuyện OS không cache DNS.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>TTL của DNS</title>
      <link>https://coffeecode.vn/posts/ttl-cua-dns</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/ttl-cua-dns</guid>
      <description>Một bản ghi DNS được đệm đúng bằng TTL giây rồi mới hỏi lại nguồn — và đổi bản ghi ở nguồn chỉ có hiệu lực sau khi bản sao đệm hết hạn. Đo thật từng giây.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>DNS đệ quy</title>
      <link>https://coffeecode.vn/posts/dns-de-quy</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/dns-de-quy</guid>
      <description>Một tra cứu nguội đi ba vòng — root, TLD, thẩm quyền — mỗi vòng một khứ hồi; đệm chuỗi ủy quyền để tên kế cùng đuôi chỉ còn 2 vòng. Đo thật bằng cây DNS tự dựng.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>HTTP một request</title>
      <link>https://coffeecode.vn/posts/http-mot-request</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/http-mot-request</guid>
      <description>Một GET trên kết nối mới tốn 2 vòng khứ hồi (bắt tay + trao đổi), tái dùng còn 1; và với thân 40 byte, header chiếm ~78% response. Đo thật bằng tcpdump.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Keep-alive HTTP</title>
      <link>https://coffeecode.vn/posts/keep-alive-http</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/keep-alive-http</guid>
      <description>Tái dùng một kết nối cho 20 request nhanh gấp đôi trên đường RTT ~55 ms (2360 ms xuống 1195 ms) — nhưng trên localhost thì gần như vô hình. Đo thật.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Chunked transfer</title>
      <link>https://coffeecode.vn/posts/chunked-transfer</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/chunked-transfer</guid>
      <description>Với nội dung sinh dần, Content-Length buộc buffer hết (~530 ms mới có byte đầu) còn chunked stream từng khối (~105 ms) — nhanh gấp 5 lần. Đo thật.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
    <item>
      <title>Trễ đuôi p99</title>
      <link>https://coffeecode.vn/posts/tre-duoi-p99</link>
      <guid isPermaLink="true">https://coffeecode.vn/posts/tre-duoi-p99</guid>
      <description>Thêm 1% mất gói: p50 vẫn 28ms y như cũ, nhưng p99 nhảy từ 32ms lên 264ms. Mất gói không kéo trung vị — nó dựng một vách đứng ở cái đuôi. Đo thật bằng netem.</description>
      <pubDate>Thu, 3 Sep 2026 00:00:00 +0700</pubDate>
      <category>Mạng</category>
    </item>
  </channel>
</rss>
