ob-configserver高可用问题

看了官方obd部署自带的all-components.yaml参数模板,发现ob-configserver部分如下:

ob-configserver:
  servers:
    - 127.0.0.1
  global:
    listen_port: 8080 # The port of ob-configserver web
    # server_ip: 0.0.0.0 # Listen to the ob-configserver server IP。When you want to listen to the specified IP address,use it.
    home_path: /home/admin/ob-configserver  # The working directory for prometheus. ob-configserver is started under this directory. This is a required field.
    ## log config
    # log_level: info # Log printing level of ob-configserver。The default value is `info`
    # log_maxsize: 30 # The total size of manager ob-configserver.Log size is measured in Megabytes.The default value is 30
    # log_maxage: 7 # The days of manager expired ob-configserver.Log retention days. The default value is 7
    # log_maxbackups: 10  #The number of manager expired ob-configserver.Log. The default value is 10
    # log_localtime: true #  Switch of ob-configserver.Log naming with localtime. The default value is true
    # log_compress: true # Compress ob-configserver.Log switch. The default value is true

    ## vip config, configserver will generate url with vip_address and port and return it to the client
    ## do not use some random value that can't be connected
    # vip_address: "10.10.10.1"
    # vip_port: 8080
    ## storage config
    # storage:
    #   database_type: sqlite3 # sqlite3 or mysql. Default sqlite3
    #   connection_url: "" # When database_type is set to sqlite3, the connection_url parameter can be left empty. If it is empty, the default value $home_path/.data.db?cache=shared&_fk=1 will be used. When database_type is set to mysql, the connection_url parameter must be configured, with a sample value of user:password@tcp(10.10.10.1:2883)/test?parseTime=true.

有以下疑问,麻烦大佬解惑:
1)obd整个部署过程,模板配置中是单点部署,意思是推荐单点配置吗?
2) 如果obconfigserver挂了,对ob集群有何影响?
3) 临时重新部署一个,strorage是新初始化的,有何影响?

configserver 本身是无状态的,可以参考:OceanBase 社区

谢谢解答,问题是configserver本身也有存储的,默认sqllite,如果这个这个sqlite数据文件丢了,会怎样?

admin@ubuntu:/data/admin/ob-configserver$ tree .
.
├── bin
│   └── ob-configserver -> /home/admin/.obd/repository/ob-configserver/1.0.0/664f93205c913d5dc84e0779d565768fd60f1d5e/bin/ob-configserver
├── conf
│   └── ob-configserver.yaml
├── log
│   ├── ob-configserver-2024-06-03T21-21-44.849.log.gz
│   ├── ob-configserver-2024-06-04T10-16-09.201.log.gz
│   ├── ob-configserver-2024-06-04T23-21-52.895.log.gz
│   ├── ob-configserver-2024-06-05T12-27-39.152.log.gz
│   ├── ob-configserver-2024-06-06T01-33-28.725.log.gz
│   └── ob-configserver.log
└── run
    └── ob-configserver.pid

4 directories, 9 files
admin@ubuntu:/data/admin/ob-configserver$ 
admin@ubuntu:/data/admin/ob-configserver$ ls -ltra 
total 44
drwxr-xr-x 5 admin admin  4096 Jun  3 16:26 ..
drwxrwxr-x 2 admin admin  4096 Jun  3 16:27 bin
drwxrwxr-x 2 admin admin  4096 Jun  3 16:27 run
drwxrwxr-x 2 admin admin  4096 Jun  4 16:04 conf
drwxrwxr-x 2 admin admin  4096 Jun  6 09:33 log
-rw-r--r-- 1 admin admin 20480 Jun  6 10:34 .data.db
drwxrwxr-x 6 admin admin  4096 Jun  6 10:34 .

admin@ubuntu:/data/admin/ob-configserver$ sqlite .data.db  
Unable to open database ".data.db": file is encrypted or is not a database

  1. 一般来说单节点是够用的,配置文件中应该只是给了最简单的场景,如果需要部署多节点,需要有vip,而 vip obd 是无法管理的
  2. configserver 挂了对 OB 集群没有影响,只会影响 obproxy 以 configserver 的方式新建和 ob 的连接
  3. 如果重新部署一个,需要考虑地址是否和之前的能保持一致,如果不一致的话,还需要修改 observer 和 obproxy 中的配置,等 observer 再重新汇报上来,这段时间obproxy新建到未连接过的 ob 集群的连接会失败

如果需要部署多个 configserver,那么一定要用 mysql 或者 ob 的 mysql 租户做 metadb

谢谢!还有两个疑问:
1)obporxy除了以configserver方式和observer新建连接外,言外之意,还有什么其他的方式?
2)那这里的vip 就是为了和之前的保持一致设立的?否则observer无法正确上报?
3)那默认模板应该推荐使用ob的mysql租户作为默认存储。不应该推荐sqlite

这里应该是observer的注册上报配置:

admin@ubuntu:~/observer/etc$ strings observer.config.bin | grep -i config  
obconfig_url=http://10.xx.xx.126:8080/services?Action=ObRootServiceInfo&ObCluster=obdemo

这里是obproxy获取config server配置参数:

admin@ubuntu:/data/admin/obproxy/etc$ strings  obproxy_config.bin |grep -i config
use_local_dbconfig=False
current_local_config_version=0
obproxy_config_server_url=http://10.xx.xx.126:8080/services?Action=GetObProxyConfig
ignore_local_config=True
net_config_poll_timeout=1ms
config_server_refresh_interval=60s