Skip to content

chore: gdb regions - #1266

Merged
karenc-bq merged 3 commits into
chore/initial-strategy-plugin-asyncfrom
chore/gdb-aws-region
Aug 14, 2026
Merged

chore: gdb regions#1266
karenc-bq merged 3 commits into
chore/initial-strategy-plugin-asyncfrom
chore/gdb-aws-region

Conversation

@karenc-bq

@karenc-bq karenc-bq commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add support for restricting Aurora Global Database operations to a subset of accessible AWS regions (gdb_accessible_regions)
  • Add configurable monitoring connection priority for the topology monitor (monitoring_connection_priority, gdb_monitoring_connection_priority)
  • Wire panic-mode exit via reader-consensus / harvested connections when the writer is in an inaccessible region

Description

  • GdbFailoverPlugin — failover candidates are filtered by accessible regions. In strict-writer mode, failover fails fast if the writer is in a non-accessible region.

  • GdbReadWriteSplittingPlugin — writer connections to non-accessible regions are rejected. Reader candidates are filtered before applying home-region restrictions.

  • GlobalAuroraTopologyMonitor — topology monitoring host workers skip non-accessible regions. The initial host's region is validated and the monitor fails fast if it is not accessible. When the writer is unreachable, the monitor exits panic mode by adopting harvested reader connections (stable-reader-topology consensus).

  • AuroraInitialConnectionStrategyPlugin — host candidates are filtered by accessible regions before strategy-based selection. Filtering is delegated to the dialect via DatabaseDialect.filter_available_hosts(hosts, accessible_regions), which is a no-op for non-Global dialects and an actual region filter for GlobalAuroraMysqlDialect and GlobalAuroraPgDialect.

    Both GdbFailoverPlugin and GdbReadWriteSplittingPlugin validate at initialization that the configured home region is included in the accessible regions list when both are specified.

    New configuration parameter monitoring_connection_priority

    Comma-separated ordered list of priorities for the topology monitoring connection: strict-writer, strict-reader, writer-or-reader. Default is strict-writer. The monitor accepts any connection initially and asynchronously upgrades to a higher-priority host without blocking the monitoring loop.

    New configuration parameter gdb_monitoring_connection_priority

    GDB-specific extension supporting region-aware values: strict-writer-primary, strict-reader-primary, strict-reader-secondary, strict-writer-<region>, strict-reader-<region>, and plain <region> (any host in that region). Default is strict-writer-primary.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karenc-bq
karenc-bq force-pushed the chore/gdb-aws-region branch 2 times, most recently from 5ef1cc3 to fca73dc Compare August 6, 2026 01:53
Comment thread aws_advanced_python_wrapper/utils/properties.py Outdated
Comment thread aws_advanced_python_wrapper/cluster_topology_monitor.py Outdated
Comment thread aws_advanced_python_wrapper/cluster_topology_monitor.py Outdated
Comment thread aws_advanced_python_wrapper/cluster_topology_monitor.py Outdated
Comment thread aws_advanced_python_wrapper/cluster_topology_monitor.py Outdated
Comment thread aws_advanced_python_wrapper/cluster_topology_monitor.py Outdated
Comment thread aws_advanced_python_wrapper/cluster_topology_monitor.py Outdated
Comment thread aws_advanced_python_wrapper/cluster_topology_monitor.py Outdated
def prepare_conn_props(self, props: Properties):
...

def filter_available_hosts(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment to my previous review: I'm curious about the best location for this logic - seems to be quite a bit of duplicated logic around filtering available hosts

Comment thread docs/using-the-python-wrapper/using-plugins/UsingGlobalAuroraAccessibleRegions.md Outdated
@karenc-bq
karenc-bq force-pushed the chore/gdb-aws-region branch from fca73dc to a7f40e0 Compare August 12, 2026 00:24
@karenc-bq
karenc-bq force-pushed the chore/gdb-aws-region branch from a7f40e0 to 9cd802b Compare August 12, 2026 15:17
Co-authored-by: Sophia Chu <112967780+sophia-bq@users.noreply.github.com>
@karenc-bq
karenc-bq merged commit 0467307 into main Aug 14, 2026
9 checks passed
@karenc-bq
karenc-bq deleted the chore/gdb-aws-region branch August 14, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants