OceanBase 数据库架构为两地三中心五副本,APP 侧无负载均衡设备,已决定使用 JDBC load balance,配置 OBDNS 域名备用。本文简述 OBDNS 的配置步骤。
适用版本
OBDNS_20220108_0002 版本。
操作步骤
执行以下命令添加域名。
分机房、地域以及全域分别配置五个域名。
python ob_dns_ops.py add dn1.xxx.com -t tcp -r 192.xxx.x.101,192.xxx.x.102,192.xxx.x.103,192.xxx.x.104,192.xxx.x.105 -l 2883:2883 python ob_dns_ops.py add dn2.xxx.com -t tcp -r 192.xxx.x.101,192.xxx.x.102,192.xxx.x.103 -l 2883:2883 python ob_dns_ops.py add dn3.xxx.com -t tcp -r 192.xxx.x.104,192.xxx.x.105 -l 2883:2883 python ob_dns_ops.py add dn4.xxx.com -t tcp -r 192.xxx.x.102 -l 2883:2883 python ob_dns_ops.py add dn5.xxx.com -t tcp -r 192.xxx.x.103 -l 2883:2883检查
oceanbase.zone文件内容。测试域名解析。
dig +short dn1.xxx.com dig +short dn2.xxx.com dig +short dn3.xxx.com dig +short dn4.xxx.com dig +short dn5.xxx.com列出域名记录。
python ob_dns_ops.py list http python ob_dns_ops.py list tcp