与 num.standby.replicas 相关的线程数

问题描述 投票:0回答:1

要求确认我的推理是否正确。

我的应用程序有 12 个输入分区,分布在 3 个应用程序实例中。 通常,我希望将线程数设置为 4,因为 4 个分区等于 4 个任务,这表示最多有 4 个线程。 但是,我的应用程序在状态存储中维护状态,并将

num.standby.replicas
配置为 2。鉴于此设置应导致跨 12 个分区处理变更日志,将线程更改为 12 是否有意义?

在重新启动/重新平衡期间,我得到

WARN
,如下所示:

Unable to assign 1 of 2 standby tasks for task [0_0] There is not enough available capacity. You should increase the number of threads and/or application instances to maintain the requested number of standby replicas.

这是否表明配置不是最优的,可能会导致性能不佳? (在任务之间重新平衡或上下文切换以赶上变更日志时)

apache-kafka apache-kafka-streams
1个回答
0
投票

任务可以分配多个分区。 num.standby.replicas 指备用任务。

https://medium.com/wise-engineering/rack-awareness-in-kafka-streams-448d7e5225a3更好地解释了这一切。

© www.soinside.com 2019 - 2024. All rights reserved.