[ SRE_ARENA ]
CACHING STRATEGIES

Caching Strategies: Stop Hitting the Database

DOWNLOADING CONCEPT: 1. THE 'WHY' OF CACHING...
  • ↳Databases read from disk (or SSDs).
  • ↳Reading from disk takes milliseconds.
  • ↳Reading from RAM takes nanoseconds.
  • ↳RAM is roughly 100,000x faster than disk.
  • ↳Caching is the act of temporarily storing frequently accessed data in RAM (or at the edge of the network) so subsequent requests can bypass the slow database entirely.
  • ↳However, as the famous saying goes: *'There are only two hard things in Computer Science: cache invalidation and naming things.'*
▲ LIVE INCIDENTDatabase CPU spiked to 100% and crashed exactly at midnight.
sre@arena:~/caching-strategies
sre@arena:~$ redis-cli monitor | grep "DEL"