[Django]-Nginx takes too long to send the network response using Django with Gunicorn

3πŸ‘

βœ…

Do you realise there are 2 A records for your domain name?

$ dig lodugo.com
...
;; ANSWER SECTION:
lodugo.com.             1308    IN      A       192.64.119.241
lodugo.com.             1308    IN      A       45.56.114.74

DNS servers will respond with each IP address in turn. I suspect that only one of the addresses is correct so there is a 50% chance of getting a bad address that will eventually timeout, and then may retry.

This fits with what I have seen – Often taking a long time to connect, but once you hit the right address that will give fast responses until the DNS record reaches the end of it’s TTL. At that point you have a 50% chance again.

πŸ‘€Mark Bailey

Leave a comment