Optimizing subscriber-only groups v5.6

With PGD 5.6 and later, the topology of subscriber-only groups can be optimized.

For clusters using groups for their data nodes, subscriber only groups can use a more efficient model which uses a group leader, similar to a write leader in PGD Proxies.

Each subscriber-only group then has a node which replicates changes to the other subscriber-only nodes in its group. We refer to this node as the group leader. The group leader acts as a replication proxy for incoming changes.

You can't enable this model if a cluster has any of the following:

  • Data-nodes which are directly members of the top-level group.
  • No data-node sub-groups.
  • No data-node sub-groups with proxy routing enabled.

If this is the case, the nodes in a subscriber only groups automatically revert to the full mesh topology.

To get the benefit of the new SO group and node replication, you must have your data-nodes in subgroups, with proxy routing enabled on the sub groups.

Subscriber-only group leaders

With PGD 5.6 and later, each subscriber-only group gets assigned a group leader of its own. This is because subscriber-only groups don't have a group Raft consensus mechanism of their own. Instead, the cluster’s top level group uses its Raft consensus mechanism to handle selection of each subscriber-only group’s group leader.

Group leaders in subscriber-only groups are regularly tested for connectivity and if unavailable, the voting nodes of top-level group select a new subscriber-only node from the subscriber-only group to become group leader. This decision is announced to the whole cluster and data group's write leaders then replicate data to this newly selected group leader node.

The Subscriber-Only node and group form the building block for PGD tree topologies.

In this optimized topology, a small number of fully active nodes, the write leaders of the data groups, replicate changes to the group leaders of subscriber-only groups, these group leaders then replicate changes to the other members of its subscriber-only group.

This approach avoids the explosion of connections that can happen when there are large numbers of SO nodes and reduces the amount of replication traffic.

Enabling the optimized model

By default, PGD 5.6 forces the full mesh topology. This means the optimization described here is turned off. To enable the optimized topology, you must have your data-nodes in subgroups, with proxy routing enabled on the sub groups. You can then set the GUC bdr.force_full_mesh to false to allow the optimization to take effect.