Redis教程

Redis Cluster配置信息注释

本文主要是介绍Redis Cluster配置信息注释,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

$ /home/redis/redis_6379/bin/redis-cli -h 127.0.0.1 -p 6378 -a Pw_Redis_2021
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
127.0.0.1:6378> show all;
(error) ERR unknown command `show`, with args beginning with: `all;`,
127.0.0.1:6378> info all
# Server
redis_version:5.0.5
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:bba435b39bf84fc5
redis_mode:cluster
os:Linux 3.10.0-1127.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:sync-builtin
gcc_version:4.4.7
process_id:10946
run_id:32932fe99c663c45c23320f671a1fac2f6f36728
tcp_port:6378
uptime_in_seconds:253478
uptime_in_days:2
hz:10
configured_hz:10
lru_clock:1448890
executable:/home/redis/redis_6378/bin/redis-server
config_file:/home/redis/redis_6378/conf/redis_6378.conf

# Clients
connected_clients:2
client_recent_max_input_buffer:2
client_recent_max_output_buffer:0
blocked_clients:0

# Memory
used_memory:12263568
used_memory_human:11.70M
used_memory_rss:28405760
used_memory_rss_human:27.09M
used_memory_peak:16487904
used_memory_peak_human:15.72M
used_memory_peak_perc:74.38%
used_memory_overhead:4771830
used_memory_startup:1463096
used_memory_dataset:7491738
used_memory_dataset_perc:69.36%
allocator_allocated:12698192
allocator_active:13922304
allocator_resident:21463040
total_system_memory:16824721408
total_system_memory_human:15.67G
used_memory_lua:37888
used_memory_lua_human:37.00K
used_memory_scripts:0
used_memory_scripts_human:0B
number_of_cached_scripts:0
maxmemory:16106127360
maxmemory_human:15.00G
maxmemory_policy:volatile-lru
allocator_frag_ratio:1.10
allocator_frag_bytes:1224112
allocator_rss_ratio:1.54
allocator_rss_bytes:7540736
rss_overhead_ratio:1.32
rss_overhead_bytes:6942720
mem_fragmentation_ratio:2.32
mem_fragmentation_bytes:16184472
mem_not_counted_for_evict:1094
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:66616
mem_aof_buffer:1094
mem_allocator:jemalloc-5.1.0
active_defrag_running:0
lazyfree_pending_objects:0

# Persistence
loading:0
rdb_changes_since_last_save:232149
rdb_bgsave_in_progress:0
rdb_last_save_time:1628585364
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:1
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0
aof_current_size:63443529
aof_base_size:0
aof_pending_rewrite:0
aof_buffer_length:0
aof_rewrite_buffer_length:0
aof_pending_bio_fsync:0
aof_delayed_fsync:0

# Stats
total_connections_received:785432
total_commands_processed:1065195
instantaneous_ops_per_sec:0
total_net_input_bytes:133510686
total_net_output_bytes:141836318
instantaneous_input_kbps:0.10
instantaneous_output_kbps:0.10
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:54690
expired_stale_perc:0.24
expired_time_cap_reached_count:0
evicted_keys:0
keyspace_hits:315847
keyspace_misses:247
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0

# Replication
role:master
connected_slaves:0
master_replid:21ebde51c3d90fcc77db5d8c5432b31a60199d77
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:340.235251
used_cpu_user:402.752989
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000

