Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Chris Jones9,385 Points
DNS - Suggestions/recommendations on TTL
Just watched the DNS video series - very good! One thing I was hoping would be covered in more detail was TTL. This is a topic I seem to revisit every year.
In my latest domain template, I've gone for a very low TTL. I understand that higher is better for live sites so there's less lookups but I have found this lower TTL nicer to work with when you need to make a DNS change quickly. Most of my sites are small businesses, low traffic (5000 visitors or less per month) so I don't think this is a big issue.
If we are talking in general, what are your preferred TTL values? Does anyone have a setup that they think strikes a good balance between lookups and flexibility?
Below is my DNS setup for most sites if they don't use Google Apps:
Refresh: 7200 Retry: 900 Expire: 1209600 Minimum TTL: 300
My simple domain template looks something like this:
<domainname> A 220.127.116.11 TTL 3600 <domainname> A 18.104.22.168 TTL 3600 ftp.<domainname> CNAME <domainname>. TTL 14400 www.<domainname> CNAME <domainname>. TTL 14400 <domainname> MX <domainname> TTL 3600 <domainname> TXT ie SPF TTL 3600
Looking forward to reading other people's DNS / TTL setups and suggestions.
Thank you, Chris.
Alan Johnson7,625 Points
I've typically done super low TTLs on personal sites (60s or so), but on larger apps I usually set up a higher TTL.
On larger sites (like Treehouse!), there's usually a good bit of planning going on with DNS changes anyway, so we'll usually turn the TTL down low before a change (at least the current TTL amount of time before the change, but ideally 2-3x as long as the current TTL) and then make the change, and then crank the TTL back up afterward.