The topics eqiad.page_chanve.v1 and codfw.page_change.v1 have a single partition in Kafka Jumbo. These topics are mirrored from the Main cluster, where they also have a single partition.
These topic have a traffic around 20msg/second, and there is at least 2 applications consuming from them (Flink page content change, and Flink page html content change).
I believe that increasing this topic from 1 partition to 3 partitions will only bring us benefits:
- More parallelism can be achieved by consumers.
- Workload is better distributed across 3 brokers, rather than only 1.
- Better storage balanced across brokers (3 partitions * 3 replicas can be stored in 9 brokers. 1 partition * 3 replicas will be spread only across 3 brokers)
I think the number of partitions in our broker isn't a concern right now, we have around 700 partitions (including replicas) per broker, and some Confluent recommendations says that max partitions should be around 4000, while AWS recommends not exceeding 6000.
About ordering
Data is partitioned by wiki + page_id, so revisions for each page should maintain order.
Main -> Jumbo
Data is replicated from Main to Jumbo, if we only increase the number of partitions in Jumbo, Mirror Maker won't have issues, it will send the data from 1 partition to 3, as it uses Kafka Consumers and Producers. If we migrate to MM2, MM2 would try to replicate the topic configuration, but as it won't be able to do it, it will produce a warning and will continue working.
This means that we should be able to increase partitions in Jumbo first.
Ideally, we should replicate the configuration to Main too.
Task is done if:
- codfw.page_change.v1 has 3 partitions in Jumbo cluster
- eqiad.page_change.v1 has 3 partitions in Jumbo cluster
Note that this change is going to affect only incoming data, Kafka won't rebalance messages across partitions.