Using the same DNS name for all instances in an ASG?
vroad opened this issue · 1 comments
Could we omit instance id from DNS name template, and use this module just as a way to create a DNS record to access nodes in ASG with stable DNS name? For example,
asg-test-someuniquename.asg-handler-vpc.testing@Z3QP9GZSRL8IVA
instead of
asg-test-#instanceid.asg-handler-vpc.testing@Z3QP9GZSRL8IVA
Since all nodes in ASG has the same name, this could also be used as a less expensive alternative to load balancers. It's useful at least for development environments, where long DNS propagation time don't matter much.
set identifier could be used to create/delete multiple A records for the same DNS name.
I'm afraid to say we've collectively decided against officially supporting this for various reasons:
- Round Robin DNS doesn't exist within AWS, at least not without a Load Balancer (which this idea aims to avoid using)
- Simple DNS routing for multiple addresses will more or less return a random address which is not load balancing
- The best way we could come up with to implement this would be using a lambda that runs every 10 seconds (or whatever short TTL is decided to use) to cycle the records, which, for the lack of better words, is a hacky solution we do not feel comfortable integrating into the official module and supporting
- Creating an ingress proxy service (nginx, etc.) would also work, but would be an application utilizing the ASG and should not be part of this module as it's not within the infrastructure level
If users would like to have this feature as part of the stack, they could create this themselves, but we do not see this as a pressing need for a mass number of users as this sort of use case is best suited for a Load Balancer. As mentioned, there are some alternatives users could explore to attempt to save costs, though our desire is not to support replacing a true Load Balancer service with this solution.