[USE CASE] ES as cache manager

Hello,

Is ES good to be used as a cache manager, in order to access data without going to the database everytime you need it.

I have loads of tables with relations between them, my persistence layer can manage to insert/update/delete in the cache on every operation but my main question is what is the best way to quickly synchronize the cache with the database on 1st startup if there is corruption or whatever that needs to populate the cache again?

Thanks,
Aleks

In most of these cases, the persistence layer will handle all of it because it can keep track of the changes that need to be written to Elasticsearch.

Otherwise if you have JDBC you can use something like Logstash to read data in.

Hi, thanks for your quick answer, from what I saw the persistence layer just keep track but does not handle the bulk loading at the startup.

In my case it would take ages to do that.

Why not write any new things to Elasticsearch, and then back fill?
Then your app can query Elasticsearch first and fail back to the other layer.

In case it helps, I explained a strategy for this at http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.