Chris Baumbauer: Personal Musings

Blogs

Ordered list of blogs will go here with a widget

Kafka Cluster Experiment and Test Program

Posted: Jun 11, 2019 3:15 am


Over the last couple of weeks, I was asked by a client to debug a configuration issue they had with their Kafka installation. Without going into too many details, the issue dealt with a misconfigured Kafka cluster configured to behave as if it were a standalone instance during some failover scenarios.

To properly replicate and debug this issue withought impacting the client, as well as provide a testbed for those looking to experiement with Kafka, I created a Vagrantfile that scripts out the initial setup of the Kafka cluster assuming three nodes. In addition, it allowed for the uploading of configs that can be tweaked to account for the various scenarios to test.

In addition, I also created a Java based test program. While Kafka does ship with the sample producer/consumer shell script, only a small fraction of the configurable parameters are exposed through the command line. The program can be used to send out a regular message to the Kafka cluster to allow for testing of various failover scenarios while allowing for setting the full range of Kafka options through an external properties file.

I have made the code available on Github with the intent that it will provide a sandbox for experimentation as well as assist with another situation. I am curious to know how it works for your scenarios. Don't hesitate to drop a message and let me know.

Topics: kafka, zookeeper, debugging,


Return home