流式引入吞吐量限制Streaming Ingestion Throughput Limits

Azure 时序见解第 2 代的流数据引入限制如下所述。Azure Time Series Insights Gen2 streaming data ingress limitations are described below.


请阅读规划 Azure 时序见解第 2 代环境,获取所有限制的完整列表。Read Plan your Azure Time Series Insights Gen2 environment for a comprehensive list of all limits.

基于环境的限制Per environment limitations

一般而言,引入速率被视为与组织中的设备数、事件发出频率以及每个事件的大小因素有关:In general, ingress rates are viewed as the factor of the number of devices that are in your organization, event emission frequency, and the size of each event:

  • 设备数 × 事件发射频率 × 每个事件大小 。Number of devices × Event emission frequency × Size of each event.

默认情况下,对于每个 Azure 时序见解第 2 代环境,Azure 时序见解第 2 代可按 每秒最多 1 兆字节 (MBps) 的速率引入传入的数据。By default, Azure Time Series Insights Gen2 can ingest incoming data at a rate of up to 1 megabyte per second (MBps) per Azure Time Series Insights Gen2 environment. 存在针对单个中心分区的其他限制。There are additional limitations per hub partition.


  • 我们可按请求提供最高 2 MBps 引入速度的环境支持。Environment support for ingesting speeds up to 2 MBps can be provided by request.
  • 如果需要更高的吞吐量,请通过在 Azure 门户中提交支持票证来联系我们。Contact us if you require higher throughput by submitting a support ticket through the Azure portal.
  • 示例 1:Example 1:

    Contoso Shipping 有 100,000 台设备,每分钟发出事件三次。Contoso Shipping has 100,000 devices that emit an event three times per minute. 事件的大小为 200 字节。The size of an event is 200 bytes. 它们使用包含 4 个分区的 IoT 中心作为 Azure 时序见解第 2 代事件源。They’re using an IoT Hub with four partitions as the Azure Time Series Insights Gen2 event source.

    • 其 Azure 时序见解第 2 代环境的引入速率为:100,000 个设备 * 200 字节/事件 * (每秒 3 个事件/60) = 1 MBpsThe ingestion rate for their Azure Time Series Insights Gen2 environment would be: 100,000 devices * 200 bytes/event * (3/60 event/sec) = 1 MBps.
      • 假设分区平衡,则每个分区的引入速率为 0.25 MBps。Assuming balanced partitions, the ingestion rate per partition would be 0.25 MBps.
      • Contoso Shipping 的引入率在缩放限制范围内。Contoso Shipping's ingestion rate would be within the scale limitations.
  • 示例 2:Example 2:

    Contoso Fleet Analytics 有 10,000 台设备,它们每秒发出某个事件。Contoso Fleet Analytics has 10,000 devices that emit an event every second. 它们使用分区计数为 2 的事件中心作为 Azure 时序见解第 2 代事件源。They are using an Event Hub with a partition count of 2 as the Azure Time Series Insights Gen2 event source. 事件的大小为 200 字节。The size of an event is 200 bytes.

    • 环境引入速率为:10,000 设备 * 200 字节/事件 * 1 事件/秒 = 2 MBps。The environment ingestion rate would be: 10,000 devices * 200 bytes/event * 1 event/sec = 2 MBps.
      • 假设分区平衡,则每个分区的速率为 1 MBps。Assuming balanced partitions, their per partition rate would be 1 MBps.
      • Contoso Fleet Analytics 的引入速率超出了环境和分区限制。Contoso Fleet Analytics' ingestion rate is over the environment and partition limits. 它们可以通过 Azure 门户向 Azure 时序见解第 2 代提交一个请求,要求提高其环境的引入速率,并创建一个事件中心,提高限制中的分区数。They can submit a request to Azure Time Series Insights Gen2 through the Azure portal to increase the ingestion rate for their environment, and create an Event Hub with more partitions to be within the limits.

中心分区和每个分区的限制Hub partitions and per partition limits

