Application Layer Protocols and Web Communication Short Notes for Gate Cs
Application Layer Protocols and Web Communication short notes for GATE CS: 4 study cards covering concepts, formulas, shortcuts and exam traps, plus solved pr
Application Layer Protocols and Web Communication short notes
Summary: DNS and Web Request Sequencing Checklist
Summary: DNS and Web Request Sequencing Checklist
Rapid Revision Checklist
DNS Default: Assume iterative resolution and empty caches unless specified.
DNS Pairs: Full resolution from host = 4 pairs (Host to Local, Local to Root, Local to TLD, Local to Auth). Resolver-only = 3 pairs.
TCP Handshake: Strictly SYN, then SYN-ACK, then ACK. Takes 1 RTT.
Application Layer: HTTP GET can only be sent after the TCP handshake is complete.
Directionality: "Leaving the computer" means excluding DNS Response and TCP SYN-ACK.
One HTTP request-response = 1 RTT (on existing connection)
Last-Minute Checklist Before Exam
Pre-Exam Verification
Conceptual Clarity
[ ] HTTP/1.0 creates new connections per object[ ] HTTP/1.1 keeps connections alive by default[ ] Pipelining sends requests without waiting[ ] HOL blocking is a pipelining limitation
Calculation Skills
[ ] Compute time for non-persistent connections[ ] Compute time for persistent non-pipelined[ ] Compute time for persistent pipelined[ ] Add DNS time when cache is empty
Quick Diagnostics
If stuck, ask: 1. How many objects? 2. Which HTTP version? 3. Is pipelining mentioned? 4. Is DNS cached? 5. What is the RTT value?
1 more card in this chapter
Try a question
Answer it here to see how it works. Nothing is recorded until you sign in.
Question 1
Level 1: Warm-up
Assertion (A): An HTTP GET request can only be sent by the host after the TCP three-way handshake is fully complete.
Reason (R): The TCP three-way handshake (SYN, SYN-ACK, ACK) is required to establish a reliable connection before any application layer data, such as HTTP, can be transmitted.
Question 2
Level 1: Warm-up
Which of the following statements is TRUE regarding the total number of DNS query-response pairs involved in completely resolving a domain name from a host with an empty cache using standard iterative resolution?
Question 3
Level 1: Warm-up
Which of the following statements is TRUE regarding the total page load time formula for a webpage with N objects using persistent, non-pipelined HTTP/1.1, assuming DNS resolution time is TDNS, RTT is R, and transmission time per object is Tt?
Question 4
Level 1: Warm-up
Rank the following events in the exact chronological order they occur when a browser fetches a webpage from scratch, assuming all caches are initially empty.
TCP ACK packet is sent by the host.
HTTP GET request is sent by the host.
DNS query is sent by the host.
TCP SYN packet is sent by the host.
Question 5
Level 1: Warm-up
Consider the following events when a browser fetches a webpage using an HTTP/1.1 persistent non-pipelined connection with all caches initially empty:
TCP SYN packet is sent by the host.
HTTP GET request is sent by the host.
DNS query is sent by the host.
TCP ACK packet is sent by the host.
If these events are arranged in strict chronological order of occurrence, the position (1 to 4) of the event 'HTTP GET request is sent by the host' is _________.
Question 6
Level 1: Warm-up
In a standard iterative DNS resolution process with an empty cache, what is the minimum number of query-response pairs the Local DNS server itself must generate to completely resolve a domain name?
Question 7
Level 1: Warm-up
For a webpage containing N objects, what is the maximum number of TCP handshakes that can be saved by using HTTP/1.1 persistent connections instead of HTTP/1.0 non-persistent connections, assuming no parallel connections are used?
Question 8
Level 1: Warm-up
Assertion (A): For a webpage with 1 base HTML file and 5 embedded images, using HTTP/1.1 persistent connections instead of HTTP/1.0 non-persistent connections saves exactly 500 ms if the RTT is 100 ms and transmission time is negligible.
Reason (R): HTTP/1.1 eliminates the need for 5 extra TCP handshakes, and each handshake costs 1 RTT.
Question 9
Level 1: Warm-up
In a recursive DNS resolution process initiated by a Local DNS server to a Root server, what is the minimum number of query-response pairs the Local DNS server itself must exchange with other DNS servers to completely resolve a domain name, assuming all caches are initially empty?
Question 10
Level 1: Warm-up
Which of the following statements is TRUE regarding persistent, pipelined HTTP/1.1 connections?
Free preview ends here
Login to view the complete short notes
Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.
Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.
Built around you, not around a syllabus PDF
Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.
Revision that hits your weak spots
We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.
Questions calibrated to the real exam
Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.
Notes written for recall, not for volume
Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.
One place for everything
Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.
Honest progress
No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.
Unlock the whole course
Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.
Application Layer Protocols and Web Communication Short Notes for GATE CS
Application Layer Protocols and Web Communication short notes for GATE CS: 4 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.
Summary: DNS and Web Request Sequencing Checklist
Summary: DNS and Web Request Sequencing Checklist
Rapid Revision Checklist
DNS Default: Assume iterative resolution and empty caches unless specified.
DNS Pairs: Full resolution from host = 4 pairs (Host to Local, Local to Root, Local to TLD, Local to Auth). Resolver-only = 3 pairs.
TCP Handshake: Strictly SYN, then SYN-ACK, then ACK. Takes 1 RTT.
Application Layer: HTTP GET can only be sent after the TCP handshake is complete.
Directionality: "Leaving the computer" means excluding DNS Response and TCP SYN-ACK.
One HTTP request-response = 1 RTT (on existing connection)
Last-Minute Checklist Before Exam
Pre-Exam Verification
Conceptual Clarity
[ ] HTTP/1.0 creates new connections per object[ ] HTTP/1.1 keeps connections alive by default[ ] Pipelining sends requests without waiting[ ] HOL blocking is a pipelining limitation
Calculation Skills
[ ] Compute time for non-persistent connections[ ] Compute time for persistent non-pipelined[ ] Compute time for persistent pipelined[ ] Add DNS time when cache is empty
Quick Diagnostics
If stuck, ask: 1. How many objects? 2. Which HTTP version? 3. Is pipelining mentioned? 4. Is DNS cached? 5. What is the RTT value?
Topic Revision Summary
Topic Revision Summary
Delivery Models: Unicast (1:1), Multicast (1:Many, specific group), Broadcast (1:All, local segment).
Primary Broadcast Trigger: Address uncertainty (the bootstrap problem, e.g., a client needing an IP address via DHCP).
Transport Constraint: Broadcast and Multicast must use connectionless transport (UDP). TCP is strictly 1:1.
Critical Distinction: ARP is a Link Layer broadcast protocol. DHCP is an Application Layer broadcast protocol.
Address Types: Limited broadcast (255.255.255.255) is never routed. Directed broadcast (e.g., 192.168.1.255) can be routed to the target subnet, then broadcast locally.
Exam Heuristic: "Zero-configuration" or "dynamic discovery" on a local network strongly implies a broadcast or multicast mechanism.
Application Layer Protocols and Web Communication: Solved Questions with Step-by-Step Explanations (10 Problems)
Question 1 · Computer NetworksMCQ
Assertion (A): An HTTP GET request can only be sent by the host after the TCP three-way handshake is fully complete.
Reason (R): The TCP three-way handshake (SYN, SYN-ACK, ACK) is required to establish a reliable connection before any application layer data, such as HTTP, can be transmitted.
A.
Both A and R are true, and R is the correct explanation of A.
B.
Both A and R are true, but R is NOT the correct explanation of A.
C.
A is true, but R is false.
D.
A is false, but R is true.
Correct Answer:
A
Step-by-Step Solution
Key idea: HTTP relies on TCP, and TCP requires a completed three-way handshake before data transmission.
Step 1: Evaluate Assertion (A): True. The HTTP GET request is an application layer message that requires a reliable TCP connection.
Step 2: Evaluate Reason (R): True. The TCP three-way handshake (SYN, SYN-ACK, ACK) establishes this reliable connection.
Step 3: Check the link: R correctly explains why A is true, because HTTP cannot be sent until the reliable connection is established.
Answer: Both A and R are true, and R is the correct explanation of A.
Question 2 · Computer NetworksMCQ
Which of the following statements is TRUE regarding the total number of DNS query-response pairs involved in completely resolving a domain name from a host with an empty cache using standard iterative resolution?
A.
Exactly 2 pairs are involved in total.
B.
Exactly 3 pairs are involved in total.
C.
Exactly 4 pairs are involved in total.
D.
Exactly 5 pairs are involved in total.
Correct Answer:
C
Step-by-Step Solution
Key idea: The total number of DNS query-response pairs from the host's perspective includes the host's query to the Local DNS server.
Step 1: Identify all pairs: Host to Local DNS (1), Local DNS to Root (2), Local DNS to TLD (3), Local DNS to Authoritative (4).
Step 2: Sum the pairs, which totals 4.
Answer: Exactly 4 pairs are involved in total.
Question 3 · Computer NetworksMCQ
Which of the following statements is TRUE regarding the total page load time formula for a webpage with N objects using persistent, non-pipelined HTTP/1.1, assuming DNS resolution time is TDNS, RTT is R, and transmission time per object is Tt?
A.
Ttotal=TDNS+2NimesR+NimesTt
B.
Ttotal=TDNS+R+Nimes(R+Tt)
C.
Ttotal=TDNS+2R+NimesTt
D.
Ttotal=TDNS+NimesR+NimesTt
Correct Answer:
B
Step-by-Step Solution
Key idea: Persistent, non-pipelined HTTP/1.1 requires 1 RTT for the initial handshake, plus N RTTs for the N request-response cycles.
Step 1: Identify the components: DNS time (TDNS), 1 handshake (R), and N objects each taking 1 RTT (R) plus transmission time (Tt).
Step 2: Combine the components: Ttotal=TDNS+R+N×(R+Tt).
Answer: Ttotal=TDNS+R+N×(R+Tt)
Question 4 · Computer NetworksMCQ
Rank the following events in the exact chronological order they occur when a browser fetches a webpage from scratch, assuming all caches are initially empty.
TCP ACK packet is sent by the host.
HTTP GET request is sent by the host.
DNS query is sent by the host.
TCP SYN packet is sent by the host.
A.
3, 1, 4, 2
B.
4, 3, 1, 2
C.
3, 4, 1, 2
D.
3, 4, 2, 1
Correct Answer:
C
Step-by-Step Solution
Key idea: The strict sequence is DNS resolution, followed by the TCP three-way handshake, followed by the HTTP request.
Step 1: DNS query (3) must happen first to resolve the domain name to an IP address.
Step 2: TCP SYN (4) is sent to initiate the connection to that resolved IP address.
Step 3: TCP ACK (1) is sent by the host to complete the three-way handshake (after receiving the server's SYN-ACK).
Step 4: HTTP GET request (2) can only be sent after the TCP connection is fully established.
Step 5: The correct chronological order is 3, 4, 1, 2.
Common trap: Students might incorrectly place the HTTP GET request before the TCP ACK, crossing the boundary of the handshake requirement.
Question 5 · Computer NetworksNAT
Consider the following events when a browser fetches a webpage using an HTTP/1.1 persistent non-pipelined connection with all caches initially empty:
TCP SYN packet is sent by the host.
HTTP GET request is sent by the host.
DNS query is sent by the host.
TCP ACK packet is sent by the host.
If these events are arranged in strict chronological order of occurrence, the position (1 to 4) of the event 'HTTP GET request is sent by the host' is _________.
Correct Answer:
4.00
Step-by-Step Solution
Key idea: The strict sequence is DNS resolution, followed by the TCP three-way handshake, followed by the HTTP request.
Step 1: DNS query (Event 3) must happen first to resolve the domain name to an IP address.
Step 2: TCP SYN (Event 1) is sent to initiate the connection to that resolved IP address.
Step 3: TCP ACK (Event 4) is sent by the host to complete the three-way handshake (after receiving the server's SYN-ACK).
Step 4: HTTP GET request (Event 2) can only be sent after the TCP connection is fully established.
Step 5: The chronological order is 3, 1, 4, 2. The position of the HTTP GET request is 4.
Common trap: Students might incorrectly place the HTTP GET request before the TCP ACK, violating the boundary of the handshake requirement.
Question 6 · Computer NetworksMCQ
In a standard iterative DNS resolution process with an empty cache, what is the minimum number of query-response pairs the Local DNS server itself must generate to completely resolve a domain name?
A.
1
B.
2
C.
3
D.
4
Correct Answer:
C
Step-by-Step Solution
Key idea: In iterative resolution, the Local DNS server queries the three hierarchical tiers sequentially.
Step 1: Identify the queries made by the Local DNS server: one to Root, one to TLD, and one to Authoritative.
Step 2: Count these query-response pairs, which totals 3.
Answer: 3
Question 7 · Computer NetworksMCQ
For a webpage containing N objects, what is the maximum number of TCP handshakes that can be saved by using HTTP/1.1 persistent connections instead of HTTP/1.0 non-persistent connections, assuming no parallel connections are used?
A.
N
B.
N−1
C.
N+1
D.
2N
Correct Answer:
B
Step-by-Step Solution
Key idea: HTTP/1.0 requires N handshakes for N objects, while HTTP/1.1 persistent requires only 1 handshake for all N objects.
Step 1: Calculate handshakes for HTTP/1.0: N handshakes.
Step 2: Calculate handshakes for HTTP/1.1 persistent: 1 handshake.
Step 3: Calculate savings: N−1 handshakes.
Answer: N−1
Question 8 · Computer NetworksMCQ
Assertion (A): For a webpage with 1 base HTML file and 5 embedded images, using HTTP/1.1 persistent connections instead of HTTP/1.0 non-persistent connections saves exactly 500 ms if the RTT is 100 ms and transmission time is negligible.
Reason (R): HTTP/1.1 eliminates the need for 5 extra TCP handshakes, and each handshake costs 1 RTT.
A.
Both A and R are true, and R is the correct explanation of A.
B.
Both A and R are true, but R is NOT the correct explanation of A.
C.
A is true, but R is false.
D.
A is false, but R is true.
Correct Answer:
A
Step-by-Step Solution
Key idea: The savings come directly from the eliminated handshakes.
Step 1: Evaluate Assertion (A): Total objects N=6. HTTP/1.0 takes 6×100 ms for handshakes. HTTP/1.1 takes 1×100 ms. Savings = 600−100=500 ms. (True)
Step 2: Evaluate Reason (R): HTTP/1.1 eliminates N−1=5 extra handshakes. Each handshake is 1 RTT (100 ms). 5×100=500 ms. (True)
Step 3: Check the link: R correctly explains the mathematical source of the savings stated in A.
Answer: Both A and R are true, and R is the correct explanation of A.
Question 9 · Computer NetworksMCQ
In a recursive DNS resolution process initiated by a Local DNS server to a Root server, what is the minimum number of query-response pairs the Local DNS server itself must exchange with other DNS servers to completely resolve a domain name, assuming all caches are initially empty?
A.
1
B.
2
C.
3
D.
4
Correct Answer:
A
Step-by-Step Solution
Key idea: In recursive resolution, the queried server takes on the entire burden of finding the final answer.
Step 1: The Local DNS server sends a single recursive query to the Root DNS server.
Step 2: The Root DNS server then queries the TLD server, which refers it to the Authoritative server. The Root server collects the final IP address and returns it directly to the Local DNS server.
Step 3: Therefore, the Local DNS server itself only exchanges exactly 1 query-response pair with other servers (the Root server).
Common trap: Students often ignore the "recursive" constraint and default to the iterative process, incorrectly choosing 3.
Question 10 · Computer NetworksMCQ
Which of the following statements is TRUE regarding persistent, pipelined HTTP/1.1 connections?
A.
Pipelining allows the server to send responses out of order to minimize head-of-line blocking.
B.
The client can send multiple HTTP requests consecutively, but the server must send the corresponding responses strictly in the order the requests were received.
C.
The client must wait for the server's acknowledgment of each request before sending the next request in the pipeline.
D.
Pipelining eliminates the need for the initial TCP three-way handshake.
Correct Answer:
B
Step-by-Step Solution
Key idea: HTTP/1.1 pipelining allows sending multiple requests without waiting, but responses must be sent in the exact same order to avoid head-of-line (HOL) blocking confusion.
Step 1: Pipelining means requests are sent back-to-back on a single persistent connection.
Step 2: The server processes them and must return responses in the same order. If response 1 is delayed, responses 2 and 3 wait behind it (this is Head-of-Line blocking).
Step 3: Option B correctly describes this constraint. Option A is false (that describes HTTP/2 multiplexing, not HTTP/1.1 pipelining). Option C describes non-pipelined behavior. Option D is false (a TCP handshake is always required before any HTTP data).