Design patterns for Valkey
This e-book is a guide to using Valkey, which is an open source fork of the last available Redis OSS v7.2. Valkey is ideal for customers who want a proven high-performance, open source cache as Redis Ltd removed open source (BSD) licensing in March 2024. We provide a brief background on caching and when to use it. Then, we quickly dive deep on core data modeling patterns, resource optimization, and advanced data types and patterns.
- Core Data Modeling Patterns: The read-aside caching pattern is the most common use case, where the application first checks the cache before falling back to the database. We show you how to extend this pattern to handle changing data and working with TTLs.
- Efficient Resource Usage: We examine the key resources in Redis OSS - memory, compute, and network - and provides guidance on optimizing each. This includes techniques like compressing values, using TTLs, and offloading connection management.
- Advanced Data Types: Beyond simple strings, Redis OSS provides advanced data types like hashes, lists, sets, sorted sets, and HyperLogLogs. We explain the use cases and tradeoffs of each.
- Advanced Patterns: We cover more advanced techniques to improve performance, like pipelining and scripting, and sophisticated usage patterns like locking and negative result caching.