zoukankan      html  css  js  c++  java
  • TCP implements its own acknowledgment scheme to guarantee successful data delivery

    wTCP本身已经确保传输的成功性。

    HTTP The Definitive Guide

    4.2.4 Delayed Acknowledgments
    Because the Internet itself does not guarantee reliable packet delivery (Internet routers are free to
    destroy packets at will if they are overloaded), TCP implements its own acknowledgment scheme to
    guarantee successful data delivery.
    Each TCP segment gets a sequence number and a data-integrity checksum. The receiver of each
    segment returns small acknowledgment packets back to the sender when segments have been received
    intact. If a sender does not receive an acknowledgment within a specified window of time, the sender
    concludes the packet was destroyed or corrupted and resends the data.

    Because acknowledgments are small, TCP allows them to "piggyback" on outgoing data packets
    heading in the same direction. By combining returning acknowledgments with outgoing data packets,
    TCP can make more efficient use of the network. To increase the chances that an acknowledgment
    will find a data packet headed in the same direction, many TCP stacks implement a "delayed
    acknowledgment" algorithm. Delayed acknowledgments hold outgoing acknowledgments in a buffer
    for a certain window of time (usually 100-200 milliseconds), looking for an outgoing data packet on
    which to piggyback. If no outgoing data packet arrives in that time, the acknowledgment is sent in its
    own packet.
    Unfortunately, the bimodal request-reply behavior of HTTP reduces the chances that piggybacking
    can occur. There just aren't many packets heading in the reverse direction when you want them.
    Frequently, the disabled acknowledgment algorithms introduce significant delays. Depending on your
    operating system, you may be able to adjust or disable the delayed acknowledgment algorithm.
    Before you modify any parameters of your TCP stack, be sure you know what you are doing.
    Algorithms inside TCP were introduced to protect the Internet from poorly designed applications. If
    you modify any TCP configurations, be absolutely sure your application will not create the problems
    the algorithms were designed to avoid.

  • 相关阅读:
    如何关闭内存自动释放池ARC
    你怀疑过“温水煮青蛙”的故事吗
    程序员应该加入的3个QQ群
    简述Oracle 11g 新特性
    ViewState、UpdatePanel及控件OnPre之间的纠葛
    今天,我看到一组图解释“ 什么是博士?”
    Java将何去何从
    给新手朋友 推荐几本书(从C#入门到SQL及设计模式)
    最新版 智能电脑键盘屏幕全记录 免费下载
    C#中两个问号和一个问号
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6360343.html
Copyright © 2011-2022 走看看