kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryanne Dolan <ryannedo...@gmail.com>
Subject Re: Deciding number of partitions
Date Sun, 11 Nov 2018 15:44:16 GMT
Sachit, there are many factors. Some to consider:

- # partitions is the max number of consumers the topic can have per group,
since each consumer will need at least one partition assigned to it.
- # partitions is usually also the max concurrency factor across a consumer
group, since consumers often process records sequentially within each
partition.
- if your key space is lopsided, you may wish to have enough partitions to
enable finer-grained load balancing.
- you may wish to keep the # of partitions around the # of brokers in your
Kafka cluster

Ryanne

On Sun, Nov 11, 2018, 9:29 AM Sachit Murarka <connectsachit@gmail.com>
wrote:

> Hi,
>
> Thanks for reply.
> You have shared the command. I am looking for the formula or way to
> calculate the number of partitions for my topic.
>
> Regards,
> Sachit
>
> On Sun, 11 Nov 2018, 20:08 花儿向阳开 <2468946524@qq.com wrote:
>
> > Hi,
> >   Maybe you can use the command like:
> >     kafka-topic.sh --create --topic <topic_name> --partitions
> > <partition_number>  --replication-factor <replica_number> --zookeeper
> > <zookeeperIP:Port>
> >   I hope it helps!
> >
> >
> > Regards!
> > Cathy
> > ------------------ 原始邮件 ------------------
> > 发件人: "Sachit Murarka"<connectsachit@gmail.com>;
> > 发送时间: 2018年11月11日(星期天) 晚上10:48
> > 收件人: "users"<users@kafka.apache.org>;
> >
> > 主题: Deciding number of partitions
> >
> >
> >
> > Hello All,
> >
> > I am new to kafka.  Could anyone please tell how to decided number of
> > partitions for our topic?
> >
> >
> > Kind Regards,
> > Sachit Murarka
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message