Your hit ratio slips one point. Your database load doubles.
transcript
Your cache hit ratio slips from 99 percent to 98. Sounds tiny. Your database load just doubled.
The interview: a global product catalog. 500 million page views a day. That's about 6,000 requests a second, on average. Flash sales bring 100 times that, in about 30 seconds. 600,000 a second.
At 99 percent hits, 1 percent misses. That's 6,000 database queries a second. And the database can't take that. Even at 99. Slip to 98? 12,000. One point of hit ratio, twice the misses.
Last Black Friday, a second before midnight: 99 percent hits. Just 60 queries a second. At midnight, the Deal of the Day key expires. 100,000 users refresh. All of them miss. 100,000 queries in one second. The site goes down.
Sales are scheduled. So warm every sale product 5 minutes early. Mark them hot. A loop checks them every 5 seconds, and refreshes before expiry. And coalesce the rest. One miss, one fetch, however many are waiting.
Now at midnight, the herd arrives at a warm cache. Don't count requests. Count misses. That's your database load.
Full breakdown in the lecture.