We have an Android app that is periodically sending data to our backend server via url panel-lb-ext.unolo.com.
Sometimes, we have Android devices that are unable to connect to our backend because of a dns lookup failure:
20220701_091732:AppDataRepository:Root cause while running upload task:Unable to resolve host "apollo-lb-ext.unolo.com": No address associated with hostname
This url is configured in AWS Route 53 to point to an application load balancer. The TTL is configured as 60 seconds and I don't have the ability to change that value. Route 53 will want to keep it short so that in case of a failure in any one of the targets, the time duration to pick up a new server is short.
Here is the dig output for reference:
dig a apollo-lb-ext.unolo.com
; <<>> DiG 9.16.1-Ubuntu <<>> a apollo-lb-ext.unolo.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20375 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 65494 ;; QUESTION SECTION: ;apollo-lb-ext.unolo.com. IN A
;; ANSWER SECTION: apollo-lb-ext.unolo.com. 60 IN A 13.235.199.252 apollo-lb-ext.unolo.com. 60 IN A 3.108.34.182 apollo-lb-ext.unolo.com. 60 IN A 15.206.49.163
;; Query time: 100 msec ;; SERVER: 127.0.0.53#53(127.0.0.53) ;; WHEN: Sat Jul 02 12:58:09 IST 2022 ;; MSG SIZE rcvd: 100
What can I do to reduce the changes of temporary DNS lookup resolution failure on these Android devices? I have listed some thoughts below but I need outside counsel to help me go on the right path:
- I could try looking to increase the TTL on the DNS record but this would mean that in case of failover then I run the risk of increased failover time.
- EC2 Load balancers come with something called "Global accelerators" which "Create an accelerator to get static IP addresses that act as a global fixed entry point to your load balancers in a single or multiple AWS Regions". The only reason I would consider using this is that it comes with a static ip address. As inflexible as a static ip address is, I would consider it if it helps stop these DNS errors.
Any other thoughts would be much appreciated.dns