Can you scale DOWN the number of Kafka brokers in an Amazon MSK cluster?
Asked Answered
B

4

5

Quick question for those who have used Amazon's MSK (Managed Streaming for Kafka):

The docs/FAQ make it clear that you can easily scale up the number of brokers in an MSK cluster. Can you just as easily scale the number back down? I'm not talking about auto-scaling, but manual scaling.

Bebeeru answered 18/11, 2019 at 16:51 Comment(0)
K
3

Currently Amazon MSK doesn't support the scaling down through the APIs. It is one of the known limitation as of now.

You will have to do it manually but that itself is an hassle as you will have to manage all the replicas to make sure those are in sync.

Another option could be you spin up another smaller MSK service and run the mirror maker to copy the data.

Kyphosis answered 18/11, 2019 at 21:4 Comment(2)
Using mirror maker can I mirror cluster having an un-equal number of nodes? I mean can I run mirror make against cluster A with X nodes and cluster B with Y nodes where X != Y.Lipophilic
Yeah, that is possible. You can use between 2 different size clusters but one has to be mindful with the resources, backpressure etc.Kyphosis
A
3

Just wanted to provide some potentially useful information; Confluent Cloud does allow for cluster shrink.

https://docs.confluent.io/cloud/current/clusters/shrink.html

Area answered 12/10, 2021 at 16:30 Comment(0)
S
0

You aren't currently able to scale down a cluster https://docs.aws.amazon.com/msk/1.0/apireference/clusters-clusterarn-nodes-count.html#UpdateBrokerCount.

Sandrasandro answered 18/11, 2019 at 17:42 Comment(1)
"Updates the number of broker nodes in the cluster. You can use this operation to increase the number of brokers in an existing cluster. You can't decrease the number of brokers."Seasickness
S
0

From MSK version 2.8.1, AWS supports decreasing the number of brokers. Remove a broker from an Amazon MSK cluster

It's required that brokers be empty before remove them from cluster.

For exemple, you have 4 brokers B1, B2, B3, B4 and want to remove brokers B3 and B4.

You need to use kafka-reassign-partitions.sh to reassign all partitions from B3, B4 to B1 and B2.

When B3 and B4 are empty, you can remove them from cluster

Snipes answered 17/6 at 10:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.