DEV Community

mmllllzcn
mmllllzcn

Posted on

TIL: GBase Database(GBase 8c) Port Configuration Across Three Deployment Topologies

The first time you examine the port configuration of GBase Database(GBase 8c), the numbers can look arbitrary: 20001, 2379, 6666, 5432, 15432, 15433, 20010, plus several proxy and agent ports.

But there is a pattern.

Once you understand which component uses each port and how the three official deployment topologies distribute those components, the port table becomes much easier to read.

The key is to classify ports by role first, then map them to individual hosts.

1. Understand the GBase Database Port Categories

The ports in a GBase Database deployment can be grouped into three categories: control plane, data plane, and agent management channels.

Control Plane Ports

The main control-plane components use the following ports:

Component Port Role
gha_server 20001 High-availability management
DCS 2379 Distributed coordination
GTM 6666 Global transaction management

These ports support cluster coordination and management.

Data Plane Ports

The main database access components use:

Component Port Role
CN 5432 Coordinator access
DN From 15432 Data node access

CN handles database connections, while DN instances provide the data storage and processing layer.

Proxy Ports

The proxy_port field appears in the minimal single-node and single-HA-group configuration examples.

The example values are:

Component Proxy Port
CN 6001
DN primary 7001
DN standby 17001

The default distributed configuration example does not contain a proxy_port field.

This is an important distinction: do not assume that every GBase Database topology uses the same configuration fields.

Agent Ports

Agent ports provide management communication channels for individual instances.

Their values vary between official topology examples. For instance:

  • Single-HA-group: GTM agent ports 36667 and 46667.
  • Default distributed: GTM agent ports 8001 and 8002.

Other instance agent ports must also be checked against the corresponding configuration example.

The important rule is to follow the port assignments for the selected topology rather than assuming that one example applies to all deployments.

2. Compare DN Ports Across the Three Deployment Topologies

The most noticeable differences between the three GBase Database(GBase 8c) layouts appear in DN port allocation.

Deployment Layout DN Ports Configuration Notes
Minimal single-node 15432 One DN instance; proxy port 7001
Single-HA-group 15432 Three replicas on different hosts; standby proxy port 17001
Default distributed 15432 / 15433 / 20010 Different DN groups and instance placements

In the default distributed example, the assignments are:

  • dn1_1: 15432
  • dn1_2: 15433
  • dn1_3: 15433
  • dn2: 20010

At first glance, using different ports for instances in the same DN group may look inconsistent.

The reason is host placement.

Instances running on different hosts can reuse the same listening port. Instances sharing a host need different ports to avoid conflicts.

Therefore, the port allocation must be understood together with the host-role distribution.

A port table is not just a list of numbers. It is a reflection of where database instances run.

3. Check Port Availability Before GBase Database Installation

Before installing GBase Database, check whether the required ports are already occupied.

A simple Linux command can scan the main candidate ports:

for p in 20001 2379 6666 5432 15432 15433 20010 6001 7001 17001; do
  ss -tlnp | grep -q ":$p " && echo "BUSY $p" || echo "free $p"
done
Enter fullscreen mode Exit fullscreen mode

This provides a quick preliminary check of TCP listening ports.

However, there are two limitations worth remembering:

  1. The command checks only the current host. Run it on every host involved in the deployment.
  2. It checks the listed TCP ports only. Additional agent ports and other required communication ports must also be included in the complete port validation.

A free port on one machine does not guarantee that the same port is free on another machine.

For multi-host GBase Database deployments, maintain a separate port availability report for each host.

4. Two Port Configuration Details That Are Easy to Miss

There are two common sources of configuration mistakes.

First: Agent ports are not identical across all topology examples.

The GTM agent ports illustrate this difference:

Deployment Layout GTM Agent Ports
Single-HA-group 36667 / 46667
Default distributed 8001 / 8002

Copying these values between configurations without checking the corresponding instance definitions can introduce conflicts.

Second: The default distributed example does not declare proxy_port.

The minimal and single-HA-group examples contain proxy_port, while the official default distributed example does not.

Do not add configuration fields from another topology simply because they appear familiar.

For GBase Database deployment, the configuration file must match the selected architecture and the requirements of the installed version.

5. Build a Host-Level Port Allocation Table

The most reliable way to plan GBase Database network ports is to combine the topology diagram with a host-level port allocation table.

For each host:

  1. List all assigned components and database instances.
  2. Record each service listening port.
  3. Record proxy and agent ports where applicable.
  4. Identify ports reused on different hosts.
  5. Check for duplicate listening ports on the same host.
  6. Verify the complete allocation against the official deployment configuration.

For example, a host running GTM primary, a CN instance, and a DN instance needs a port plan that accounts for all three roles.

The same principle applies when planning future expansion: understand which components share a host before assigning new ports.

This is much more reliable than memorizing a global list of port numbers.

Takeaway

The port configuration of GBase Database(GBase 8c) becomes easier to understand once you separate control-plane ports, data-plane ports, proxy ports, and agent management ports.

The three official deployment topologies do not use identical port configurations. DN port assignments, agent ports, and the presence of proxy_port all depend on the selected layout and component placement.

My rule is simple:

Confirm the deployment topology first, map every component to its host second, and allocate ports third.

A GBase Database port table is ultimately a projection of the host-role table. Get the host layout right, and port planning becomes much more predictable.

Have you ever encountered a database installation failure caused by a port conflict that could have been caught during infrastructure preparation?

Top comments (0)