Friday, July 1, 2022

Caching Solutions

 CACHING SOLUTION

REDIS:

Interactive tutorial : http://try.redis.io/

Alternative to Redis : Memcached




Caching Best Practices 

  1. Validity
  2. High Hitrate
  3. Cache Miss
  4. TTL

There can be three ways to write in the cache

  1. Cache Aside
  2. Read Through cache 
  3. Write through - Write to the Cache, then write to the DB and then return success 
  4. Write around - Write to the DB and return success. When there is a cache miss the cache would be updates.
  5. Write back - Write to the Cache and return success. there is another system which asynchronously 
Fault Tolerance for Cache
  1. Regular Interval Snapshot
  2. Log Reconstruction

Learn more about caching using this video 

How to design a Distributed Cache ?








Reading 

https://codeahoy.com/2017/08/11/caching-strategies-and-how-to-choose-the-right-one/

https://www.instaclustr.com/blog/redis-vs-memcached


No comments:

Post a Comment