🌐 Google Cloud DNS & Cloud CDN — Easy Notes
- Get link
- X
- Other Apps
🌐 Google Cloud DNS & Cloud CDN — Easy Notes
1. What is DNS?
DNS = Domain Name System
DNS converts a human-friendly hostname/domain name into an IP address.
Example:
www.google.com ↓ DNS 142.250.xxx.xxx
Think of DNS like your phone contacts:
"Rahul" → 9876543210 "google.com" → IP address
2. What is 8.8.8.8?
8.8.8.8 is Google's public DNS resolver.
Anyone on the internet can configure their device/network to use it for DNS lookups.
Example:
You → 8.8.8.8 → "What is the IP of google.com?" ↓ IP address
☁️ 3. What is Cloud DNS?
Cloud DNS is Google's managed DNS service for applications running on Google Cloud.
Suppose you deploy your application:
My Application ↓ Google Cloud ↓ External IP: 34.100.20.10
You don't want users to remember:
34.100.20.10
Instead, you want:
www.myapp.com
Cloud DNS helps connect:
www.myapp.com ↓ 34.100.20.10
Simple definition:
Cloud DNS = Google's managed service for storing and serving DNS records.
4. Why use Cloud DNS?
Google provides the DNS infrastructure, so you don't have to build and maintain your own DNS servers.
Important benefits:
- Low latency → DNS responses are fast.
- High availability → DNS continues working even if one location has problems.
- Global → DNS information is served from redundant locations around the world.
- Managed → Google handles the underlying DNS infrastructure.
- Programmable → You can manage DNS using:
- Google Cloud Console
- CLI
- API
🚀 5. What is Cloud CDN?
CDN = Content Delivery Network
The main idea is:
Keep copies of content closer to users so they can receive it faster.
Imagine your application server is in Mumbai, but your customer is in London.
Without CDN:
London User ↓ Internet ↓ Mumbai Server ↓ Content
The request has to travel a long distance.
With CDN:
London User ↓ London Edge Cache ↓ Content
Much faster. 🚀
📦 6. What is Edge Caching?
Edge caching means storing frequently requested content at servers located close to users.
For example, your website has:
logo.png style.css image.jpg JavaScript files videos
A user in Pune requests image.jpg.
The CDN can store a copy at a nearby edge location.
Next time another user nearby requests the same file:
User ↓ Nearby Edge Cache ↓ image.jpg
Instead of:
User ↓ Original Application Server ↓ image.jpg
⚡ 7. Benefits of Cloud CDN
Cloud CDN can provide:
Lower latency
Content is delivered from a location closer to the user.
Reduced origin-server load
Your original application server doesn't need to serve every request.
Without CDN: 1000 users ↓ 1000 requests ↓ Application Server With CDN: 1000 users ↓ CDN Edge Cache ↓ Application Server gets fewer requests
Potentially lower cost
Because fewer requests/data need to travel back to your origin infrastructure.
🔗 8. Cloud CDN + Application Load Balancer
This is an important point from the lesson.
You can enable Cloud CDN with an Application Load Balancer.
Think of the architecture like:
Users ↓ Cloud CDN ↓ Application Load Balancer ↓ Backend VMs
The CDN handles cached content, while the load balancer distributes requests to your backend.
🧠 Cloud DNS vs Cloud CDN
This is the most important distinction:
| Cloud DNS | Cloud CDN |
|---|---|
| Deals with names → IP addresses | Deals with content delivery |
| DNS service | Caching service |
myapp.com → IP | image.jpg → cached copy |
| Helps users find your application | Helps users receive content faster |
Easy memory trick:
DNS = "Where is my application?"
CDN = "Give me the content from somewhere closer."
🎯 Complete example
Suppose you have an e-commerce website:
shop.example.com
Step 1 — Cloud DNS
User enters:
shop.example.com
Cloud DNS helps resolve the hostname to the appropriate IP.
shop.example.com ↓ IP address ↓ Application Load Balancer
Step 2 — Cloud CDN
User requests:
product-image.jpg
If the image is already cached at a nearby edge location:
User ↓ Cloud CDN Edge ↓ product-image.jpg
No need to repeatedly fetch it from the backend.
Overall:
Internet Users / | \ ↓ ↓ ↓ CDN Edge CDN Edge CDN Edge \ | / ↓ ↓ ↓ Load Balancer ↓ Backend VMs
Cloud DNS helps users find the application.
Cloud CDN helps deliver cached content faster.
- Get link
- X
- Other Apps
Comments
Post a Comment