The Kafkalytics server process
10K+
Kafkalytics enables you to analyze, log, and optimize your usage of Kafka topics within your application infrastructure.
Within a microservice architecture, firing events turns out to be the most scalable way to let applications communicate with each other without introducing a large amount of coupling. However, one cannot easily infer how many messages are fired on a certain Kafka topic. Even worse, it is very likely that at some point you are unsure whether certain messages are even used. This causes too much traffic over Kafka, requiring infrastructure scaling.
In order to reduce this possible maintenance problem, Kafkalytics aims to analyze and log your messages. It does this by listening to some topics you have defined. Additionally clients will send events to Kafkalytics to notify when they consumed certain messages. This gives you an indication which types of messages are actually used, and which topics might need to be split due to the message count.
Kafkalytics aims to solve this problem. Each message you send to a topic will be logged to Elasticsearch by Kafkalytics (Elasticsearch here is used as a poor mans Hadoop). Each time a message is actually used/consumed by a consumer, it will send a message to Kafkalytics to indicate this. This message includes the service name, the datetime of consumption, and the topic of which the message was consumed.
Kafkalytics will analyze your topics and messages, and give an indication on how your Kafka topics and messages can be optimized. Examples of optimization can be the following:
Kafkalytics will do a form of deep inspection on the package contents in order to perform these analyses.
In order to improve performance, and reduce network overhead Kafkalytics (and its API clients) will always bulk send events. The thresholds for this are configurable.
Kafkalytics will bulk send ES events after a number of events has been saved in the internal queue. Once this threshold is reached it will bulk index these to Elasticsearch. You can continue sending new data into Kafkalytics while this is happening. The Elasticsearch threshold needs some tuning, based on the size of your messages: a large number of very large messages may cause the bulk to have a significant size, which can timeout when sending this. Generally you should aim to keep your messages small.
Kafkalytics clients will save a number of kafka events, and bulk send these over Kafka once the threshold is reached. Also here you can continue adding new events while the actual sending takes place.
Kafkalytics makes just a few assumptions about your message data.
Apart from that Elasticsearch is used to save all data.
Since messages can be fired over multiple topics, we want to log the id of any message. Therefore the producer should use a unique identifier. Apart from that, we want to compute any delays in message consumption, so additionally a datetime object is included.
The entire object has the following form:
{
"id": "unique message id",
"datetime": "iso8601 formatted date"
}
This means your entire message looks like:
{
"message": {
"id": "unique message id",
"datetime": "iso8601 formatted date"
},
"someNumber": 7,
"somestring": "...actual message content..."
}
To log and aggregate Elasticsearch is a required backend. Kafkalytics needs one index to work on, which is configurable.
Kafkalytics uses a client/server model. This is done in order to keep the client for your applications as light as possible. Apart from that, dependencies are minimized.
The client and the server communicate over Kafka, which you are already using (or this project makes little sense for you :wink:). You might need to modify your Kafka messages a bit in order for Kafkalytics to process them effectively. See the message metadata section on this.
default.json with the options mentioned before,docker run -v <your config file dir>:/opt/kafkalytics/config rogierslag/kafkalyticsClients should push consumed messages to a certain kafka topic, which is configurable. API clients are available.
In order to support gradual adoption Kafkalytics will ignore messages which are not ready for Kafkalytics yet. This will allow your organization to start using Kafkalytics, but slowly add more message types over time.
message.id parameter will be ignored.message.id property is present, and skip sending if that is not the case.still have to build this, see https://github.com/rogierslag/kafkalytics/issues/7
You need the following packages on Ubuntu: make gcc g++.
Content type
Image
Digest
sha256:1fca3c595…
Size
279.9 MB
Last updated
over 10 years ago
docker pull rogierslag/kafkalytics