Skip to content

iamrohit/cacheismo

Repository files navigation

BookMyTime

Cacheismo is a sciptable object cache which can be used as replacement for memcached and redis. It supports memcache protocol (tcp and ascii only).

Others reasons why you might want to use it.

  • Slab allocator used in memcache would waste memory if slab sizes and object sizes are not in sync. For example when using slab sizes of 64/128/256/512/1024 bytes object with size 513 is stored in 1024 bytes slab, wasting almost half the memory. cashismo tries to maintain memory used by object as close as possible to the object size. No configuration is required, no tuning of slab sizes.
    See http://chakpak.blogspot.com/2011/09/cacheismo-memory-allocation.html

  • True LRU support. memcache will evict items from the slab in which object will be placed. What this means is that memcache will remove objects from cache which are not truly the LRU objects in the cache. cachismo will always use the LRU, irrespective of the size. If sizes of objects in the cache is not fixed, it is either hard to estimate or changes over time, then you would see much better HIT rate with cacheismo compared to memcached.

  • Cluster Support Cacheismo uses virtual keys. This breaks the consistent hashing algo because hash of virtual key is not likely to be the hash of actual data key. Cacheismo provides server side consistent hashing. Which means if you connect to arbitrary cacheismo server and throw any random key, it will find out the actual server and route the request to that server. This functionality is suported but not enabled by default. Cacheismo provide "consistent" object type which can be configured with set of servers and then one could ask which is the server given a key. Usage is optional. Cacheismo also supports parallel get operations on multiple cacheismo severs. This can be used to provide map-reduce like functionality. See http://chakpak.blogspot.com/2011/10/using-cacheismo-cluster-for-real-time.html http://chakpak.blogspot.com/2011/10/cacheismo-cluster-update-2.html http://chakpak.blogspot.com/2011/10/finding-keys-in-cacheismo.html

Building - cacheismo depends on libevent and lua (luagit can also be used) - intsall libevent and lua if not already present on your system. - ./configure; make - binary is created in the src directory.

It is single threaded. Run multiple instances on multicore systems.

Introduction: http://chakpak.blogspot.com/2011/09/introducing-cacheismo.html Disuss : cacheismo@googlegroups.com