In the first post of this two part series we saw what Amazon Aurora Auto Scaling is and how to take full advantage of it. In this second and last part of the series we are focusing on Custom Endpoints, how they work and if it’s a good idea to use them simultaneously with Readers Auto Scaling. Let’s go.
In an Amazon Aurora cluster, the use of endpoints allows you to map each connection with a set of instances. By default, each Amazon Aurora cluster includes 2 predefined endpoints.
- Writer Endpoint: Points to the instance that currently has the Writer role in the cluster.
- Reader Endpoint: Points to the instance or instances that currently have the Reader role in the cluster.
In addition AWS allows the creation of custom endpoints in which you can specify a discrete set of instances to include.
How it works
Custom Endpoints can be of three types. READER, WRITER or ANY. Each type can only contain instances that have the corresponding role.
It is important to know that when changes occur in the configuration of Custom Endpoints, the active connections on the instances are not interrupted or altered. Therefore, changes that occur in an endpoint, for example when an instance is added or removed, only have an effect on new connections that are made from that moment.
A Custom Endpoint can be defined by an inclusion list or an exclusion list. You can only have one list type for each Custom Endpoint. Instances included in such lists are included or excluded from the endpoint regardless of whether the role of the instance matches the custom endpoint type.
When an inclusion list is defined (whitelist), only those instances indicated in it are included in the endpoint. Any new instances created since then will also remain outside the endpoint.
However, for exclusion lists (blacklist) only those instances included in the list will be excluded from the endpoint. Any other unspecified instances as well as instances that are created from that moment on will be included in the endpoint.
For more information on using Custom Endpoints see Amazon Aurora connection management.
Simultaneous use of Readers Auto Scaling and Custom Endpoints.
As we can see in the section on Readers Auto Scaling, although through custom endpoints it is possible to create a subset of read instances that are accessed only for a specific purpose and, this way, do not affect the rest of instances in the cluster, it is not possible to configure Auto Scaling metrics that measure only a subset of instances. These metrics will always measure all instances with a READER role. Any massive access to only one of the instances will have an effect on the average of the whole set and therefore influence the scaling of the cluster.
Therefore, the final conclusion is that the use of both technologies combined does not allow to solve the problem that has been initially raised.
All in all, Amazon Aurora Auto Scaling and Custom Endpoints are useful capabilities that ease the burden of running analytics workloads over transactional databases without impacting the applications.
Imagen: Unsplash | Uriel SC