Tagged “Caching”
7 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.
- Consistent hashingWhy hash mod N breaks when servers change, how consistent hashing places servers and keys on a ring so only a fraction of keys move, virtual nodes for balance, replication along the ring, rendezvous hashing and jump hash, a Java TreeMap implementation, and where consistent hashing is used.
- 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.
- Proximity ServiceDesigning 'find restaurants near me' with the 18-step framework: requirements and estimates, why latitude and longitude range queries are slow, geohash (prefixes, precision, boundary issues, neighbours), quadtrees built in memory, Google S2, a read-heavy architecture with a business service and location-based service, and why read replicas beat sharding here.
- URL ShortenerA complete URL shortener design using the 18-step framework: requirements, capacity calculations, API, base62 short codes from a unique ID versus hashing, 301 versus 302 redirects, a read-heavy architecture with caching, key-value storage, analytics through a queue, abuse prevention and trade-offs.
- Search AutocompleteA typeahead suggestion system designed with the 18-step framework: tries with top-k results cached at every node, an offline data-collection and trie-building pipeline, serving from in-memory shards, browser caching and request debouncing, personalisation, filtering and trending queries.
- 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.