规划 Azure 时序见解第 2 代环境时,必须考虑要连接到 Azure 时序见解第 2 代的事件源的配置。When planning your Azure Time Series Insights Gen2 environment, it's important to consider the configuration of the event source(s) that you'll be connecting to Azure Time Series Insights Gen2. Azure IoT 中心和事件中心都利用分区来实现事件处理的水平缩放。Both Azure IoT Hub and Event Hubs utilize partitions to enable horizontal scale for event processing.

分区是中心内保留的有序事件。A partition is an ordered sequence of events held in a hub. 分区计数是在中心创建阶段设置的,且不可更改。The partition count is set during the hub creation phase and cannot be changed.

有关事件中心分区的最佳做法,请参阅我需要多少分区?For Event Hubs partitioning best practices, review How many partitions do I need?


与 Azure 时序见解第 2 代配合使用的大多数 IoT 中心只需要 4 个分区。Most IoT Hubs used with Azure Time Series Insights Gen2 only need four partitions.

无论是为 Azure 时序见解第 2 代环境创建新的中心还是使用现有的中心,都需要计算每个分区的引入速率,以确定它是否在限制范围内。Whether you're creating a new hub for your Azure Time Series Insights Gen2 environment or using an existing one, you'll need to calculate your per partition ingestion rate to determine if it's within the limits.

在 Azure 时序见解第 2 代中,每个分区的常规限制目前为 0.5 MBpsAzure Time Series Insights Gen2 currently has a general per partition limit of 0.5 MBps.

特定于 IoT 中心的注意事项IoT Hub-specific considerations

在 IoT 中心内创建设备时,会将该设备永久分配到某个分区。When a device is created in IoT Hub, it's permanently assigned to a partition. 这样,IoT 中心就可以保证事件的排序(因为分配永远不会更改)。In doing so, IoT Hub is able to guarantee event ordering (since the assignment never changes).

固定的分区分配也会影响引入下游 IoT 中心发送的数据的 Azure 时序见解第 2 代实例。A fixed partition assignment also impacts Azure Time Series Insights Gen2 instances that are ingesting data sent from IoT Hub downstream. 使用相同的网关设备 ID 将来自多个设备的消息转发到中心时,这些消息可能抵达同一分区,同时,可能会超出每个分区的规模限制。When messages from multiple devices are forwarded to the hub using the same gateway device ID, they may arrive in the same partition at the same time potentially exceeding the per partition scale limits.


  • 如果单个分区的引入速率持续超出限制,则 Azure 时序见解第 2 代在超出 IoT 中心数据保留期之前可能不会同步所有设备遥测数据。If a single partition experiences a sustained rate of ingestion over the limit, it's possible that Azure Time Series Insights Gen2 will not sync all device telemetry before the IoT Hub data retention period has been exceeded. 因此,如果持续超出引入限制,发送的数据可能会丢失。As a result, sent data can be lost if the ingestion limits are consistently exceeded.

为了缓解这种情况,我们建议采用以下最佳做法:To mitigate that circumstance, we recommend the following best practices:

  • 在部署解决方案之前按环境和按分区引入速率进行计算。Calculate your per environment and per partition ingestion rates before deploying your solution.
  • 确保以最大可能的程度对 IoT 中心设备进行负载均衡。Ensure that your IoT Hub devices are load-balanced to the furthest extent possible.


对于使用 IoT 中心作为事件源的环境,请使用正在使用的中心设备数计算引入速率,以确保速率低于每个分区 0.5 MBps 的限制。For environments using IoT Hub as an event source, calculate the ingestion rate using the number of hub devices in use to be sure that the rate falls below the 0.5 MBps per partition limitation.

  • 即使多个事件同时抵达,也不会超出限制。Even if several events arrive simultaneously, the limit will not be exceeded.

IoT 中心分区关系图

若要详细了解如何优化中心吞吐量和分区,请参阅以下资源:Refer to the following resources to learn more about optimizing hub throughput and partitions:

后续步骤Next steps