Skip to content

Networking and Edge: recap and quiz

  1. DNS. A name becomes an address by following delegations from the root, a cache removes round trips, and a time to live trades fewer lookups against slower changes.
  2. TCP and UDP. TCP gives a reliable ordered stream and costs a round trip to set up, UDP gives datagrams and promises nothing, and a loss holds back everything behind it in TCP.
  3. TLS handshakes. A secure connection costs round trips, two for TLS 1.2, one for TLS 1.3 and one for QUIC including the transport, and 0-RTT trades one more round trip for the risk of replay.
  4. HTTP versions. HTTP/1.1 sends one request at a time and uses several connections, HTTP/2 shares one TCP connection among streams, and HTTP/3 does so over QUIC without stalling every stream on a loss.
  5. Connection pooling. A connection costs round trips to open and nothing to reuse, a pool is sized by Little’s Law, and an idle connection can be closed by the other side.
  6. CDNs, edge caching and anycast. An edge hit costs one short round trip, a miss adds the trip to the origin, the hit rate sets both the average and the origin’s load, the short connection helps even a miss, and anycast routes a client to a nearby site but can break a connection if routing changes.
Idea The common mistake The correction
DNS Forgetting that a lookup is a dependency, or that a lower TTL helps at once Count its round trips, and lower the TTL one old TTL before a change
TCP Treating the connection as free One round trip before data, and a loss holds back what is behind it
TLS Blaming the cryptography The cost is round trips: 4, 3 or 2 in all with TLS 1.2, TLS 1.3 or QUIC
HTTP versions Assuming a newer version always wins Each trades handshakes, connections and loss behaviour, and the gain grows with distance
Connection reuse Opening a connection per request Pay the handshake once, and size the pool for the slow case
CDN Looking only at the hit The average is the hit rate’s mix, and a cold edge sends everything to the origin
Anycast Using it for long connections without checking routing It suits short exchanges, and a routing change breaks a connection

“It is slow because it is far” is not a diagnosis. Count round trips.

  1. Which round-trip time? To the edge, or to the origin. The floor is distance ÷ 100 ms.
  2. What is paid to start? DNS if nothing is cached: the device’s own round trip and up to three to the servers. Then TCP: one. Then TLS: one for TLS 1.3, two for TLS 1.2, none extra for QUIC.
  3. Is the connection reused? If it is, the request costs one round trip and the server’s time.
  4. Is the answer in a cache? A hit costs the round trip to the edge. A miss adds the edge’s trip to the origin and the origin’s time.
  5. What does a loss cost? With TCP, at least a round trip for every stream on the connection. With QUIC, for the streams it carried.

Eight questions cover the whole module. Every option is explained, whether it is right or wrong.

Networking and Edge: module quiz

This quiz needs JavaScript to check your answers.

Question 1 of 8

A resolver has nothing cached. It is 20 ms from the device, and 50 ms from each DNS server. To resolve a name it asks the root server, then the .com server, then the authoritative server, and then answers the device.

How long does the lookup take, in milliseconds?

Enter a number and choose its unit.

milliseconds
Question 2 of 8

A record has a time to live of 24 hours. At noon, the team changes the address it points to.

What is the longest that a resolver can keep handing out the old address, if it respects the TTL?

Choose one answer.

Question 3 of 8

A client opens a new connection over TCP with TLS 1.3 to a server 100 ms away by round trip. The server answers the request instantly.

How long until the response arrives, in milliseconds?

Enter a number and choose its unit.

milliseconds
Question 4 of 8

A page loads 30 resources as 30 streams on one HTTP/2 connection. One TCP segment is lost.

What happens to the streams, and how does HTTP/3 differ?

Choose one answer.

Question 5 of 8

A client makes 10 requests to a server one after the other, over TCP with TLS 1.3. The round-trip time is 50 ms and the server answers instantly. All 10 requests use one connection that stays open.

How long until the tenth response arrives, in milliseconds?

Enter a number and choose its unit.

milliseconds
Question 6 of 8

An edge hit takes 20 ms and an edge miss takes 190 ms. The edge has 95% of the requested objects in its cache.

What is the average time, in milliseconds?

Enter a number and choose its unit.

milliseconds
Question 7 of 8

Which statements about Cache-Control and shared caches are correct?

Choose every answer that applies.

Question 8 of 8

A service announces one anycast address from sites on four continents. What chooses the site that a client's packets reach?

Choose one answer.

The next module, Capacity Estimation, turns to a different question about the same system: how much of it is needed. You have seen that a request has a time. Next it gets a number: how many requests per second, how much to store, how much bandwidth, and what it costs.

Your progress

Built by GhaziAlibi.

© ShardCraft. All rights reserved.