14. Setting Ta and RTO【设置Ta和RTO】

原文链接:https://datatracker.ietf.org/doc/html/rfc8445#section-14

14. Setting Ta and RTO【设置Ta和RTO】

14.1. General【概括】

During the ICE gathering phase (Section 5.1.1) and while ICE is performing connectivity checks (Section 7), an ICE agent triggers STUN and TURN transactions.
在 ICE 收集阶段(第 5.1.1 节)和 ICE 执行连接检查(第 7 节)时,ICE 代理会触发 STUN 和 TURN 事务。

These transactions are paced at a rate indicated by Ta, and the retransmission interval for each transaction is calculated based on the retransmission timer for the STUN transactions (RTO) [RFC5389].
这些事务以 Ta 指示的速率进行调整,每个事务的重传间隔(RTO)是根据 STUN 事务 [RFC5389] 的重传计时器计算的。

This section describes how the Ta and RTO values are computed during the ICE gathering phase and while ICE is performing connectivity checks.
注意:以前,在 RFC 5245 中,为计算 Ta 和 RTO 定义了不同的公式,具体取决于 ICE 是否用于实时数据流(例如 RTP)。

NOTE: Previously, in RFC 5245, different formulas were defined for computing Ta and RTO, depending on whether or not ICE was used for a real-time data stream (e.g., RTP).
注意:以前,在 RFC 5245 中,为计算 Ta 和 RTO 定义了不同的公式,具体取决于 ICE 是否用于实时数据流(例如 RTP)。

The formulas below result in a behavior whereby an agent will send its first packet for every single connectivity check before performing a retransmit.
下面的公式导致代理将在执行重传之前为每次连接检查发送其第一个数据包的行为。

This can be seen in the formulas for the RTO (which represents the retransmit interval).
这可以在 RTO(表示重传间隔)的公式中看出。

Those formulas scale with N, the number of checks to be performed.
这些公式与要执行的检查次数 N 成比例。

As a result of this, ICE maintains a nicely constant rate, but it becomes more sensitive to packet loss.
因此,ICE 保持了一个很好的恒定速率,但它对数据包丢失变得更加敏感。

The loss of the first single packet for any connectivity check is likely to cause that pair to take a long time to be validated, and instead, a lower-priority check (but one for which there was no packet loss) is much more likely to complete first.
任何连通性检查的第一个单个数据包丢失可能会导致该对需要很长时间才能验证,相反,较低优先级的检查(但没有数据包丢失的检查)更有可能 先完成。

This results in ICE performing suboptimally, choosing lower-priority pairs over higher-priority pairs.
这导致 ICE 表现低于最优,选择较低优先级的对而不是较高优先级的对。

14.2. Ta

ICE agents SHOULD use a default Ta value, 50 ms, but MAY use another value based on the characteristics of the associated data.
ICE 代理应该使用默认的 Ta 值,50 毫秒,但可以根据相关数据的特性使用另一个值。

If an agent wants to use a Ta value other than the default value, the agent MUST indicate the proposed value to its peer during the establishment of the ICE session.
如果代理想要使用默认值以外的 Ta 值,代理必须在 ICE 会话建立期间向其对等方指示建议的值。

Both agents MUST use the higher value of the proposed values.
两个代理都必须使用建议值中的较高值。

If an agent does not propose a value, the default value is used for that agent when comparing which value is higher.
如果代理没有建议值,则在比较哪个值更高时,该代理使用默认值。

Regardless of the Ta value chosen for each agent, the combination of all transactions from all agents (if a given implementation runs several concurrent agents) MUST NOT be sent more often than once every 5 ms (as though there were one global Ta value for pacing all agents).
无论为每个代理选择的 Ta 值如何,来自所有代理的所有事务的组合(如果给定的实现运行多个并发代理)不得每 5 毫秒发送一次以上(就好像有一个全局 Ta 值用于起搏一样)所有代理)。

See Appendix B.1 for the background of using a value of 5 ms with ICE.
有关 ICE 使用 5 ms 值的背景信息,请参见附录 B.1。

NOTE: Appendix C shows examples of required bandwidth, using different Ta values.
注:附录 C 显示了使用不同 Ta 值的所需带宽示例。

14.3. RTO

During the ICE gathering phase, ICE agents SHOULD calculate the RTO value using the following formula:
在 ICE 收集阶段,ICE 代理应该使用以下公式计算 RTO 值:

RTO = MAX (500ms, Ta * (Num-Of-Cands))

Num-Of-Cands: the number of server-reflexive and relay candidates
Num-Of-Cands:server-reflexiv和relay候选的数量

For connectivity checks, agents SHOULD calculate the RTO value using the following formula:
对于连接性检查,代理应该使用以下公式计算 RTO 值:

RTO = MAX (500ms, Ta * N * (Num-Waiting + Num-In-Progress))

N: the total number of connectivity checks to be performed.
N:要执行的连接检查的总数

Num-Waiting: the number of checks in the checklist set in the Waiting state.
Num-Waiting:检查表设置为等待状态的检查次数。

Num-In-Progress: the number of checks in the checklist set in the In-Progress state.
Num-In-Progress:检查表中设置为 In-Progress 状态的检查次数。

Note that the RTO will be different for each transaction as the number of checks in the Waiting and In-Progress states change.
请注意,随着 Waiting 和 In-Progress 状态中的检查数量发生变化,每个事务的 RTO 将有所不同。

Agents MAY calculate the RTO value using other mechanisms than those described above.
代理可以使用上述以外的其他机制计算 RTO 值。

Agents MUST NOT use an RTO value smaller than 500 ms.
代理不得使用小于 500 毫秒的 RTO 值。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值