Automatically update brokerstring in MSK
A customer is looking to migrate their kafka workload to MSK. they have a question on how to mange the broker strings when a scaling event occurs in the cluster. for example:
the producer has a config which has a property:
bootstrap.servers
={comma separated string of 3 broker urls}
now a scaling event occurs and now you have another broker. Now the ugly way is to update the brokerstring url section manually.
the other option is to use a round robin DNS or an ALB and all the clients(producers/consumers) talk to the endpoint and behind the scenes it maintains the broker strings.
though i doubt if second option is doable since MSK is managed. or may be i am understanding it incorrectly?
Looking for some guidance on how this scenario is solved for other customers.
Is there a specific reason why they want to add newly added broker into the brokerstring?
The use of bootstrap.servers
by producer/consumer is to get the metadata of the Kafka cluster i.e. list of brokers, partition/offset information to discover the Kafka cluster. Any broker can be bootstrap server because every broker receives metadata information.
To summarize, it is not necessary to update bootstrap servers every time a new broker is added. The producers/consumers can still operate with existing brokerstring of limited brokers
Relevant questions
How to create a super user on MSK
asked 6 months agoHow to connect Glue to MSK with IAM authentication?
asked 7 months agoHow to enroll for MSK Serverless
asked 7 months agoHow big is the risk when updating the Kafka version?
asked 2 years agoMSK Connect - Failed to create using in-built AWSServiceRoleForKafkaConnect role
asked 5 months agoConnect Amazon MSK cluster to on-premises web server?
Accepted Answerasked 3 years agojava.nio.channels.UnresolvedAddressException when trying to create a topic in Amazon MSK
asked 6 months agoLambda MSK trigger not working
asked 2 years agoAutomatically update brokerstring in MSK
Accepted AnswerUsing MSK as trigger to a Lambda with SASL/SCRAM Authentication
asked a month ago