多个observer怎么用

【产品名称】OceanBase数据库

【产品版本】3.1.2

【问题描述】咨询一下,看系统架构图一个zone有多个observer。但是默认自己部署的好像只有一个,这个是需要怎么配么?什么时候会用到多个observer

## Only need to configure when remote login is required

user:

  username: root

  password: A@123456

oceanbase-ce:

 servers:

  - name: z1_01

   # Please don't use hostname, only IP can be supported

   ip: 172.22.51.132

  - name: z1_02

   ip: 172.22.51.133

  - name: z2_01

   ip: 172.22.51.134

  - name: z2_02

   ip: 172.22.51.135

  - name: z3_01

   ip: 172.22.51.136

  - name: z3_02

   ip: 172.22.51.137

 global:

  # Please set devname as the network adaptor's name whose ip is in the setting of severs.

  # if set severs as "127.0.0.1", please set devname as "lo"

  # if current ip is 192.168.1.10, and the ip's network adaptor's name is "eth0", please use "eth0"

  devname: eth0

  cluster_id: 1

  # please set memory limit to a suitable value which is matching resource. 

  memory_limit: 8G

  system_memory: 4G

  stack_size: 512K

  cpu_count: 16

  cache_wash_threshold: 1G

  __min_full_resource_pool_memory: 268435456

  workers_per_cpu_quota: 10

  schema_history_expire_time: 1d

  # The value of net_thread_count had better be same as cpu's core number. 

  net_thread_count: 4

  major_freeze_duty_time: Disable

  minor_freeze_times: 10

  enable_separate_sys_clog: 0

  enable_merge_by_turn: FALSE

  datafile_disk_percentage: 20

  syslog_level: INFO

  enable_syslog_recycle: true

  max_syslog_file_count: 4

  # observer cluster name, consistent with obproxy's cluster_name

  appname: ob_cluster

  root_password: # root user password, can be empty

  proxyro_password: # proxyro user pasword, consistent with obproxy's observer_sys_password, can be empty

 z1_01:

  mysql_port: 2881

  rpc_port: 2882

  home_path: /root/observer

  zone: zone1

 z1_02:

  mysql_port: 2881

  rpc_port: 2882

  home_path: /root/observer

  zone: zone1

 z2_01:

  mysql_port: 2881

  rpc_port: 2882

  home_path: /root/observer

  zone: zone2

 z2_02:

  mysql_port: 2881

  rpc_port: 2882

  home_path: /root/observer

  zone: zone2

 z3_01:

  mysql_port: 2881

  rpc_port: 2882

  home_path: /root/observer

  zone: zone3

 z3_02:

  mysql_port: 2881

  rpc_port: 2882

  home_path: /root/observer

  zone: zone3

obproxy:

 servers:

  - 172.22.51.138

 global:

  listen_port: 2883

  prometheus_listen_port: 2884

  home_path: /root/obproxy

  # oceanbase root server list

  # format: ip:mysql_port,ip:mysql_port

  rs_list: 172.22.51.132:2881;172.22.51.133:2881;172.22.51.134:2881;172.22.51.135:2881;172.22.51.136:2881;172.22.51.137:2881

  enable_cluster_checkout: false

  # observer cluster name, consistent with oceanbase-ce's appname

  cluster_name: ob_cluster

  obproxy_sys_password: # obproxy sys user password, can be empty

  observer_sys_password: # proxyro user pasword, consistent with oceanbase-ce's proxyro_password, can be empty








1 个赞

点赞 木子 

"什么时候需要多个observer?"

扩容可以给已有的zone新增observer,也可以新增zone(一般很少,毕竟需要多一个机房,成本高)。

给已有的zone扩容的的场景,比如容量不足、单机的partition数量过多


OB以集群形态部署,提供给业务使用的是集群中分配出来的租户(逻辑实例)。集群架构是M-M-M,租户架构是N-N-N,M≥N≥1。集群里可以有多个租户,都符合这个特点。多租户瓜分集群的资源(cpu和内存)。集群资源不够了就扩容(加节点,就是加observer)。

您好,租户架构是N-N-N是什么意思?

1 个赞

在一个zone内控制unit_num的数量,不能大于zone内observer的节点数量。否则会报:

ERROR 4656 (HY000): resource pool unit num is bigger than zone server count

这里的N应该是表示zone内分配的unit_num数量,不能大于zone内observer的节点,否则会报:

ERROR 4656 (HY000): resource pool unit num is bigger than zone server count

这里的N应该是表示资源池里unit_num的数量,不能大于zone内observer的节点数量,否则会提示:resource pool unit num is bigger than zone server count

这里的N应该是表示资源池里unit_num的数量,不能大于zone内observer的节点数量(M)。