首页 > 解决方案 > 天蓝色事件中心捕获与自定义函数

问题描述

我们使用事件中心,目的是为了故障排除/分析原因能够存档入站事件数据,可以理解,内置的事件中心捕获起到了作用,但是看着价格标签我的老板不高兴。他的问题是,与我们相比,它有什么好处,我们只是有一个功能来将事件中心连接到某种存储,例如我们自己的 blob,这是否可以证明从长远来看节省成本是合理的。

我不知道如何回答这个问题,你能帮忙吗?

标签: azure-eventhub

解决方案


Azure Functions consumption plan is billed mainly on number of executions whereas Event Hub capture is billed on number of TUs.

Here are couple things that can help to reduce Function app execution counts:

  • Smaller EH partitions counts - for example, 4 partitions would deliver events in larger batches than 32 partitions would do.
  • Increase batchSize in function app's config.

Since you have only 3 partitions and 1 TU traffic to process, you may probably save if you run with a function rather than capture. I recommend doing some test runs and see how many executions incurred then you can compare the hourly cost of functions app to $.10 hourly fixed cost of EH capture.

I am assuming storage side billing will probably be similar or you can even try reducing it further down by increasing batching and decreasing number of storage calls.


推荐阅读