You are running a Kafka Streams application in a Docker container managed by Kubernetes, and upon application restart, it takes a long time for the docker container to replicate the state and get back to processing the data. How can you improve dramatically the application restart?
- Mount a persistent volume for your RocksDB
- Increase the number of partitions in your inputs topic
- Reduce the Streams caching property
- Increase the number of Streams threads
Answer(s): A
Explanation:
Although any Kafka Streams application is stateless as the state is stored in Kafka, it can take a while and lots of resources to recover the state from Kafka. In order to speed up recovery, it is advised to store the Kafka Streams state on a persistent volume, so that only the missing part of the state needs to be recovered.
Reveal Solution Next Question