In Part 2, we saw hashing and B+ trees inside DynamoDB and RDS. This week is the topic every GATE aspirant has drawn a hundred times: the network layer stack. Let's follow one real request, typing a URL for a website hosted on AWS, and see which syllabus topic handles each step.
Step 1: DNS (application layer)
Before anything else, your browser needs an IP address. If it isn't cached, a recursive resolver walks the hierarchy we study for GATE: root servers, then the TLD servers (for .com ), then the authoritative name server for the domain.
On AWS, that authoritative server is often Amazon Route 53. It can also apply routing policies, such as returning the IP of the region closest to you (latency-based) or a backup if the main site is unhealthy (failover).
GATE link: DNS mostly uses UDP on port 53, falling back to TCP for large responses. That's a classic one-mark question.
Step 2: The nearest edge (CloudFront)
If the site uses Amazon CloudFront, DNS returns the address of a nearby edge location instead of the origin server far away. Your request travels a shorter distance, and cached content (images, CSS) is served straight from the edge.
That's the idea of caching and reducing round-trip time (RTT), applied to the whole internet.
Step 3: TCP handshake and TLS (transport layer and above)
Your browser opens a connection with the three-way handshake: SYN, SYN-ACK, ACK. Then TLS sets up encryption. With TLS 1.3, that takes one extra round trip.
Count the RTTs before the first byte of the page arrives, and you'll see why putting the edge closer to the user matters. It's the same RTT arithmetic from GATE numericals. CloudFront also supports HTTP/3, which runs over QUIC on UDP and combines the transport and encryption handshakes.
Step 4: Load balancing (layer 4 vs layer 7)
The request reaches a load balancer, and AWS offers both kinds from our OSI notes:
Load balancer | OSI layer | What it can see |
|---|
Network Load Balancer (NLB) | Layer 4 (transport) | IP addresses, TCP/UDP ports |
Application Load Balancer (ALB) | Layer 7 (application) | HTTP paths, headers, hostnames |
An ALB can send /api to one set of servers and /images to another, because it reads the HTTP request. An NLB can't, but it's very fast because it only looks at layer 4. If you've ever wondered why "which layer" questions matter, this is the answer.
Step 5: Inside the VPC (network layer)
Now the packet is inside a VPC, and more syllabus topics appear:
- Routing with longest prefix match: VPC route tables pick the most specific matching route, exactly like the router questions in GATE.
- Stateful vs stateless filtering: Security groups are stateful, so if a request is allowed in, the reply is automatically allowed out. Network ACLs are stateless, so you must allow both directions explicitly, including the return traffic's ephemeral ports.
- MTU and fragmentation: inside a VPC, instances can use jumbo frames (MTU 9001), but traffic leaving through the internet gateway is limited to 1500 bytes. That's the fragmentation and MTU chapter in real life.
Step 6: The response travels back
The server sends the HTML back through the same layers in reverse: the load balancer, then the edge, then TCP segments to your browser, which reassembles them in order using sequence numbers.
The whole journey on one line
DNS (Route 53) → edge (CloudFront) → TCP + TLS handshake → load balancer (layer 4 or 7) → VPC routing and filtering → server → back.
Every arrow is a topic from Computer Networks.
Try this GATE-style question
A security group allows inbound TCP on port 443. A network ACL on the same subnet allows inbound 443 but has no outbound rules. Will the website load? Explain using stateful vs stateless filtering.
Answer in the comments. I'll reply to everyone.
Next week, Part 4: deadlocks and concurrency. Race conditions in the cloud and how SQS and DynamoDB handle them.
Loading article