redis.conf 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Redis Configuration for Production
  2. # Network
  3. bind 0.0.0.0
  4. port 6379
  5. timeout 300
  6. tcp-keepalive 60
  7. # General
  8. daemonize no
  9. supervised no
  10. pidfile /var/run/redis/redis-server.pid
  11. loglevel notice
  12. logfile ""
  13. # Snapshotting
  14. save 900 1
  15. save 300 10
  16. save 60 10000
  17. stop-writes-on-bgsave-error yes
  18. rdbcompression yes
  19. rdbchecksum yes
  20. dbfilename dump.rdb
  21. dir /data
  22. # Append Only File
  23. appendonly yes
  24. appendfilename "appendonly.aof"
  25. appendfsync everysec
  26. no-appendfsync-on-rewrite no
  27. auto-aof-rewrite-percentage 100
  28. auto-aof-rewrite-min-size 64mb
  29. aof-load-truncated yes
  30. # Memory Management
  31. maxmemory 256mb
  32. maxmemory-policy allkeys-lru
  33. # Security
  34. # requirepass your_redis_password_here
  35. # Clients
  36. maxclients 10000
  37. # Slow Log
  38. slowlog-log-slower-than 10000
  39. slowlog-max-len 128
  40. # Advanced Config
  41. hash-max-ziplist-entries 512
  42. hash-max-ziplist-value 64
  43. list-max-ziplist-size -2
  44. list-compress-depth 0
  45. set-max-intset-entries 512
  46. zset-max-ziplist-entries 128
  47. zset-max-ziplist-value 64
  48. hll-sparse-max-bytes 3000
  49. activerehashing yes
  50. client-output-buffer-limit normal 0 0 0
  51. client-output-buffer-limit slave 256mb 64mb 60
  52. client-output-buffer-limit pubsub 32mb 8mb 60
  53. hz 10
  54. aof-rewrite-incremental-fsync yes