• 검색 결과가 없습니다.

Application Layer

N/A
N/A
Protected

Academic year: 2022

Share "Application Layer"

Copied!
24
0
0

로드 중.... (전체 텍스트 보기)

전체 글

(1)

Application Layer

- Overview -

Kyunghan Lee

Networked Computing Lab (NXC Lab)

Department of Electrical and Computer Engineering Seoul National University

https://nxc.snu.ac.kr

(2)

Application Layer – What to learn

□ Conceptual, implementation aspects of network application protocols

§ transport-layer service models

§ client-server paradigm

§ peer-to-peer paradigm

§ content distribution networks

□ Learn about protocols by examining popular application-level protocols

§ HTTP, FTP, SMTP / POP3 / IMAP, DNS

□ Creating network applications

(3)

Network Applications

□ e-mail

□ web

□ text messaging

□ remote login

□ P2P file sharing

□ multi-user network games

□ streaming stored video (YouTube, Hulu, Netflix)

□ voice over IP (e.g., Skype)

□ real-time video conferencing

□ social networking

□ search

□ …

□ …

(4)

Delivering a Message to the Server

How to deliver

a message to a client?

Delivering a Message to a Client

(5)

Creating a Network Application

write programs that:

run on (different) end systems

□ communicate over network

□ e.g., web server software communicates with browser software

no need to write software for network-core devices

□ network-core devices do not run user applications

□ applications on end systems allows for rapid app

application transport

network data link physical

application transport

network data link physical application

transport network data link physical

(6)

Application Architecture: Client-Server

Server:

□ always-on host

□ permanent IP address (mostly)

□ data centers for scaling

Clients:

□ communicate with server

□ may be intermittently connected

□ may have dynamic IP addresses

□ do not communicate directly with each other

client/server

(7)

Application Architecture: P2P

peer-peer □ 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

(8)

Process Communication

Process: program running within a host

within same host, two processes communicate using inter-process communication (defined by OS)

processes in different hosts communicate by exchanging messages

client process:

process that initiates communication

server process:

process that waits to be contacted

§ Note that applications with P2P architectures have both client and server processes

clients, servers

(9)

Sockets

□ process sends/receives messages to/from its socket

□ socket analogous to door

§ sending process shoves message outdoor

§ sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process

Internet

controlled by OS controlled by app developer

transport application

physical link network

process

transport application

physical link network

process

socket

(10)

Addressing Processes

□ To receive messages, process must have identifier

□ Host device has unique 32-bit IP address

Q: does IP address of host on which process runs suffice for identifying the process?

identifier includes both IP address and port numbers

associated with process on host.

□ example port numbers:

§ HTTP server: 80

§ mail server: 25

□ To send HTTP message to gaia.cs.umass.edu web server:

§ IP address: 128.119.245.12

§ port number: 80

(11)

App-layer Protocol defines…

□ types of messages exchanged,

§ e.g., request, response

□ message syntax:

§ what fields in messages &

how fields are delineated

□ message semantics

§ meaning of information in fields

□ rules for when and how processes send & respond to messages

open protocols:

§ defined in RFCs

§ allows for interoperability

§ e.g., HTTP, SMTP proprietary protocols:

§ e.g., Skype

(12)

Transport Service that an App Needs

data integrity

§ some apps (e.g., file transfer, web transactions) require 100%

reliable data transfer

§ other apps (e.g., audio) can tolerate some loss

timing

§ some apps (e.g., Internet telephony, interactive

games) require low delay to be “effective”

throughput

§ some apps (e.g., multimedia) require minimum amount of throughput to be

“effective”

§ other apps (“elastic apps”) make use of whatever throughput they get

(13)

Transport Service Requirements

application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games text messaging

data loss no loss no loss no loss

loss-tolerant loss-tolerant loss-tolerant no loss

throughput elastic

elastic elastic

audio: 5kbps-1Mbps video:10kbps-5Mbps same as above

few kbps up elastic

time sensitive

nono

noyes, 100’s msec

yes, few secs yes, 100’s msec yes and no

(14)

Internet Transport Protocols

TCP service:

reliable transport between sending and receiving process

flow control: sender won’t overwhelm receiver

congestion control: throttle sender when network overloaded

does not provide: timing,

minimum throughput guarantee, security

connection-oriented: setup

required between client and server processes

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,

Q: why bother? Why is there a UDP?

(15)

Internet Apps and Transport Protocols

application e-mail remote terminal access file transferWeb streaming multimedia Internet telephony

application layer protocol SMTP [RFC 2821]

Telnet [RFC 854]

HTTP [RFC 2616]

FTP [RFC 959]

HTTP (e.g., YouTube), RTP [RFC 1889]

SIP, RTP, proprietary (e.g., Skype)

underlying

transport protocol TCPTCP

TCPTCP

TCP or UDP

TCP or UDP

(16)

Securing TCP

TCP & UDP

§ no encryption

§ cleartext passwds sent into socket traverse Internet in cleartext

SSL (Secure Sockets Layer) TLS (Transport Layer Security)

