본문 바로가기
CS/Computer Networking

[Computer Networking] 4. Chapter 2: Application layer

2021. 7. 20.
반응형

Chapter 2에서 살펴볼 주제 3가지

  1. Application 구조
    • transport-layer service models
    • client-server paradigm
    • peer-to-peer paradigm
  2. 인터넷에서 사용되고 있는 프로토콜
    • HTTP
    • SMTP / POP3 / IMAP
    • DNS
  3. 네트워크 어플리케이션 프로그램을 작성할 수 있는 인터페이스
    • socket API

 

Application architectures

network application과 application protocol은 두 가지 구조 중 하나를 가짐

  • client-server
  • peer-to-peer (P2P)

 

Client-server architecture

communication 주체 : program

program이 실행하고 있는 host가 client-server architecture인 경우에는 한 종류는 server, 한 종류는 clients임

server host와 clients host가 서로 통신

server

언제나 on되어 있는 host

영구적으로 할당된 IP 주소

클라이언트 많으면 데이터 센터 형식으로 서버 군집

clients

자기들끼리는 통신 X, 서버와 커뮤니케이션

인터넷에 be intermittently connected

dynamic IP 주소인 경우가 많음 (인터넷에 connected 때마다 변경 가능한 IP 주소)

 

P2P architecture

no always-on server

arbitrary end systems directly communicate

user hosts = peers, 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끼리 서비스 제공 → 클라이언트 수가 많아져도 서버를 증가시키지 않아도 됨 → peer가 시스템에 join하면 request뿐만 아니라 service capability도 같이 가지고 join하기 때문에 시스템의 규모가 커지더라도 subscale?할 수 있는 경향이 있음

peers are intermittently connected and change IP addresses

  • (단점) complex management

 

clinet host에서 돌아가고 있는 client process가 어떤 service request를 위해서 server host에서 실행되고 있는 server process에게 contact함

p2p는 peer host에 client, server process가 동시에 실행되고 있을 수도 있고 하나만 실행되고 있을 수 있음

 

Sockets

transport 이하는 운영체제에 의해 control됨

application process에서 보내는 메시지, network을 통해서 배달된 메시지 : transport 계층을 통해서 application으로 전송

transport 계층과 application process 계층 간에는 door같은 게 있어야 하는데, 그것이 socket

socket을 통해서 application process → transport 계층으로 내보내거나 network 계층 → transport 계층으로 읽어 옴

 

출발지, 목적지는 host가 아니라 host device에서 실행되는 process

→ host의 32-bit IP address만 가지고는 목적지를 식별할 수 없음

→ identifier includes both IP address and port numbers

port numbers는 host 안에서 실행되고 있는 process를 identify할 수 있게 함

well known port number (매우 보편적으로 사용되는 서버 프로세스는 고정된 포트 번호를 사용함)

http 서버 프로세스의 port number는 80으로 고정돼 있음

mail server : 25

ip address 32비트를 8비트씩 잘라서 표기

 

What transport service does an app need?

  • data integrity
    file transfer, web transactions
    other apps (e.g., audio) can tolerate some loss
  • timing
    some apps (e.g., Internet telephony, interactive games) requires low delay
  • throughput
    multimedia, 스트리밍 서비스 require minimum amount of throughput
    elastic apps - (주로 traditional apps, e.g., FTP) 늦어져도 critical하지 않은 apps
  • security
    encryption

 

stored audio/video - 버퍼링이 있기 때문에 프레임 순서대로 불러올 수 있음, time sensitive하지만 정도가 덜함

audio/video는 minimum throughput guarantee가 필요 ← 영상과 소리가 재생되기 위해서는 단위 시간당 일정량의 frame guarantee가 있어야 함

 

Internet transport protocols services

TCP service

  • reliable transport
  • connection-oriented: setup required between client and server processes
  • flow control (connection-oriented이기 때문에 가능)
    TCP는 sender, receiver 모두 buffer 가지고 있음
    sending TCP는 application 계층에서 message를 buffer에 받아서 내보냄, receiving TCP는 network 계층을 통해서 전달받은 패킷을 buffer에 받고 application으로 올려보냄
    application process가 TCP buffer에서 읽는 속도보다 buffer에 데이터가 차는 속도가 더 빠를 수 있음
    sending TCP에게 slowdown하라고 함으로써 receiving TCP의 overflow 막을 수 있음
  • congestion control (connection-oriented이기 때문에 가능)
  • router의 buffer가 찰 수 있음

UDP service

  • unreliable data transfer
반응형

댓글