Practice
Solution
Step 1: Start at local resolver
The browser asks the local resolver, which forwards to the recursive DNS server if cache is empty.Step 2: Recursive DNS server queries root server
The recursive server queries the root DNS server to find the TLD server for '.com'.Step 3: Recursive server queries TLD server
Root server directs to TLD server, which is then queried for 'example.com'.Step 4: Recursive server queries authoritative server
TLD server directs to authoritative DNS server for 'example.com', which returns the IP.Final Answer:
Option A -> Option AQuick Check:
Order matches DNS resolution hierarchy and recursive query flow -> correct
- Misplacing root server query after authoritative server
- Confusing order of recursive and root server queries
- Assuming local resolver queries root server directly
Solution
Step 1: Understand Long Polling mechanics
Client sends an HTTP request that the server holds open until new data is available.Step 2: Server response and client behavior
Once data is sent, the connection closes, and the client immediately sends a new request to wait for further updates.Step 3: Evaluate other options
Client opens a persistent connection; server pushes updates continuously without client requests describes WebSocket behavior. Client sends a request; server responds immediately with current data; client waits before sending another request misses the 'hold open' aspect, responding immediately regardless of data availability. Client sends a request; server responds with a stream of events over a single connection describes SSE.Final Answer:
Option D -> Option DQuick Check:
Long Polling = request held open until data -> response -> new request
- Confusing Long Polling with SSE or WebSocket persistent connections
- Assuming server pushes data without client requests in Long Polling
- Believing Long Polling responses are immediate regardless of data
Solution
Step 1: Recall PAT function
PAT maps multiple internal IP:port pairs to a single public IP with unique source ports.Step 2: Identify limitation
Since TCP/UDP ports are 16-bit, only ~65,000 ports are available per public IP, limiting simultaneous connections.Step 3: Analyze options
PAT can run out of available source ports, limiting the number of simultaneous connections correctly identifies port exhaustion. PAT requires a unique public IP per internal host, increasing IP address consumption is false; PAT uses one public IP for many hosts. PAT cannot translate destination IP addresses, so inbound connections are impossible is unrelated to PAT's outbound translation. PAT causes all internal hosts to share the same source port, causing packet collisions is false; PAT assigns unique ports to avoid collisions.Final Answer:
Option C -> Option CQuick Check:
PAT port exhaustion limits simultaneous connections [OK]
- Thinking PAT needs multiple public IPs
- Confusing PAT with DNAT limitations
- Believing PAT uses the same source port for all hosts
Solution
Step 1: Identify handshake latency cause
The handshake requires at least one full round-trip time (RTT) before data can be sent, introducing delay.Step 2: Analyze options
Because it requires multiple round-trip times before data transfer, causing delay in time-sensitive applications correctly states the latency due to multiple RTTs, which can be problematic for real-time or low-latency applications. Because it encrypts all packets during handshake, increasing processing time is incorrect; encryption is separate from handshake. Because it uses UDP packets which are slower than TCP packets is false; handshake uses TCP packets, not UDP. Because it requires the server to send data before the client can send any is incorrect; the client sends data after handshake completes.Final Answer:
Option A -> Option AQuick Check:
Handshake latency = multiple RTTs before data flow.
- Confusing handshake with encryption overhead
- Thinking handshake uses UDP packets
- Believing server sends data first
Solution
Step 1: Define stale-while-revalidate
This strategy serves stale content immediately after TTL expiry while asynchronously fetching fresh content.Step 2: User experience
User gets content without delay, improving perceived performance.Step 3: Background refresh
Edge server updates cache with fresh content once fetched.Step 4: Analyze other options
User request is blocked until fresh content is fetched from the origin server is incorrect because user is not blocked. Edge server returns an error indicating content is expired is false; no error is returned. User is redirected to the origin server to get fresh content is wrong; user is not redirected to origin.Final Answer:
Option A -> Option AQuick Check:
Stale-while-revalidate balances freshness and latency by serving stale content immediately.
- Assuming user waits for fresh content
- Thinking stale content causes errors
- Believing user is redirected to origin on expiry
