CN march 3
Default Port Number for STTP
- The default port number for Simple Text Transfer Protocol (STTP) is 80.
Overview of STTP Request Process
- Client-Server Model:
- A client (usually a web browser) requests information from a server.
- Content such as HTML files, images, and JavaScript files are stored on the web server.
- The client knows which server to contact through the domain name provided in the URL (e.g.,
http://full-container.domain).
URL Resolution to IP Address
- When a client initiates a request using a domain name:
- The client must first resolve this domain name into an IP address.
- This process generally involves sending a DNS query (Domain Name System query) to a local DNS server to fetch the corresponding IP address of the domain, e.g.,
gong.com. - It is assumed there is always a local DNS resolver available for the client.
TCP Handshake and Connection Establishment
- After the client receives the IP address:
- The client must perform a TCP handshake to establish a connection with the web server.
- This is an essential step for the TCP protocol, which operates at the transport layer.
Requesting Objects from the Web Server
- Following the establishment of a TCP connection:
- The client sends an HTTP request to the server for the desired objects (e.g., HTML files).
Terms and Definitions
Round Trip Time (RTT):
- The time it takes for a signal to go to the destination and back.
- RTT is an important metric in assessing response times during network requests.
Transmission Time:
- This is the time it takes for the data packets to be sent from the source to the destination over the network.
Example Calculation of Delays
Scenario 1: Requesting an HTML Page with Zero Objects
- DNS Query: 1 RTT to contact the local DNS.
- TCP Connection: 1 RTT for the TCP handshake.
- HTTP Request and Response: 1 RTT to fetch the HTML page.
- Total Delay: 3 RTT.
If the DNS needs to contact multiple servers (root DNS, TLD DNS, and authority):
- Total Delay can extend to 4 RTT.
Nonpersistent vs. Persistent HTTP Connections
Nonpersistent Connection:
- A new TCP connection is opened for every single object requested.
- This means there will be round trips for TCP and HTTP for each object.
Persistent Connection:
- The connection remains open for multiple requests, avoiding the need for repeated handshakes.
- More efficient as less overhead is required for establishing new connections.
Efficiencies to Improve Load Time
- Threading Concept: This allows multiple requests to be sent simultaneously to reduce overall load times.
- Pipelining:
- Persistent connections with pipelining allow clients to send multiple requests without waiting for the preceding responses.
- This can greatly reduce load times as the delivery of multiple objects can occur instantly after being requested.
Connections and Their Effects on Response Time
In the case of parallel connections and different server object requests:
- With five images requested from various domains, unique DNS queries are required for each.
- A separate round trip must be counted for all additional DNS hops.
HTTP scenarios can depend on the number of objects and the type of connection (persistent vs. nonpersistent)
- Nonpersistent connection per object typically incurs 2 RTTs (One for TCP, One for HTTP).
- Persistent connections can reduce this overhead significantly due to their efficiency.
Caching Considerations
Caching can help minimize transmission delays by storing frequently accessed objects.
- When a cached object is requested again, the client can bypass the server, reducing overhead.
Conditional GET Requests:
- Rather than downloading all objects anew, they will check if the objects have changed since the last request, significantly reducing date transfer when no changes are detected.
- For example, if 60% of objects in 50 requests are unchanged, they won’t incur additional transmission time, reducing the load on the server and enhancing speed.
Exam Preparation and Practice Questions
- Students are encouraged to utilize resources & knowledge checks as they prepare.
- Focused studying and collaboration with peers can enhance understanding.
- Reminder: Utilize cheat sheets and allow for ample time to cover all concepts thoroughly.