Redis Configuration

In Redis, there is a configuration file (redis.conf) available at the root directory of Redis. Although you can get and set all Redis configurations by Redis CONFIG command.

Syntax

Following is the basic syntax of Redis CONFIG command.

Example

Output

  1. "loglevel"
  2. "notice"
Redis Configuration 1

To get all configuration settings, use * in place of CONFIG_SETTING_NAME

Example

Output

  1. "dir"
  2. "C:\\Program Files\\Redis"
  3. "dbfilename"
  4. "dump.rdb"
  5. "requirepass"
  6. (nil)
  7. "masterauth"
  8. (nil)
  9. "maxmemory"
  10. "0"
  11. "maxmemory-policy"
  12. "volatile-lru"
  13. "maxmemory-samples"
  14. "3"
  15. "timeout"
  16. "0"
  17. "appendonly"
  18. "no"
  19. "no-appendfsync-on-rewrite"
  20. "no"
  21. "appendfsync"
  22. "everysec"
  23. "save"
  24. "3600 1 300 100 60 10000"
  25. "auto-aof-rewrite-percentage"
  26. "100"
  27. "auto-aof-rewrite-min-size"
  28. "1048576"
  29. "slave-serve-stale-data"
  30. "yes"
  31. "hash-max-zipmap-entries"
  32. "512"
  33. "hash-max-zipmap-value"
  34. "64"
  35. "list-max-ziplist-entries"
  36. "512"
  37. "list-max-ziplist-value"
  38. "64"
  39. "set-max-intset-entries"
  40. "512"
  41. "zset-max-ziplist-entries"
  42. "128"
  43. "zset-max-ziplist-value"
  44. "64"
  45. "slowlog-log-slower-than"
  46. "10000"
  47. "slowlog-max-len"
  48. "64"
  49. "loglevel"
  50. "verbose"
Redis Configuration 2
Redis Configuration 3

Edit Configuration

To update configuration, you can edit redis.conf file directly or you can update configurations via CONFIG set command.

Syntax

Following is the basic syntax of CONFIG SET command.

Example

Redis Configuration 4




Latest Courses