§ provides encrypted TCP connection

§ data integrity

§ end-point authentication

SSL/TLS is at app layer

§ apps use SSL libraries, that

talk” to TCP

SSL/TLS socket API

§ cleartext passwords sent into socket traverse Internet

encrypted

(17)

17

App Performance: Time to transfer an object

(Ignoring queuing delay, processing, etc.)

Time(to(transfer(an(object(

(Ignoring(queuing(delay,(processing,(etc.)(

Time(to(transfer(an(object(

(Ignoring(queuing(delay,(processing,(etc.)(

e.g.(email(

message(

Digital photography Email message

Typing a character

(18)

What’s the throughput?

What’s the transfer time?

Throughput = (Transfer size) / (Transfer time)

Transfer time = RTT + (Transfer size) / Bandwidth

Request + first byte delay

0.2s + 8Mb/1Gbs = 0.208s 8Mb / 0.208s = ~38.5Mb/s ??

Example: request 1MB file over a 1Gb/s link,

with 200ms RTT

(19)

What’s gone wrong here?

□ File is too small?

□ Round-trip time is too high?

□ You can’t reduce the latency (propagation delay).

§ Adding bandwidth won’t really help.

(20)

20

Bandwidth-Delay Product (BDP)

□ Example: Latency = 200ms, Bandwidth = 40Gb/s

§ ⇒ “channel memory” = 8Gb, or 1 gigabyte

□ BDP: What the sender can send before receiver sees anything

§ Or must send to keep the network pipe full...

Bandwidth7Delay(product(

•  Example:(Latency(=(200ms,(Bandwidth(=(40Gb/s(

–  ⇒(“channel(memory”(=(8Gb,(or(1(gigabyte(

•  What(the(sender(can(send(before(receiver(sees(

anything(

–  Or(must(send(to(keep(the(pipe(full…(

Bandwidth(Bandwidth BDP = Bandwidth x Delay

(21)

Application Requirements: Utility

□ Some applications can’t use all the network

□ Example: constant-bit-rate 320kbs MP3 streaming

□ Utility function : measure of how useful each network resource (bandwidth, latency, etc.) is to an application Applica<on(u<lity(func<ons(

“U<lity”( Infinitely(large(file(

transfer(

Infinitely large file transfer

Applica<on(u<lity(func<ons(

“U<lity”( Real(file(transfer(

Most real file transfers

Applica<on(u<lity(func<ons(

31(

“U<lity”(

Bandwidth(

Constant(bit(rate(stream(

(e.g.(audio,(video)(

Slides(adapted(from(Prof.(Roscoe(

Applica<on(u<lity(func<ons(

“U<lity”( Network7coded(

variable7bit7rate(

mul<media(

Constant bit rate stream (e.g. audio, video)

variable-bit-rate multimedia

(22)

□ Many applications are “bursty”

§ Required network bandwidth varies over time

□ Challenge: describe and analyze bursty sources

§ Token buckets, leaky buckets, queuing theory...

Application Requirements: Burstiness

(23)

Introduction to Data Communication Networks, M2608.001200, 2021 FALL SEOUL NATIONAL UNIVERSITY

Variance in end-to-end latency (or RTT)

□ Example: voice (telephony)

□ How long to wait to play a received packet?

§ Too long: hard to have a conversation (150ms limit)

§ Too short: some packets arrive too late (lose audio)

Applica<on(requirements:(JiFer(

•  Variance)(in(end7to7end(latency((or(RTT)(

•  Example:(voice((telephony)(

•  How(long(to(wait(to(play(a(received(packet?(

–  Too(long:(hard(to(have(a(conversa<on((150ms(limit)(

Network(

1( 2( 3( 4( 5( 1( 2( 3( 4( 5(

Equally7spaced((

Application Requirements: Jitter

(24)

□ Networks do, sometimes, lose packets.

□ Loss is complex:

§ Packet loss rate, Bit-error rate

□ Losses and errors must be detected:

§ Codes, sequence numbers, checksums

□ Handled by:

§ Error-correction

§ Retransmission

Application Requirements: Loss

참조

관련 문서

– Requires a converter from resistance to electrical signal – Higher price than

Given a feasible solution λ 0 to the original dual problem, set up the associated restricted primal problem. Optimize the

• The reset time and the derivative time should increase as the ratio of time delay to dominant time constant increases. • The ratio between derivative time and reset time

Purpose Model predictive controller for simulating closed-loop systems with hard bounds on manipulated variables and/or controlled variables using linear models in the MPC

– when the message on Node B’s queue is passed to a recipient application and confirmation is received that the message has

Ÿ 해양 4차산업 GLOCAL 융·복합 창의적 전문인재 양성을 위한 10대 핵심과제 중 추진목표와 부합되는 4가지 영역 추출 Ÿ 운영성과의

□ The least-upper-bound property (sometimes called completeness or supremum property) is a fundamental property of the real number system. The least-upper-bound

□ The least-upper-bound property (sometimes called completeness or supremum property) is a fundamental property of the real number system. The least-upper-bound