How to sync local cache between two servers without a centralized cache system?

Discussão em 'Angular' iniciado por Parth, Dezembro 31, 2024.

  1. Parth

    Parth Guest

    I have a setup where I have two servers, each maintaining its own local cache for a map. Upon initialization, the map is cached, and whenever data related to the map is updated, I update the map on the respective server. The problem I’m facing is that when one server updates the map, only that server’s cache is updated, and the other server's cache is not synchronized automatically.

    I don’t want to use a centralized cache system (like Redis or Memcached), but I do need a way to sync the cache across both servers when updates occur. What is the best approach to achieve this cache synchronization with local caches on both servers?

    What I’ve tried so far:

    Updating the map on one server but finding that the other server’s cache does not update automatically. What I’m looking for:

    A solution to sync the local cache between two servers without a centralized cache. The most efficient method for achieving this synchronization (e.g., using message queues, direct API communication, etc.). Technologies in use:

    Spring Boot Local cache implementation (no central cache) Any guidance or examples would be greatly appreciated!

    Continue reading...

Compartilhe esta Página