Application Layer Flashcards
Client-Server Architecture
SERVER: Always-on host, permanent IP address
CLIENT: Communicate with server, not directly with each other, intermittently connected, dynamic IP address
Peer-Peer Architecture
- No always-on server
- End systems communicate directly with each other
- Intermittently connected and change IP address
- self scalability
Process
Program running within a host
Client, Server Process Communication
CLIENT: process that initiates communication
SERVER: Process that waits to be contacted
Socket
Software structure that serves as endpoint for sending and receiving data across the network (like a door). Two sockets, one on each side.
Addressing Processes
Includes IP ADDRESS and PORT NUMBER. To receive messages, process must have identifier.
HTTP Overview
Hypertext Transfer Protocol. Uses TCP connection, is “stateless”
CLIENT: Browser that requests, receives and displays Web objects using HTTP Protocol
SERVER: Web server sends objects in response to request using HTTP protocol
TCP
Transmission Control Protocol. Organizes data in a way that ensures secure transmission
TCP Procedure
- Client initiates TCP connection to server, port 80
- Server accepts TCP connection from client
- HTTP messages exchanged between browser (HTTP client) and Web server (HTTP server)
- Connection is closed
Another name for HTTP messages
Application-layer protocol messages
“Stateless”
Server maintains no information about past client requests to this server. Can use info from requests to other servers
Non-persistent HTTP
Can only send one object per connection. Downloading multiple objects requires multiple connections.
Non-Persistent HTTP Procedure
- TCP connection opened
- Send one object over connection
- TCP connection closed
Persistent HTTP
Can use one connection to send multiple objects.
Persistent HTTP Procedure
- TCP connection opened
- Multiple objects send between server and client
- TCP connection closed
Non-persistent HTTP Response Time (per object)
- One RTT for initiate TCP
- One RTT for HTTP request and first few bytes of HTTP response to return
- object/file transmission time
time = 2RTT + file transmission time
RTT
Round Trip Time (non-persistent HTTP). Time for a small packet to travel from client to server and back
Example Non-persistent: Client requests for web page having 4 parallel connections?
4RTT + 2 file transmission time
Example Non-persistent: Client requests for web page having 8 parallel connections?
8RTT + 4 file transmission time
Example Persistent: Client requests for web page having 4 or 8 parallel connections?
3RTT + 2 file transmission time
Types of HTTP Messages
- Request
- Response
HTTP Return Line Format
[HTTP method] space [URL] space [HTTP version]