Route 53 - TTL/CNAME vs Alias Flashcards
What does TTL stand for in DNS?
TTL stands for Time To Live, which defines how long a DNS record is cached by clients or resolvers.
How does TTL work in DNS caching?
TTL instructs clients to cache a DNS response for a specified duration, reducing the need for repeated DNS queries within that period.
What happens if a DNS record has a high TTL?
A high TTL (e.g., 24 hours) reduces DNS traffic but can lead to outdated records being cached for longer periods if changes are made.
What are the implications of setting a low TTL?
A low TTL (e.g., 60 seconds) ensures records update faster but increases DNS traffic and costs.
What strategy can be used when planning to change a DNS record?
Decrease the TTL in advance to ensure clients receive updates quickly, then make the change and later increase the TTL back to its original value.
Is TTL mandatory for all DNS record types in Route 53?
Yes, TTL is mandatory for all records except Alias records.
What happens if a client tries to access a cached DNS record after the TTL expires?
The client queries the DNS system again to retrieve the updated record.
What command can you use to query a DNS record and observe its TTL?
The dig command can be used to query a DNS record and display its TTL.
What is a practical use of nslookup in testing DNS records?
The nslookup command can verify that a DNS record resolves to the correct IP address.
How does a change in a DNS record propagate with respect to TTL?
Changes take effect after the TTL of the cached records expires, prompting clients to fetch the updated record.
What does a “120 seconds” TTL mean for a DNS record?
It means the record will be cached for 120 seconds before clients must query the DNS again for updates.
What is the purpose of setting a TTL for DNS records?
TTL helps balance between reducing DNS traffic and ensuring records are up-to-date for clients.
What is a CNAME record in DNS?
A CNAME record maps one domain name to another domain name. For example, app.mydomain.com can point to blabla.anything.com.
Can CNAME records be used at the apex of a DNS zone?
No, CNAME records cannot be used at the zone apex (e.g., mydomain.com).
What is an Alias record in AWS Route 53?
An Alias record maps a domain name to an AWS resource, such as an ELB, CloudFront distribution, or S3 website.