Use cases - NoSQL
- If the requirements are needed, use NoSQL rather than SQL database
- low latency
- unstructured data
- large size data
- only serialize or de-serialize data (JSON, YAML, XML)
Scale out vs Scale up
- Scale up: Same number of machine, update the unit’s of a machine’s tier. The performance of system is updated vertically.
- eg. update CPU instance or memory of the machine
- pros
- cons
- the limit, we can not update the parts of a machine indefinitely
- there is no failover / redundancy strategy
- Scale out: Add more server, update the number of server (instance). The performance of system is updated horizontally.
Cache
External link
‣
- When we should use cache?
- Frequently read, rarely updated data
- Which data should be in cache?
- Basically, the cache layer is volatile
- So set data which is not important
- Cache management - how to evict them?
LRU (least recently used)
LFU (least frequently used)
FIFO (first in first out)
- Consistency
- If cache-update calculation and storage-update calculation are not wired up, the consistency should be broken.
- REF. Scaling Memcache at Facebook - Facebook
SPOF, Single Point of Failure
- If there is only one cache server, the server should be a SPOF, single point of failure.

- Key points of system design interview.