可靠 UDP 的失败场景?

发布于 2024-08-12 09:50:43 字数 194 浏览 7 评论 0原文

测试可靠 UDP 层的失败场景的最佳列表是什么?我想到了以下情况:

  • 丢弃数据包
  • 丢弃 ACK、NAK 数据包
  • 乱序发送数据包。
  • 丢弃初始握手数据包
  • 丢弃关闭/关闭数据包
  • 重复数据包

请帮助确定可靠 UDP 需要处理的其他情况?

What could be good list of failure scenaros for testing a reliable UDP layer? I have thought of the below cases:

  • Drop Data packets
  • Drop ACK, NAK Packets
  • Send packets in out of sequence.
  • Drop intial hand shaking packets
  • Drop close / shutdown packets
  • Duplicate packets

Please help in identifying other cases that reliable UDP needs to handle?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

生生不灭 2024-08-19 09:50:43

你给出的清单听起来不错。还要考虑:

  • 非常延迟的数据包(大多数数据包都可以顺利通过,但一两个数据包会延迟几分钟);
  • 副本非常延迟(原件很快就通过了,但副本在延迟了几分钟后才到达);
  • 静默丢弃超过一定大小的所有数据包(单向和双向情况);
  • 高度可变的延迟;
  • 序列号包装测试。

The list you've given sounds pretty good. Also think about:

  • Very delayed packets (where most packets come through fine, but one or two are delayed by several minutes);
  • Very delayed duplicates (where the original came through quickly, but the duplicate arrived after several minutes delay);
  • Silent dropping of all packets above a certain size (both unidirectional and bidirectional cases);
  • Highly variable delays;
  • Sequence number wrapping tests.
盗梦空间 2024-08-19 09:50:43

您是否尝试过故意破坏传输中的数据包?

另外,您是否考虑过一种只能进行单向通信的场景?在这种情况下,发送主机认为发送失败,但接收端成功处理了消息。例如:

  1. 主机A向主机B发送消息
  2. B成功接收消息并回复ACK
  3. ACK在网络
  4. A 中被丢弃等待超时并重新发送消息(重复步骤1-3)
  5. 主机A超过重试次数并认为发送失败,但主机B实际上已发送处理了消息

Have you tried intentionally corrupting packets in transit?

Also, have you considered a scenario where only one-way communication is possible? In this case, the sending host thinks that the send failed, but the receiving end successfully processes the message. For instance:

  1. host A sends a message to host B
  2. B successfully receives message and replies with ACK
  3. ACK gets dropped in the network
  4. A waits for timeout and re-sends message (repeats steps 1-3)
  5. host A exceeds retry count and thinks the send failed, but host B has in fact processed the message
捎一片雪花 2024-08-19 09:50:43

我认为 UDP 是一种无连接且不可靠的协议,不需要主机之间的特定传输握手。因此,不存在可靠的 UDP 协议。

I have thought UDP is a connectionless and unreliable protocol and that is does not require and specific transport handshake between hosts. And hence there is no such thing as a reliable UDP protocol.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文