Tagged “Redis”
5 articles with this tag.
- Caching strategiesWhere to cache (client, CDN, application, distributed cache, database), read strategies (cache-aside, read-through) and write strategies (write-through, write-around, write-back), invalidation and TTLs, eviction policies, cache penetration with Bloom filters, stampedes and avalanches, Redis versus Memcached, and why Redis is fast.
- Flash SaleA system for limited-stock sales that attract millions of users at the same second, designed with the 18-step framework: shielding the core with CDNs, waiting rooms and rate limits, atomic stock reservation in Redis, asynchronous order creation through a queue, reservation expiry, preventing overselling and bots, and keeping the user experience honest.
- News FeedA social news feed designed with the 18-step framework: fan-out on write versus fan-out on read, the hybrid approach for celebrities, timeline caches of post IDs in Redis, hydration and ranking, cursor pagination, media, and the numbers behind each decision.
- Rate LimiterA distributed rate limiter designed with the 18-step framework: where to place it, token bucket, leaky bucket, fixed window, sliding log and sliding window counter algorithms compared, atomic Redis implementation with Lua, race conditions, multi-region synchronisation, HTTP 429 and rate-limit headers, and failure modes.
- Caching & RedisCaching in Spring applications: cache-aside and other patterns, @Cacheable, @CachePut, @CacheEvict and @Caching, keys and conditions, cache providers (Caffeine locally, Redis distributed), Redis configuration with TTLs and serialisation, multi-level caching, invalidation and consistency, cache stampede protection, Hibernate second-level cache, and monitoring.