What are the most important configuration settings to review and adjust when preparing a Redis instance for production use?
Short answer
You should configure an appropriate maxmemory limit and eviction policy to control memory usage, set up a persistence strategy using RDB, AOF, or both based on your durability needs, enable and properly configure authentication and network binding for security, and adjust…
Advertisement
AModel answer
You should configure an appropriate maxmemory limit and eviction policy to control memory usage, set up a persistence strategy using RDB, AOF, or both based on your durability needs, enable and properly configure authentication and network binding for security, and adjust settings like tcp-backlog and timeout based on your expected connection patterns and load.
Example
CONFIG SET maxmemory 4gb CONFIG SET maxmemory-policy allkeys-lru CONFIG SET requirepass 'strong_password_here'
Real-world example
A team preparing to deploy Redis in production carefully reviews and configures memory limits, persistence settings, and authentication before going live, avoiding the default configuration which is intended for quick local development rather than production use.
Likely follow-ups
- What are the risky default settings that should almost always be changed before production use?
- How do you test a production configuration before actually deploying it?
Related topics