apache-kafkaredismicroservicesmemcached

Can Kafka be used as a database caching?


I want to install a database caching engine between my microservices application and database to reduce the round trip. Will that be a good idea to use Kafka for that? Is there any use case available to use Kafka for that purpose? I know, Redis or Memcached are used for a long for this purpose but any suggestion on Kafka to take this place?


Solution

  • Kafka Streams library can hold data in a RocksDB database, but best practice would be to limit such data to about 1GB.

    If you need more, consuming data into an external cache would be better. The Kafka broker themselves act as a temporal buffer, not a cache