# Commandstats
cmdstat_auth:calls=532619,usec=1613951,usec_per_call=3.03
cmdstat_hget:calls=17997,usec=129325,usec_per_call=7.19
cmdstat_setex:calls=89280,usec=1352621,usec_per_call=15.15
cmdstat_client:calls=33,usec=454,usec_per_call=13.76
cmdstat_sadd:calls=295,usec=815971,usec_per_call=2766.00
cmdstat_cluster:calls=16,usec=7096,usec_per_call=443.50
cmdstat_hset:calls=6800,usec=60729,usec_per_call=8.93
cmdstat_get:calls=297802,usec=1321031,usec_per_call=4.44
cmdstat_command:calls=1713,usec=1863733,usec_per_call=1087.99
cmdstat_pexpire:calls=7458,usec=40033,usec_per_call=5.37
cmdstat_smembers:calls=295,usec=976625,usec_per_call=3310.59
cmdstat_set:calls=62382,usec=745453,usec_per_call=11.95
cmdstat_hdel:calls=1945,usec=15393,usec_per_call=7.91
cmdstat_del:calls=46560,usec=463735,usec_per_call=9.96

# Cluster
cluster_enabled:1

# Keyspace
db0:keys=34257,expires=34257,avg_ttl=42527039
127.0.0.1:6378>
127.0.0.1:6378>
127.0.0.1:6378> cluster node
(error) ERR Unknown subcommand or wrong number of arguments for 'node'. Try CLUSTER HELP.
127.0.0.1:6378> cluster nodes
738778c397601bf087d12398e09b624d215699cd 10.133.136.157:6378@16378 slave 5fd37f1d57d8b6e19d899b71507c920486d99ff9 0 1628838902119 5 connected
279a06a1b70a24eb058c3b7bef7bfa2ab8548055 10.133.136.155:6378@16378 myself,master - 0 1628838901000 1 connected 0-5460
bebe6298dcc712911020a6890ffd8eedc1b0720a 10.133.136.156:6378@16378 slave 279a06a1b70a24eb058c3b7bef7bfa2ab8548055 0 1628838900112 3 connected
5fd37f1d57d8b6e19d899b71507c920486d99ff9 10.133.136.156:6379@16379 master - 0 1628838898000 2 connected 5461-10922
8e626d7778d2e1afa9e5e1f6d8e25cd617147bc5 10.133.136.157:6379@16379 master - 0 1628838900000 4 connected 10923-16383
6701d1d102cf3366ca0f15bd923971dcfff8d90a 10.133.136.155:6379@16379 slave 8e626d7778d2e1afa9e5e1f6d8e25cd617147bc5 0 1628838901117 6 connected
127.0.0.1:6378> cluster info
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:6
cluster_my_epoch:1
cluster_stats_messages_ping_sent:252831
cluster_stats_messages_pong_sent:266450
cluster_stats_messages_sent:519281
cluster_stats_messages_ping_received:266450
cluster_stats_messages_pong_received:252831
cluster_stats_messages_received:519281
127.0.0.1:6378>

$ cat redis_6378/conf/sentinel.conf
port 26379
daemonize yes
protected-mode no
logfile "/home/redis/redis/log/sentinel.log"
sentinel monitor mymaster 10.xx.xx.xx 6379 2
sentinel failover-timeout mymaster 10000
sentinel parallel-syncs mymaster 2
sentinel auth-pass mymaster Redis_NOPwd_2020_Tk
sentinel config-epoch mymaster 36076
dir "/home/redis/redis/conf"

$ cat redis_6378/conf/redis_6378.conf
daemonize yes
cluster-enabled yes
pidfile "/home/redis/redis_6378/logs/redis_6378.pid"
port 6378
tcp-backlog 511
timeout 300
tcp-keepalive 60
loglevel warning
logfile "/home/redis/redis_6378/logs/redis_6378.log"
databases 16
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename "dump_6378.rdb"
dir "/home/redis/redis_6378/data"
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
maxclients 10000
maxmemory 15gb
maxmemory-policy volatile-lru
maxmemory-samples 3
appendonly yes
appendfilename "appendonly_6378.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 1024
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes
protected-mode no
requirepass Pw_Redis_2021
#slaveof 127.0.0.1 6379
#masterauth Pw_Redis_2020

rename-command FLUSHALL ''
rename-command CONFIG ''
rename-command EVAL ''
$

 

这篇关于Redis Cluster配置信息注释的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!