Coder Social home page Coder Social logo

Comments (2)

leozzx avatar leozzx commented on April 23, 2024

no, cachelib doesn't support online backup. Could you explain why do you need persistence in the case of "kill -9"?

from cachelib.

sathyaphoenix avatar sathyaphoenix commented on April 23, 2024

Unlike storage engines, cachelib does not offer crash consistent storage of items. for caches, this is not a deal breaker since durability is not a prime concern for the cache. Besides, caches operate with background evictions, so the application already expects the cache to be empty or missing items. In steady state, cachelib has DRAM data structures that need to be persisted for recovery on restart. If a cache process is receiving a kill -9, we can not guarantee the state of these DRAM data structures to be consistent for shutdown. So I would not recommend catching the kill signal and doing a shutdown unless you can guarantee that the application threads have stopped accessing the cache and shutdown api can be safely called.

There is an internal experimental feature, but it is not the "kill -9" feature you are probably looking for. With that you can snapshot the cache by shutting it down (after ensuring application thread stop accessing cache) and copying the state to another machine to bootstrap another cache from it.

from cachelib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.