If you create a topic with more replicas than brokers it should throw an error but if you lose a broker you'd have under replicated partitions.
B On Tuesday, 16 February 2016, Alex Loddengaard <a...@confluent.io> wrote: > Hi Sean, you'll want equal or more brokers than your replication factor. > Meaning, if your replication factor is 3, you'll want 3 or more brokers. > > I'm not sure what Kafka will do if you have fewer brokers than your > replication factor. It will either give you the highest replication factor > it can (in this case, the number of brokers), or it will put more than one > replica on some brokers. My guess is the former, but again, I'm not sure. > > Hope this helps. > > Alex > > On Tue, Feb 16, 2016 at 7:47 AM, Damian Guy <damian....@gmail.com > <javascript:;>> wrote: > > > Then you'll have under-replicated partitions. However, even if you have 3 > > brokers with a replication factor of 2 and you lose a single broker > you'll > > still likely have under-replicated partitions. > > Partitions are assigned to brokers, 1 broker will be the leader and n > > brokers will be followers. If any of the brokers with replicas of the > > partition on it crash then you'll have under-replicated partitions. > > > > > > On 16 February 2016 at 14:45, Sean Morris (semorris) <semor...@cisco.com > <javascript:;>> > > wrote: > > > > > So if I have a replication factor of 2, but only 2 brokers, then > > > replication works, but what if I lose one broker? > > > > > > Thanks, > > > Sean > > > > > > On 2/16/16, 9:14 AM, "Damian Guy" <damian....@gmail.com <javascript:;>> > wrote: > > > > > > >Hi, > > > > > > > >You need to have at least replication factor brokers. > > > >replication factor = 1 is no replication. > > > > > > > >HTH, > > > >Damian > > > > > > > >On 16 February 2016 at 14:08, Sean Morris (semorris) < > > semor...@cisco.com <javascript:;>> > > > >wrote: > > > > > > > >> Should your number of brokers be atleast one more then your > > replication > > > >> factor of your topic(s)? > > > >> > > > >> So if I have a replication factor of 2, I need atleast 3 brokers? > > > >> > > > >> Thanks, > > > >> Sean > > > >> > > > >> > > > > > > > > > > > > -- > *Alex Loddengaard | **Solutions Architect | Confluent* > *Download Apache Kafka and Confluent Platform: www.confluent.io/download > <http://www.confluent.io/download>* >