Application Layer - Chapter - 2 - Version 7.1
Application Layer - Chapter - 2 - Version 7.1
Application Layer - Chapter - 2 - Version 7.1
Application Layer
clients:
communicate with server
client/server may be intermittently
connected
may have dynamic IP
addresses
do not communicate directly
with each other
Application Layer 2-7
P2P architecture
no always-on server peer-peer
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
application application
socket controlled by
process process app developer
transport transport
network network controlled
link
by OS
link Internet
physical physical
application underlying
application layer protocol transport protocol
time
6. Steps 1-5 repeated for each of 10
jpeg objects
URL method:
uses GET method
input is uploaded in URL
field of request line:
www.somesite.com/animalsearch?monkeys&banana
1.Frame Header: This is a fixed-size section of the frame that contains essential
information such as the frame length, type, flags, stream identifier, and, in some cases, a
priority field.
2.Frame Payload: This is the variable-sized portion of the frame that carries the actual
data. The structure of the payload depends on the frame type.
3.Padding: Padding can be added to a frame if necessary, but it's optional. Padding is
used to increase the size of the frame, for example, to obfuscate the actual payload size.
The binary frame structure and multiplexing capabilities of HTTP/2.0 allow multiple
streams to be managed concurrently, optimizing data transmission and improving the
overall performance of web applications.
Application Layer 2-33
HTTPS (HTTP Secure)
SSL (Secure Sockets Layer):
1. Encryption: SSL was the original protocol designed for securing data transmission between
a client and a server. It uses encryption algorithms to ensure that data exchanged over the
network is encrypted, making it unreadable to any third parties intercepting the traffic.
2. Authentication: SSL also provides a level of authentication. It verifies that the server is
indeed the one it claims to be, helping to prevent man-in-the-middle attacks.
TLS (Transport Layer Security):
1. Encryption Standards: TLS builds upon SSL but uses more modern and secure encryption
standards. It has evolved to address vulnerabilities found in SSL.
2. Security: TLS is generally considered more secure and robust than SSL. It's the protocol
that is used to secure most HTTPS connections today.
3. Versions: SSL has multiple versions, including SSL 2.0 and SSL 3.0, which have known
security issues. TLS, on the other hand, has versions like TLS 1.0, TLS 1.1, TLS 1.2, and TLS
1.3, with each newer version improving security and performance. TLS 1.3, in particular,
focuses on minimizing latency.
In summary, HTTP/2.0 brings significant improvements over HTTP 1.x, including binary
framing, multiplexing, header compression, and server push. HTTPS, secured by SSL or TLS,
is vital for protecting data in transit, with TLS being the more secure and modern option
compared to SSL, due to its stronger encryption standards and better security practices.
Application Layer 2-34
HTTPS (HTTP Secure)
Exchange of Messages between Host and Server in HTTPs:
Client (Host): Your web browser, for example, Google Chrome.
Server: The web server hosting a website, such as an online shopping site like
"ExampleShop.com."
Message Exchange Steps in HTTPS:
1.Client Hello (TLS Handshake):
o Client: The client initiates the connection by sending a "Client Hello" message to
the server.
o Server: The server receives the "Client Hello" message and processes it.
2. Server Hello (TLS Handshake):
o Client: The client receives the "Server Hello" message and checks the server’s
certificate for authenticity. The certificate might be issued by a trusted Certificate
Authority (CA). If it's trusted, the client proceeds.
o Server: The server responds with a "Server Hello" message, which includes
information like the selected encryption protocol, a random number, and the
server's digital certificate.
… …
m. WIDE Tokyo
e. NASA Mt View, CA (5 other sites)
f. Internet Software C.
Palo Alto, CA (and 48 other sites)
examples:
file distribution
(BitTorrent)
Streaming (KanKan)
VoIP (Skype)
time to distribute F
to N clients using
Dc-s > max{NF/us,,F/dmin}
client-server approach
increases linearly in N
Application Layer 2-54
File distribution time: P2P
server transmission: must
upload at least one copy F
us
time to send one copy: F/us
di
client: each client must network
download file copy ui
min client download time: F/dmin
clients: as aggregate must download NF bits
max upload rate (limting max download rate) is us + ui
time to distribute F
DP2P
to N clients using > max{F/us,,F/dmin,,NF/(us + ui)}
P2P approach
increases linearly in N …
… but so does this, as each peer brings service capacity
Application Layer 2-55
Client-server vs. P2P: example
client upload rate = u, F/u = 1 hour, us = 10u, dmin ≥ us
3.5
P2P
Minimum Distribution Time
3
Client-Server
2.5
1.5
0.5
0
0 5 10 15 20 25 30 35
N
Application Layer 2-56
P2P file distribution: BitTorrent
file divided into 256Kb chunks
peers in torrent send/receive file chunks
Alice arrives …
… obtains list
of peers from tracker
… and begins exchanging
file chunks with peers in torrent