[summ] IETF文档之MPTCP应用:MPTCP Application Interface Considerations (draft-ietf-mptcp-api-05)_Apr.2012

背景:

早在2007年,IETF推出Streaming Control Transmission Protocol (SCTP), Stewart, R., Stream Control Transmission Protocol, RFC 4960, September 2007. SCTP主要特色是提供 多路径通信(concurrent multipath transfer). 然而SCTP有2个主要缺点: 1) 开发者需要修改application层 2) 当今因特网架构中的middlebox比如Network Address Translator (NAT) 或 防火墙会阻止SCTP包。这些middlebox对TCP包是开放通行的。基于这点,IETF于2011年推出draft文档,Multipath TCP-基于传统TCP协议提供多路径通信。


MPTCP performance analysis

Throughput

The multipath capability of MPTCP provides greater bandwidth for applications in comparison with regular single-path TCP. If there is a shared bottleneck between the flows, the congestion control algorithms will ensure that load is evenly distributed among regular and multipath TCP sessions, so that there is no worse performance than if all end users were using single-path TCP.

Notices:

1) MPTCP can add and remove subflows as paths change, leading to variability of connection bandwidth.Applications that adapt to available bandwidth (e.g. video/audio streaming that adapt codecs based on bw) might need to take this into account.

2) MPTCP signalling information introduces a small overhead. When multiple subflows share a same bottleneck, this overhead slightly reduces network capacity. Yet, the influences are generally negligible in many usage scenarios.

Delay

If the delays experienced by each subflow of an MPTCP connection differ, the jitter of an application may appear higher. This is as the data is distributed across the subflows.

Notices:

1) Applications running over MPTCP must be able to cope with burstier data than may be usual with single-path TCP.

2) Applications that estimates RTT at the application level might get impacted due to multiple subflows.

Resilience

MPTCP provides better resilience:

1) if one flow fails, all traffic will move to other subflows.

2) make-before-break and break-before-make handovers between subflows

Network Stack

                      |           Application         |
                      +-------------------------------+
                           ^                             |
     ~~~~~~~~~~|Socket Interface |~~~~~~~~
                           |                              v
                     +-------------------------------+
                     |             MPTCP             |
                     + - - - - - - - + - - - - - - - +
                     | Subflow (TCP) | Subflow (TCP) |
                     +-------------------------------+
                        |       IP      |      IP       |
                     +-------------------------------+
                     Figure 1: MPTCP protocol stack

There are two types of applications:

1) Legacy apps (Default case), that are unaware of MPTCP and use existing API towards TCP without any changes. 

2) MPTCP-aware apps

MPTCP Usage Scenarios and Applications Requirements

1) High Bandwidth. High throughput-oriented bulk data transfer. It is highly possible that the total bandwidth required is less than that available on an individual path, therefore, it is beneficial to spread the overall load.

2) Low latency and jitter stability. Always use the lowest latency subflow to transmit highly interactive traffic. The challenge is that, the delay on a path may fluctuate significantly and such strategy might result in instability.

3) High reliability. Duplicate data over different subflows

可以使用`tf.summary.create_file_writer()`和`tf.summary.scalar()`函数重写这段代码。下面是重写后的代码: ```python import tensorflow as tf def create_summary_op(ph_summary): with tf.name_scope('summary'): summary_loss = [] for ph in ph_summary: summary_loss.append(tf.summary.scalar(ph.name, ph)) merged_summ = tf.summary.merge(summary_loss) return merged_summ # 创建一个FileWriter对象,用于将摘要数据写入事件文件 writer = tf.summary.create_file_writer('logs/') # 定义一些placeholder,用于记录标量数据 ph1 = tf.placeholder(tf.float32, name='ph1') ph2 = tf.placeholder(tf.float32, name='ph2') # 定义一个需要合并的摘要数据列表 ph_summary = [ph1, ph2] # 创建一个合并摘要数据的操作 merged_summ_op = create_summary_op(ph_summary) # 将摘要数据写入事件文件 with writer.as_default(): sess = tf.Session() sess.run(tf.global_variables_initializer()) for i in range(10): # 随机生成一些数据,用于记录到摘要数据中 data1 = i data2 = i * 2 # 运行合并摘要数据的操作,并将记录的步数传递给摘要数据 merged_summ = sess.run(merged_summ_op, feed_dict={ph1: data1, ph2: data2}) writer.add_summary(merged_summ, i) # 启动TensorBoard %tensorboard --logdir logs/ ``` 在这个例子中,我们首先定义了一些placeholder,用于记录标量数据。然后定义了一个需要合并的摘要数据列表,调用`create_summary_op()`函数创建一个合并摘要数据的操作。在将摘要数据写入事件文件时,我们使用`tf.summary.create_file_writer()`函数创建一个FileWriter对象,并使用`with writer.as_default():`语句将其设置为默认的写入器。然后创建一个会话,随机生成一些数据,并运行合并摘要数据的操作,将记录的摘要数据写入事件文件。最后启动TensorBoard,查看记录的摘要数据。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值