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.

  • 相关阅读:
    Aizu 0525 Osenbei 搜索 A
    PAT 1088 三人行 模拟,坑 C
    POJ1862 Stripies 贪心 B
    ZOJ 4109 Welcome Party 并查集+优先队列+bfs
    POJ 3685 Matrix
    POJ 3579 Median 二分加判断
    Educational Codeforces Round 63 D. Beautiful Array
    Codeforces Round #553 (Div. 2) C
    HDU 5289
    Codeforces 552 E. Two Teams
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6360343.html
Copyright © 2011-2022 走看看