Computer Networking & System Design For DevOps in OneShot
Chapter: Network Routing, Traceroute Hops, and CDN Caching Architecture
This chapter explores how data packets traverse the global internet from a source client to a destination server. It details the practical mechanics of IP resolution, path tracing (traceroute), network hops, geographical routing challenges over submarine fiber-optic cables, and how Content Delivery Networks (CDNs) utilize edge caching to minimize latency.
1. Network Path Traversal & Target IP Resolution
When a client or cloud instance initiates a connection to a domain (e.g., trainwithshubham.com), the operating system must first resolve the human-readable domain name into an IP address.
Once the destination IP is resolved, network packets do not travel instantaneously in a single direct line. Instead, they pass through multiple interconnected network devices—such as routers, switches, and gateway infrastructure—across global transit networks.
2. Mechanics of Network Hops (traceroute)
A hop occurs whenever an IP packet is passed from one intermediate network device (router or switch) to another along its path to the final destination.
What traceroute Does
The traceroute utility diagnoses the exact network path taken by packets. It uses the Time-To-Live (TTL) field in the IP header, incrementing it with each set of packets sent. Every intermediate router that drops a packet due to an expired TTL sends back an ICMP Time Exceeded message, revealing its IP address and latency.
# Executing traceroute to a target domain
traceroute trainwithshubham.com
Sample Traceroute Execution Flow
3. IP Geolocation and Infrastructure Inspection
By capturing IP addresses from individual hops in a traceroute execution, DevOps engineers can trace the physical movement of data across global regions.
Real-World Inspection Workflow
- Execute
traceroute <target-domain>. - Extract the intermediate IP addresses output by each hop.
- Query an IP Geolocation database or lookup tool to determine:
- Autonomous System Number (ASN) (e.g., Amazon Technologies, Cloudflare, Google).
- Geographic Location (e.g., Seattle, WA, USA; Frankfurt, DE; Mumbai, IN).
- ISP / Cloud Network Owner.
Note: Intermediate IPs starting with private or internal ranges (e.g.,
172.16.x.xto172.31.x.xor10.x.x.x) represent private cloud VPC subnets and will not return public geolocation data.
4. Packet Loss, Timeouts, and Route Reliability
During a traceroute diagnostic, certain hops may display asterisks (* * *) instead of round-trip time (RTT) measurements.
5 242.5.91.7 2.123 ms 2.011 ms 1.988 ms
6 * * *
7 * * *
8 142.250.X.X 12.451 ms 12.330 ms 12.210 ms
Causes of Asterisk (* * *) Indicators
- ICMP Filtering / Firewalls: Security policies on intermediate routers frequently drop low-priority ICMP time-exceeded probes or rate-limit them to prevent reconnaissance.
- Packet Loss: Network congestion or degraded physical links can cause dropped packets.
- Routing Asymmetry: The forward path to the destination may differ from the return path back to the source client.
The total round-trip latency () across hops is the cumulative sum of processing delay (), queuing delay (), and propagation delay ():
5. Geographic Distance and Submarine Fiber Cables
Data transmitted across global regions travels as optical signals through physical underwater submarine cables.
[Client in Pune / India]
|
| (Submarine Cable Routing via Middle East / Dubai Transit)
v
[Origin Server in Oregon / USA]
The Latency Problem
Because light in optical fiber travels at approximately (about two-thirds the speed of light in a vacuum), physical distance introduces unskippable lower bounds on round-trip latency.
- Physical Distance () from India to US West Coast:
- Propagation Time () one-way:
- Minimum theoretical Round-Trip Time ():
In practice, due to intermediate switching, buffer queuing, and indirect cable paths, real-world RTTs frequently exceed .
6. Content Delivery Networks (CDNs) & Content Types
To bypass physical distance constraints, infrastructure architects separate application data into Dynamic Data and Static Data.
Real-Life Analogy
The International Warehouse vs. Local Retail Store
If every customer in India ordering a product had to ship it directly from a factory in Oregon, USA, shipping would take weeks (high latency).
To solve this, the manufacturer keeps the primary design factory in Oregon (Origin Server), but places local fulfillment hubs in key regional hubs like Dubai or Mumbai (Edge Locations / CDN). When customers request static goods (popular products/images), the local warehouse delivers them instantly without querying Oregon.
Static vs. Dynamic Content Handling
7. Edge Caching Architecture
A Content Delivery Network (CDN) consists of a globally distributed network of proxy servers (Edge Locations) that cache static assets close to end users.
Edge Caching Workflow
Cache Headers Configuration Example
When serving static assets, the origin server sends HTTP headers directing CDN edge proxies how long to store the asset:
HTTP/1.1 200 OK
Content-Type: image/png
Content-Length: 45021
Cache-Control: public, max-age=31536000, immutable
ETag: "64a-5f82c2a938c00"
8. Complete Request Routing Comparison
Path A: Direct Origin Request (No CDN)
Browser (India)
|
| (Traverses 15-20 Hops via Global Internet & Submarine Cables)
v
Origin Server (Oregon, USA)
|
| Process Request & Read Disk/Database
v
Browser receives response (RTT ~ 280ms)
Path B: Edge Cached Request (With CDN)
Browser (India)
|
| (Traverses 2-3 Hops to Closest Anycast Edge IP)
v
CDN Edge Node (Mumbai / Dubai)
|
| Validates Cache & Serves Direct Response
v
Browser receives response (RTT ~ 15ms)
9. Comparative Synthesis: Routing Strategies
10. Summary and Key Takeaways
- IP Address Resolution: Domain names map to distinct destination IP addresses; network diagnostic tools like
tracerouteexpose the exact hop-by-hop transit path to those IPs. - Network Hops: A hop represents each intermediate router or switch that forwards an IP packet. Each hop adds latency and introduces potential points of packet loss.
- Time-To-Live (TTL):
tracerouterelies on incrementally raising the IP TTL field to force intermediate routers to returnICMP Time Exceededpackets. - Physical Latency Limits: Submarine fiber-optic cables carry cross-continental traffic. Geographic distance imposes hard physical speed-of-light limits on round-trip latency.
- Asterisk Handling (
* * *): Missing output during traceroutes usually indicates intermediate security filtering, ICMP rate-limiting, or packet drop policies on provider backbones. - Content Delivery Networks (CDNs): CDNs mitigate geographic latency by serving static resources (images, JS, CSS) directly from edge servers physically close to end users.
- Cache Hit vs. Miss: Edge locations evaluate requests locally; a cache hit returns response data in , whereas a cache miss forces a full round-trip back to the origin server.