lundi 17 octobre 2022

Create a microservice for distributed cache (Redis)?

We have decided to introduce Redis to our microservice system as a distributed caching and in memory database. The initial decision is to create a service wrapping Redis, and a Client library will be created for other services to consume the Models.

So, a lot of models will be moved from other microservices to the "caching service". The service has web api for populate/update the data in Redis. The Client class library will export methods such as

ModelA GetModelA(...)
ModelB GetModelB(...)

And other services call the method above to get the data.

It seems there are two issues for this design?

  1. It seems the "Caching service" will be the sigle point of failure
  2. Other microservices are sharing the libary of the "caching service" project.

Aucun commentaire:

Enregistrer un commentaire