Kirk

1. For the client, it doesn't matter whether the server is KRaft or ZK.
Client behaviour will be simply driven by the protocol-changes proposed for
the FetchResponse & ProduceResponse. On the server side, there will be
differences on how a new leader is discovered depending on whether it's ZK
or KRaft . But again that wouldn't affect the client impl.

2. You are right, whenever new leader info advances the view of leadership
for the client, the client should retry immediately, irrespective if the
information is available after many retries. So in our example, the 4th
attempt would retry immediately to the new leader. And for all other cases,
retries would be subject to the configured delay. So if the 4th attempt
failed due to non-leadership related issues, the 5th attempt would be
delayed.

Thanks
Mayank


On Fri, Jul 14, 2023 at 7:20 PM Kirk True <k...@kirktrue.pro> wrote:

> Hi Mayank,
>
> Thanks for the KIP!
>
> Questions:
>
> 1. From the standpoint of the client, does it matter if the cluster is
> running in KRaft mode vs. Zookeeper? Will the behavior somehow be subtlety
> different given that metadata propagation is handled differently between
> the two?
>
> 2. Is there anything we need to do to handle the case where the new leader
> information appears after retries? Suppose the first two attempts to send a
> produce fail, in which case we hit the backoff logic. On the third attempt,
> the broker/node returns new leader information. Would the fourth attempt
> (with the new leader) still be performed without any delay? To be honest,
> I’m not sure that case is valid, but I would assume it would retry
> immediately, right?
>
> Thanks,
> Kirk
>
> > On Jul 13, 2023, at 7:15 AM, Mayank Shekhar Narula <
> mayanks.nar...@gmail.com> wrote:
> >
> > Hi everyone
> >
> > Following KIP is up for discussion. Thanks for your feedback.
> >
> >
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-951%3A+Leader+discovery+optimisations+for+the+client
> >
> > --
> > Regards,
> > Mayank Shekhar Narula
>
>

-- 
Regards,
Mayank Shekhar Narula

Reply via email to