Codis 基础11

2022-03-22 16:25:27 浏览数 (1)

发现此时,slave的同步关系已经自动建立好了

代码语言:javascript复制
[root@h102 codis]# extern/redis-2.8.21/src/redis-cli -p 6390  info replication
# Replication
role:slave
master_host:localhost
master_port:6389
master_link_status:up
master_last_io_seconds_ago:8
master_sync_in_progress:0
slave_repl_offset:673
slave_priority:100
slave_read_only:1
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
[root@h102 codis]# 
查看配置信息
代码语言:javascript复制
[root@h102 codis]# bin/codis-config server list
[
  {
    "id": 1,
    "product_name": "test",
    "servers": [
      {
        "addr": "localhost:6379",
        "group_id": 1,
        "type": "master"
      },
      {
        "addr": "localhost:6380",
        "group_id": 1,
        "type": "slave"
      }
    ]
  },
  {
    "id": 2,
    "product_name": "test",
    "servers": [
      {
        "addr": "localhost:6390",
        "group_id": 2,
        "type": "slave"
      },
      {
        "addr": "localhost:6389",
        "group_id": 2,
        "type": "master"
      }
    ]
  }
]
[root@h102 codis]#

此刻管理界面里已经多了两个组

0 人点赞