Skip to content

Commit

Permalink
Basic cleanup of release text
Browse files Browse the repository at this point in the history
Other cleanup tasks
First edit of Backup topic
  • Loading branch information
ebgitelman authored and drothery-edb committed Jun 23, 2023
1 parent 2f6090f commit fcb3ea3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions product_docs/docs/pgd/5/routing/raft/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ PGD manages its metadata using a Raft model where a top-level group spans all t
Raft is an industry-accepted algorithm for making decisions though achieving *consensus* from a group of separate nodes in a distributed system.
!!!

For certain operations in the top-level group, it's essential that a Raft leader must be both established and connected. Examples of these operations include adding and removing nodes and allocating ranges for [galloc](../../sequences/#pgd-global-sequences) sequences.
For certain operations in the top-level group, a Raft leader must be both established and connected. Examples of these operations include adding and removing nodes and allocating ranges for [galloc](../../sequences/#pgd-global-sequences) sequences.

It also means that an absolute majority of nodes in the top-level group (one half of them plus one) must be able to reach each other. So, in a top-level group with five nodes, at least three of the nodes must be reachable by each other to establish a Raft leader.

## Proxy routing

One function that also uses Raft is proxy routing. Proxy routing requires that the proxies can coordinate writing to a data node within their group of nodes. This data node is the write leader. If the write leader goes offline, the proxies need to be able to switch to a new write leader, selected by the data nodes, to maintain continuity for connected applications.
One function that also uses Raft is proxy routing. Proxy routing requires that the proxies can coordinate writing to a data node in their group of nodes. This data node is the write leader. If the write leader goes offline, the proxies need to be able to switch to a new write leader, selected by the data nodes, to maintain continuity for connected applications.

You can configure proxy routing on a per-node group basis in PGD 5, but the recommended configurations are *global* and *local* routing.

## Global routing

Global routing uses the top-level group to manage the proxy routing. All writable data nodes (not witness or subscribe-only nodes) in the group are eligible to become write leader for all proxies. Connections to proxies within the top-level group will be routed to data nodes within the top-level group.
Global routing uses the top-level group to manage the proxy routing. All writable data nodes (not witness or subscribe-only nodes) in the group are eligible to become write leader for all proxies. Connections to proxies in the top-level group are routed to data nodes in the top-level group.

With global routing, there's only one write leader for the entire top-level group.

## Local routing

Local routing uses subgroups, often mapped to locations, to manage the proxy routing within the subgroup. Local routing is often used for geographical separation of writes. It's important for them to continue routing even when the top-level consensus is lost.
Local routing uses subgroups, often mapped to locations, to manage the proxy routing in the subgroup. Local routing is often used for geographical separation of writes. It's important for them to continue routing even when the top-level consensus is lost.

That's because PGD allows queries and asynchronous data manipulation (DMLs) to work even when the top-level consensus is lost. But using the top-level consensus, as is the case with global routing, means that new write leaders can't be elected when that consensus is lost. Local groups can't rely on the top-level consensus without adding an independent consensus mechanism and its added complexity.

PGD 5 introduced subgroup Raft support to elegantly address this issue. Subgroup Raft support allows the subgroups in a PGD top-level group to elect the leaders they need independently. They do this by forming devolved Raft groups that can elect write leaders independent of other subgroups or the top-level Raft consensus. Connections to proxies in the subgroup then route to data nodes within the subgroup.
To elegantly address this, PGD 5 introduced subgroup Raft support. Supgroup Raft support allows the subgroups in a PGD top-level group to elect the leaders they need independently. They do this by forming devolved Raft groups that can elect write leaders independent of other subgroups or the top-level Raft consensus. Connections to proxies in the subgroup then route to data nodes in the subgroup.

With local routing, there's a write leader for each subgroup.

Expand Down

0 comments on commit fcb3ea3

Please sign in to comment.