<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Cache on Murat Useinov</title>
    <link>https://useinov.com/tags/cache/</link>
    <description>Recent content in Cache on Murat Useinov</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 07 Feb 2017 21:30:00 +0300</lastBuildDate>
    <atom:link href="https://useinov.com/tags/cache/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Cache stampede: the hot key problem</title>
      <link>https://useinov.com/posts/2017/cache-stampede/</link>
      <pubDate>Tue, 07 Feb 2017 21:30:00 +0300</pubDate>
      <guid>https://useinov.com/posts/2017/cache-stampede/</guid>
      <description>&lt;p&gt;Cache hit rate 98 percent. The database still fell over. Both facts are true, and the second one does not care about the first.&lt;/p&gt;
&lt;p&gt;What happened. One key holds the result of a heavy query for the main page. TTL one minute. At some second the key expires. In that second a few hundred requests all get a miss, and all of them go to recompute the same heavy query. Redis is fine. MySQL is not. This is a cache stampede, and hit rate will not warn you, because hit rate is an average. The stampede lives in the worst second.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
