TIL: host vs agent_host in GBase Database(GBase 8c) Network Configuration
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
When reading a GBase Database(GBase 8c) deployment configuration for the first time, engineers often encounter the same question: Why does one database instance need both host and agent_host? The answer is network traffic separation. These two fields serve different communication purposes in the GBase Database cluster. Understanding the distinction is essential when planning dual-NIC deployments, configuring network subnets, and troubleshooting cluster heartbeat timeouts.
初次阅读 GBase 数据库(GBase 8c)部署配置时,工程师们经常会遇到同一个问题:为什么一个数据库实例既需要 host 又需要 agent_host?答案是网络流量分离。这两个字段在 GBase 数据库集群中承担着不同的通信职责。在规划双网卡部署、配置网络子网以及排查集群心跳超时故障时,理解这种区别至关重要。
- host: The Data-Plane Address host is the data-plane address used for communication between database instances. Typical communication paths include:
- CN-to-DN communication
- DN primary-to-standby replication
- GTM communication with other database instances This network carries database-related traffic. Depending on the workload, traffic volume can be substantial and bursty. For this reason, the deployment manual recommends using a 10GbE network for host in a dual-NIC configuration.
- host:数据平面地址 host 是用于数据库实例间通信的数据平面地址。典型的通信路径包括:
- CN 到 DN 的通信
- DN 主备复制
- GTM 与其他数据库实例的通信 该网络承载与数据库相关的流量。根据工作负载的不同,流量可能会非常大且具有突发性。因此,部署手册建议在双网卡配置中为 host 使用 10GbE 网络。
- agent_host: The Control-Plane Address agent_host serves a different purpose. It is the control-plane address used for communication with management components such as:
- gha_server
- DCS This network carries management commands, heartbeat messages, and other cluster coordination traffic. Unlike bulk database traffic, control-plane traffic is relatively small but sensitive to latency and communication interruptions. The documented dual-NIC configuration uses a 1GbE network for agent_host.
- agent_host:控制平面地址 agent_host 的用途则不同。它是用于与管理组件通信的控制平面地址,例如:
- gha_server
- DCS 该网络承载管理指令、心跳消息以及其他集群协调流量。与海量的数据库流量不同,控制平面流量相对较小,但对延迟和通信中断非常敏感。文档建议的双网卡配置为 agent_host 使用 1GbE 网络。
- Why Separate the Two Network Planes? The reason is not simply bandwidth. It is network traffic isolation. Consider a cluster where database traffic and management traffic share one network interface. During functional testing, the workload is usually light enough that both types of communication work normally. Under heavy workloads, however, large queries and bulk scans can compete for network resources with control-plane heartbeats. The resulting sequence can look like this:
- Bulk database traffic increases network utilization.
- Control-plane heartbeat latency increases.
- Heartbeat communication encounters timeouts.
- Cluster health assessment and failover behavior may become unstable. This is why a network configuration that appears perfectly functional during initial acceptance testing can become problematic under sustained load. For GBase Database high-availability deployments, separating data-plane and control-plane traffic helps reduce this resource contention.
- 为什么要分离这两个网络平面? 原因不仅仅是带宽,而是网络流量隔离。设想一个数据库流量和管理流量共享同一个网络接口的集群。在功能测试期间,工作负载通常较轻,两种通信都能正常工作。然而,在高负载下,大型查询和批量扫描可能会与控制平面的心跳争夺网络资源。由此产生的结果序列可能是这样的:
- 大量数据库流量增加了网络利用率。
- 控制平面心跳延迟增加。
- 心跳通信遇到超时。
- 集群健康评估和故障转移行为可能变得不稳定。 这就是为什么在初步验收测试中看起来完全正常的网络配置,在持续负载下可能会出现问题。对于 GBase 数据库的高可用部署,分离数据平面和控制平面流量有助于减少这种资源争用。
-
The Subnet Constraint Matters Too The network design is not only about assigning two different IP addresses. The deployment manual also specifies a subnet relationship: agent_host shares a subnet with gha_server and DCS. host uses its own subnet. This distinction matters when planning IP addresses, routing, firewall rules, and network interfaces. Simply configuring two IP addresses does not guarantee proper network isolation if both communication paths still share the same network segment and physical resources.
-
子网约束同样重要 网络设计不仅仅是分配两个不同的 IP 地址。部署手册还规定了子网关系:agent_host 与 gha_server 和 DCS 共享一个子网,而 host 使用其独立的子网。在规划 IP 地址、路由、防火墙规则和网络接口时,这种区别至关重要。如果两条通信路径仍然共享相同的网段和物理资源,仅仅配置两个 IP 地址并不能保证真正的网络隔离。
-
Can Both Fields Use the Same IP Address? Yes, in a single-NIC deployment, both fields can use the same address when permitted by the deployment configuration. For example, functional testing may succeed with: host: 192.168.10.101 agent_host: 192.168.10.101 But this configuration does not provide the network isolation of a dual-NIC architecture. Under heavy workloads, database traffic and management traffic still compete for the same network resources. The important distinction is that successful connectivity does not necessarily demonstrate sufficient network isolation under production load.
-
这两个字段可以使用同一个 IP 地址吗? 可以。在单网卡部署中,如果部署配置允许,这两个字段可以使用同一个地址。例如,功能测试可能在以下配置下成功: host: 192.168.10.101 agent_host: 192.168.10.101 但这种配置无法提供双网卡架构所具备的网络隔离。在高负载下,数据库流量和管理流量仍然会争夺相同的网络资源。重要的区别在于:连接成功并不一定意味着在生产负载下具备足够的网络隔离。
-
A11: A Pre-Installation Check Worth Watching There is also a configuration-level detail worth remembering. In the documented GBase Database pre-installation checks, A11 can identify anomalies related to the host and agent_host network configuration. If A11 reports an abnormal result, do not look only at the physical NICs. Also review:
- Whether host and agent_host are assigned to the intended network interfaces
- Whether the IP addresses belong to the expected subnets
- Whether agent_host has the required connectivity to gha_server and DCS
- Whether the configured network arrangement matches the deployment design This is useful because some network configuration problems can be identified before the actual installation begins.
- A11:值得关注的预安装检查 还有一个值得记住的配置细节。在 GBase 数据库的文档化预安装检查中,A11 可以识别与 host 和 agent_host 网络配置相关的异常。如果 A11 报告异常结果,不要只检查物理网卡,还应审查:
- host 和 agent_host 是否分配到了预期的网络接口
- IP 地址是否属于预期的子网
- agent_host 是否具备与 gha_server 和 DCS 的必要连通性
- 配置的网络安排是否符合部署设计 这一点很有用,因为一些网络配置问题可以在实际安装开始前就被发现。
-
A Real Deployment Lesson Consider a three-host GBase Database deployment with dual NICs. Both host and agent_host were initially configured using the business network subnet. Functional testing passed without obvious problems. However, when the workload reached approximately 80% of the tested load, intermittent failover switching began. The logs showed heartbeat timeouts. After correcting agent_host to use the management subnet and reinstalling the cluster, the problem disappeared. The important lesson is not that every single-NIC configuration will fail under load. It is that functional connectivity alone cannot prove that a network architecture provides adequate traffic isolation. Two configuration fields can determine whether the data plane and control plane remain independent under pressure.
-
一个真实的部署教训 考虑一个采用双网卡的三主机 GBase 数据库部署。最初,host 和 agent_host 都配置在业务网络子网中。功能测试通过,没有明显问题。然而,当工作负载达到测试负载的约 80% 时,开始出现间歇性的故障转移切换。日志显示心跳超时。在将 agent_host 更正为使用管理子网并重新安装集群后,问题消失了。重要的教训不是说每个单网卡配置在高负载下都会失败,而是说仅凭功能连通性并不能证明网络架构提供了足够的流量隔离。这两个配置字段决定了数据平面和控制平面在压力下是否能保持独立。
-
An Easy Way to Remember the Difference My mnemonic is simple:
- host: The address used for database instance-to-instance communication.
- agent_host: The address used by management components to communicate with the database cluster. GBase Database separates these two network planes to reduce interference between database workloads and cluster management traffic. Using the same address for both may be valid in a single-NIC deployment, but it deliberately gives up that separation. Two fields, two traffic planes, two different responsibilities. When designing a GBase Database(GBase 8c) cluster, network isolation should be considered before installation, not after the first heartbeat timeout.
- 记忆区别的简单方法 我的记忆口诀很简单:
- host:用于数据库实例间通信的地址。
- agent_host:管理组件用于与数据库集群通信的地址。 GBase 数据库分离这两个网络平面是为了减少数据库工作负载与集群管理流量之间的干扰。在单网卡部署中,两者使用同一个地址可能是合法的,但这等于主动放弃了这种隔离。两个字段,两个流量平面,两种不同的职责。在设计 GBase 数据库(GBase 8c)集群时,应在安装前考虑网络隔离,而不是等到第一次心跳超时之后。