Chapter 2 Flashcards
What is Client-server paradigm?
server:
▪ always-on host
▪ permanent IP address
▪ often in data centers, for scaling
clients:
▪ contact, communicate with server
▪ may be intermittently connected
▪ may have dynamic IP addresses
▪ do not communicate directly with
each other
What is Peer-peer architecture?
▪ no always-on server
▪ arbitrary end systems directly
communicate
▪ peers request service from other
peers, provide service in return to
other peers
* self scalability – new peers bring new
service capacity, as well as new service
demands
▪ peers are intermittently connected
and change IP addresses
* complex management
▪ example: P2P file sharing
clients vs servers
process: program running within a host
client process: process that initiates communication. It’s like someone who starts a phone call
server process: process that waits to be contacted. It’s like a call center agent waiting for calls
What are sockets in networking?
An abstraction used in network communication, which act as endpoints for sending and receiving data
- Socket as a Door: The analogy used in the image compares a socket to a door. A door is an entry and exit point for a house, just as a socket is an entry and exit point for data in a network process.
- Sending and Receiving Process: When a process wants to send data, it “shoves” the data out through the socket. When it receives data, the data comes in through the socket. This is like sending a package out your door, or getting a delivery through your door.
- Transport Infrastructure: The underlying network, which includes the transport, network, link, and physical layers, is like the postal service that takes care of delivering the package from one door to another.
- Two Sockets Involved: In any network communication, there are two sockets involved – one on the sending side and one on the receiving side. This is similar to having a sender’s and receiver’s doors for a delivery service.
- Control by Application and OS: The application process (controlled by the application developer) uses the socket to send or receive data, while the actual details of the data transmission through the network layers are managed by the operating system.
What transport service an app need?
data integrity: require 100% reliable data transfer
throughput: require minimum amount of throughput to be “effective”
timing: require low delay to be “effective”
security: encryption, data integrity, …
TCP service:
- Reliable transport: between sending and receiving process
- Flow control: sender won’t overwhelm receiver
-Congestion control - throttle sender when network overloaded - Connection-oriented: setup required between client and server processes
- does not provide: timing, minimum, throughput guarantee, security
UDP service:
- unreliable data transfer: between sending and receiving process
- does not provide: reliability, flow control, congestion control, timing, throughput, guarantee, security, or connection setup
why UDP?
- does not establish a connection before sending data, there’s no need for a handshake process, making UDP faster in terms of latency compared to TCP
- simple and has control over transmission, control over what data is sent and when it’s sent
- useful for situations where speed and efficiency are more critical than the guaranteed delivery of data
HTTP: hypertext transfer protocol
What is client and server
client: browser that requests, receives, and “displays” web objects
server: web server sends (using HTTP protocol) objects in response to ‘request’
How does HTTP uses TCP?
- client initiates TCP connection (creates socket) to server, port 80
- server accepts TCP connection from client
- HTTP messages exchanged between browser (HTTP client) and web server (HTTP server)
- TCP connection closed
HTTP connections: two types
1.Non-persistent HTTP
- Persistent HTTP
1.
- TCP connection opened
- at most one object sent over a TCP connection
- TCP connection closed
//downloading multiple objects required multiple connections
2.
- TCP connection opened to a server
- multiple objects can be sent over single TCP connection between client, and that server
- TCP connection closed
What is RTT (definition)
time for a small packet to travel from client to server and back