2 is technically enough but you're at risk of losing data if there is a
failure and the second broker fails while a replacement broker is
replicating the data. In general, 3 brokers (and replicas) is a good
minimum, but there are some cases that might warrant using fewer, even as
few as 1. For example, if it is ok to lose the data in a disaster and you
*really* need to optimize for latency, then you might choose to use fewer
replicas. However, usually that would be an extreme case.

I'd also suggest planning for future expansion. While you may not be
exploiting parallelism today and are only using 1 partition now, if your
workload increases you'll have an annoying migration if you use keys since
adding partitions will change which partition each key goes to. It's better
to plan for expansion an start with more partitions even if you're not
taking advantage of them today.

-Ewen

On Tue, Jun 21, 2016 at 3:37 AM, Snehalata Nagaje <
snehalata.nag...@harbingergroup.com> wrote:

>
> Hi ,
>
>
> I want to create kafka cluster for HA.
>
> Do we need to create 3 brokers?, or is it okay if create only 2 we are
> using only 1 partition for every topic, there is no parallelism while
> fetching data.
>
> Please suggest.
>
> Thanks,
> Snehalata
>



-- 
Thanks,
Ewen

Reply via email to