π Short Intro (Why Iβm Writing This)
Iβm currently learning Networking for DevOps and decided to learn in public by documenting my journey.
This blog is part of my Networking 101 series, where Iβm learning Networking for DevOps step by step from scratch.
This series is not written by an expert β itβs a beginner learning out loud, sharing:
- what I understand,
- what confuses me,
- and what I learn along the way.
The goal is to build consistency, clarity, and invite discussion.
π What This Blog Covers
In this post, Iβll cover:
- What is DNS?
- DNS Resolution flow
- DNS Caching
- TTL in DNS caching
- Common DNS Record types
π GitHub Repository
All my notes, diagrams, and learning resources for this series live here:
π GitHub Repo:
https://github.com/dmz-v-x/networking-for-devops-101
This repo is updated as I continue learning.
π Learning Notes
1. Quick recap (from earlier blogs)
From Part 1:
Computers do NOT understand domain names.
They only understand IP addresses.
DNS exists to translate:
myapp.com β 13.234.56.78
DNS happens before:
- TCP connection
- HTTPS
- Any application logic
If DNS fails, nothing else matters.
2. What actually happens during DNS resolution
When your browser wants to reach:
https://myapp.com
It asks:
βWhat IP address belongs to
myapp.com?β
But who does it ask?
3. DNS resolution flow (simplified)
Browser
β
OS DNS Cache
β
Local Resolver (ISP / 8.8.8.8 / 1.1.1.1)
β
Authoritative DNS Server
β
IP Address returned
DNS is distributed, not centralized.
This design makes DNS:
- Fast
- Scalable
- Cache-heavy (important!)
4. What is DNS caching?
To avoid repeating DNS lookups:
- Browsers cache results
- OS caches results
- DNS resolvers cache results
Each cached record has a TTL.
5. TTL β Time To Live
TTL tells DNS:
βHow long can I remember this answer?β
Example:
TTL = 300 seconds (5 minutes)
Meaning:
- DNS answer can be reused for 5 minutes
- No fresh lookup needed during this time
6. Real DevOps DNS failure example
Scenario:
- You update your server IP
- You update DNS record
- Some users still hit the old server
Why?
- Old IP is cached
- TTL hasnβt expired yet
DNS is eventually consistent, not instant.
7. Common DNS record types (DevOps must-know)
You do NOT need to know all DNS records.
These are enough.
7.1 A Record
Maps a domain to an IP address.
myapp.com β 13.234.56.78
7.2 CNAME Record
Maps one domain to another domain.
www.myapp.com β myapp.com
Used for:
- Aliases
- Load balancers
- Cloud services
7.3 TXT Record
Stores arbitrary text.
Used for:
- Domain verification
- SSL certificates
- Email security
Used often when working with cloud providers.
8. Why CNAMEs matter in DevOps
CNAMEs allow:
- Changing infrastructure without changing domains
- Blue/green deployments
- Easier migrations
Example:
app.mycompany.com β alb-123.aws.com
You update the load balancer β DNS stays same.
9. Common DNS debugging commands
9.1 Check DNS resolution
dig myapp.com
9.2 Use a specific DNS server
dig myapp.com @8.8.8.8
9.3 See only the IP
dig myapp.com +short
9.4 Using nslookup
nslookup myapp.com
10. Why DNS works for some users and not others
Because:
- Different users use different DNS resolvers
- Different caches expire at different times
- ISPs cache aggressively
This is normal DNS behavior, not a bug.
11. DNS vs TCP vs HTTP (clear separation)
| Layer | Failure Example |
|---|---|
| DNS | Domain not resolving |
| TCP | Connection refused |
| TLS | Certificate error |
| HTTP | 500 error |
| App | Logic bug |
Always identify which layer is failing.
12. Classic DevOps mistake
Mistake:
βDNS change didnβt work β letβs restart the server.β
Wrong.
DNS:
- Lives outside your server
- Is cached everywhere
- Needs time to propagate
Restarting apps wonβt fix DNS.
13. Mini hands-on exercise
Run:
dig google.com
Look at:
- ANSWER section
- TTL value
Run it again:
- Notice TTL decreases
Thatβs caching in action.
14. Mental model upgrade
Your updated flow:
Browser
β
DNS (cached or fresh)
β
IP + Port
β
TCP / UDP
β
Application
DNS is always first.
β Key takeaways
- DNS converts names β IPs
- DNS is cached everywhere
- TTL controls how long results live
- DNS issues look random but are predictable
- Debug DNS before touching servers
π¬ Feedback & Discussion
π‘ Iβd love your feedback!
If you notice:
- missing tool categories,
- incorrect assumptions,
- or better learning paths,
please comment below. Iβm here to learn.
β Support the Learning Journey
If you found this blog useful:
β Consider giving the GitHub repo a star β
it really motivates me to keep learning and sharing publicly.
π¦ Stay Updated (Twitter / X)
I share learning updates, notes, and progress regularly.
π Follow me on Twitter/X:
https://x.com/_himanshubhatt1
π Whatβs Next
In the next post, Iβll be covering:
π Subnets, CIDR & NAT
Iβll also continue updating the GitHub repo as I progress.
π Learning in public
π Repo: https://github.com/dmz-v-x/networking-for-devops-101
π¦ Twitter/X: https://x.com/_himanshubhatt1
π¬ Feedback welcome β please comment if anything feels off
β Star the repo if you find it useful
Top comments (0)