<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Redis on Java &amp; Software Architecture Knowledge Hub</title><link>https://samirsahoo.github.io/design-patterns-hub/tags/redis/</link><description>Recent content in Redis on Java &amp; Software Architecture Knowledge Hub</description><generator>Hugo</generator><language>en-US</language><copyright>© 2026 Samir Kumar Sahoo (https://github.com/samirsahoo). All rights reserved.</copyright><atom:link href="https://samirsahoo.github.io/design-patterns-hub/tags/redis/index.xml" rel="self" type="application/rss+xml"/><item><title>Caching Strategies: Patterns, Invalidation, Eviction and Failure Modes</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/caching-strategies/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/caching-strategies/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;cache&lt;/strong&gt; is a small, fast store holding copies of data that is expensive to fetch or compute. It works because of &lt;strong&gt;locality of reference&lt;/strong&gt;: recently requested data is likely to be requested again. Caches exist at almost every layer — hardware, operating system, browser, CDN, application, database — and they are the cheapest way to cut latency and load.&lt;/p&gt;</description></item><item><title>Designing a Rate Limiter</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/rate-limiter/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/rate-limiter/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;a class="heading-anchor" href="#overview" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;rate limiter&lt;/strong&gt; caps how many requests a client may make in a time period, for example 100 requests per minute per API key. It protects services from abuse and denial-of-service, controls cost (paid third-party APIs), and keeps one noisy tenant from starving others. This case study designs a distributed rate limiter for an API platform, following the &lt;a href="https://samirsahoo.github.io/design-patterns-hub/system-design/introduction/"&gt;18-step framework&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Spring Cache Abstraction and Redis Integration</title><link>https://samirsahoo.github.io/design-patterns-hub/spring/data/caching/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/spring/data/caching/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The &lt;strong&gt;Spring Cache abstraction&lt;/strong&gt; lets you cache method results declaratively with &lt;code&gt;@Cacheable&lt;/code&gt; and friends. &lt;strong&gt;Where&lt;/strong&gt; data is cached is pluggable: &lt;strong&gt;Caffeine&lt;/strong&gt; in local memory, &lt;strong&gt;Redis&lt;/strong&gt; (or Valkey) shared across instances, Hazelcast and others.&lt;/p&gt;&#10;&lt;h2 id="the-problem"&gt;The problem&lt;a class="heading-anchor" href="#the-problem" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Repeated expensive calls (database aggregations, remote price lookups, reference data) waste latency and load. Ad-hoc &lt;code&gt;Map&lt;/code&gt; caches have no eviction or TTL, are not shared, and are scattered through the code.&lt;/p&gt;</description></item><item><title>Designing a News Feed (Twitter / Instagram Timeline)</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/news-feed/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/news-feed/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;a class="heading-anchor" href="#overview" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A news feed shows each user the recent posts of the accounts they follow, newest or best first. It is the canonical example of &lt;strong&gt;fan-out&lt;/strong&gt;: one post must appear in the feeds of every follower, and follower counts range from zero to hundreds of millions. Kleppmann uses Twitter&amp;rsquo;s home timeline as his main example of describing load. This design follows the &lt;a href="https://samirsahoo.github.io/design-patterns-hub/system-design/introduction/"&gt;18-step framework&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Designing a Flash Sale System</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/flash-sale/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/flash-sale/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;a class="heading-anchor" href="#overview" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;flash sale&lt;/strong&gt; puts a small amount of stock (say 10,000 discounted consoles) on sale at a precise moment. Millions of users press &amp;ldquo;Buy&amp;rdquo; within seconds — traffic hundreds of times higher than normal, almost all of it doomed to fail. The system must stay up, &lt;strong&gt;never oversell&lt;/strong&gt;, and treat users fairly. ByteByteGo&amp;rsquo;s flash sale design lists the principles; this page applies them with the &lt;a href="https://samirsahoo.github.io/design-patterns-hub/system-design/introduction/"&gt;18-step framework&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>