Skip to content

Conversation

@aaron-congo
Copy link
Contributor

Description

  • as custom endpoints are used, monitor threads are created to monitor custom endpoint information
  • custom endpoint information is fetched using the RDS API, so users of the CustomEndpointPlugin need to have the boto3 AWS Python SDK
  • connections register their plugin services with a given monitor if they are connecting to that monitor's custom endpoint
  • when the monitor detects changes in custom endpoint information, it updates the custom endpoint information for all registered plugins
  • added new methods in PluginService to get/set allowed/blocked hosts according to custom endpoint information, and to fetch the current list of hosts that are allowed by the custom endpoint plugin. The failover and read/write plugin use this subset of hosts when deciding which host to switch to

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

@aaron-congo aaron-congo changed the title Custom endpoint Implement the Custom Endpoint Plugin Oct 31, 2024
Comment on lines +266 to +267
hostnames = [host_info.host for host_info in hosts]
if self._reader_host_info is not None and self._reader_host_info.host not in hostnames:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will hit this block whenever read_only is set to True. Are there performance concerns for this block? It is necessary to protect against the case where we have previously cached a reader instance connection but that reader instance was later removed from the custom endpoint. Without this check the read/write plugin would continue to use the cached reader connection to the now-blocked instance.

@aaron-congo aaron-congo merged commit 61f696e into main Nov 7, 2024
5 checks passed
@aaron-congo aaron-congo deleted the custom-endpoint branch November 7, 2024 22:58
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