Failover when an AWS Aurora cluster is renamed

I would like to use ProxySQL as a proxy between my app and an AWS Aurora cluster.

However, there is 1 case I would like to support (at least with manual updates in ProxySQL config) for my setup and to avoid downtime.
Aurora clusters have an endpoint based on their name. For example:
CLUSTER_NAME.cluster-UNIQUE_ACCOUNT_ID.REGION.rds.amazonaws.com

That means when a cluster is renamed, the endpoint is also updated.

To resolve this issue, I think I could add the future endpoint in the same hostgroup.
However, that means multiple things:

  • The weight would be 0 (and so I would have to update it manually which would lead into multiple requests fails)
  • ProxySQL would detect it as offline until the endpoint is not updated and so the older endpoint could stop working before the new one is online

Another way, could be to have a failover hostgroup when the primary one fails. However I didn’t find anything about this in the documentation. How could I achieve it?

Do you have more ideas for my issue?

Thanks in advance

2 Likes

I finally found a way to achieve my need.

On Aurora, you can create custom endpoints which will not change even if you rename the cluster.
Then you can use it as your proxy target.

Be aware if you create the endpoint through API, you cannot setup it to attach future started instances and so it can’t works with readers auto scaling. However you can setup it through the AWS Console.

1 Like