This article will guide you on some of the Best practices for Azure Cache for Redis. By following these best practices, you can help maximize the performance and cost-effective use of your Azure Cache for Redis instance.
1. Use Standard or Premium tier for production systems. The Basic tier is a single node system with no data replication and no SLA.
2. Remember that Redis is an in-memory data store.
3. Develop your system such that it can handle connection blips because of patching and failover.
4. Configure your maxmemory-reserved setting to improve system responsiveness under memory pressure conditions.
5. Redis works best with smaller values, so consider chopping up bigger data into multiple keys.
6. Locate your cache instance and your application in the same region. Connecting to a cache in a different region can significantly increase latency and reduce reliability.
7. Reuse connections. Creating new connections is expensive and increases latency, so reuse connections as much as possible.
8. Configure your client library to use a connect timeout of at least 15 seconds, giving the system time to connect even under higher CPU conditions.