azure - 如何决定在 Azure 事件中心中使用多少个分区

标签 azure azure-eventhub

或者换句话说:我有什么理由不采用最大分区数(目前为 32,无需直接联系 Microsoft)。

据我所知,更多的分区意味着(潜在的)更大的导出吞吐量,而不会增加金钱或计算成本。有什么问题吗?我什么时候不想使用尽可能多的分区?

最佳答案

您的观察是正确的,在配置事件中心时,拥有更多的分区不会花费您额外的费用。但当数据大规模流入时,您将需要分配更多的 TU,因此根据流入和流出的数据量,您将需要支付额外费用。

来自the docs

Throughput in Event Hubs defines the amount of data in mega bytes or the number (in thousands) of 1-KB events that ingress and egress through Event Hubs. This throughput is measured in throughput units (TUs). Purchase TUs before you can start using the Event Hubs service. You can explicitly select Event Hubs TUs either by using portal or Event Hubs Resource Manager templates.

另一件事是,如果您使用例如 Event Processor Host为了处理数据,它必须启动所有分区的监听器。如果传入的数据不是那么多,并且数据被划分到所有这些分区上,那么您将有很多分区处理少量的数据流,从而可能无法对该数据进行最佳处理。

来自the docs :

The partition count on an event hub cannot be modified after setup. With that in mind, it is important to think about how many partitions you need before getting started. Event Hubs is designed to allow a single partition reader per consumer group. In most use cases, the default setting of four partitions is sufficient. If you are looking to scale your event processing, you may want to consider adding additional partitions. There is no specific throughput limit on a partition, however the aggregate throughput in your namespace is limited by the number of throughput units. As you increase the number of throughput units in your namespace, you may want additional partitions to allow concurrent readers to achieve their own maximum throughput.

However, if you have a model in which your application has an affinity to a particular partition, increasing the number of partitions may not be of any benefit to you. For more information, see availability and consistency.

您的数据处理管道必须处理这些分区。如果您只有一台进程/机器必须处理理论上可以发送到事件中心的大量数据。

关于azure - 如何决定在 Azure 事件中心中使用多少个分区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53842254/

相关文章:

azure - Azure 帐户中的多个订阅流式传输到单个 EventHub

azure - 如何获取 Azure EventHub 深度

c# - Azure Functions 用于登录远程计算机并执行任务

azure - 公开所有端口后无法通过 RDP 访问 Azure VM - Windows Server 2019

asp.net - Elmah xml 在多个实例上

azure - Eventhub Stream 未捕获架构不匹配

azure - 如何在 Azure 服务总线中使用/启用 EventHubClient 的 EventHubsEventSource 跟踪

asp.net-mvc-2 - asp.net mvc azure "Error accessing the data store!"

AZURE PIPELINE 将变量从一个脚本传递到另一个脚本

c# - 如何在azure webjob或函数中触发多个eventhub