Suppose we have 4 Kafka stream instances performing a stateful operation and if num.standby.replicas = 4, isn't this configuration equal to using a GlobalKTable instead of KTable?
Not really.
It's true that with a GlobalKTable
all partitions are fully available on each Kafka Streams application instance. But the use case for a GlobalKTable
is for holding relatively static data that users can leverage for enriching joins with a KStream
.
Additionally, you can't perform any stateful operations with a GlobalKTable
, and there aren't any that return a GlobalTable
. So for a quick return to processing in the face of losing an application instance, you'll still need to use standby replicas.