본문 바로가기
TIL/Network

TIL D-93 Application Layer

by 홍차23 2019. 10. 27.

2.1 네트워크 애플리케이션의 원리

2.2 웹과 HTTP

http 개요

비지속 연결과 지속 연결

http 메시지 포맷

사용자와 서버 간의 상호작용: 쿠키

웹 캐싱

 

2.3 인터넷 전자메일

SMTP

HTTP와의 비교

메일 메시지 포맷

메일 접속 프로토콜

 

2.4 DNS-인터넷 디렉터리 서비스

 

2.5 P2P 파일 분배

 

2.6 비디오 스트리밍과 컨텐츠 분배 네트워크

인터넷 비디오

HTTP 스트리밍 및 대쉬(DASH)

콘텐츠 분배 네트워크(CDN)

사례연구: 넷플릭스, 유튜브, kankan

 

2.7 소켓 프로그래밍: 네트워크 애플리케이션 생성

UDP를 이용한 소켓 프로그래밍

TCP 소켓 프로그래밍

 

오늘은 1-3장 전부 훑어보는 방식으로 공부했다. 

 

교수님이 올려주셨던 2장 요약)

Loss/Delay/BW-sensitive applications,

Client-server v.s. P2P, 

socket is a door between application layer and transport layer. 

(IP address, port no.) is required to identify a process (port no.) in a host (IP address).

 

 

For supporting web service, TCP-based HTTP is used.

3 types of TCP connection for TCP-based HTTP

: non-persistent v.s. non-persistent with parallel v.s. persistent TCP connection

   --- How many RTTs are required to download a web page that includes N objects?

   --- How many sockets are open at the same time in a client/server host?

 

HTTP pipelining is possible because HTTP uses a TCP which implements pipelining.

HTTP is a stateless protocol which does not keep status of a HTTP client at a server.

However, using cookie a server can maintain information about its clients.

How to set up and use cookie ID? What are its benefits?

 

 

Web proxy

(pros) reduces the average delay (good for clients), 

        reduces access link BW utilization (good for access ISP) 

        reduces server overhead (good for web servers)

        can be used for auditing or controlling access to external web servers

(cons) The web contents stored at Web servers may be out-of-date.

        There may be inconsistency between an original server and a web server. 

 

Conditional GET is a method used for Web proxy to maintain its contents up-to-date.

 

 

SMTP (push protocol) : used for sending/delivering emails

POP3, IMAP and HTTP (pull protocol) : used for accessing emails

Push protocol : a client who initiates a connection to a server wants to send(push) data to the server

Pull protocol : a client who initiates a connection to a server wants to receive(pull) data to the server

 

What are differences between SMTP and HTTP?

Your IP address may imply your location.

What services can DNS provide? 

 -- Mapping between hostname and IP addres  <-- using RR type="A"(IPv4) or "AAAA"(IPv6)

 -- host aliasing (mapping btw alias and canonical) <-- using RR type="CNAME"

 -- Mail server aliasing (find hostname of a mail server of a given domain name) <-- using RR type="MX"

 -- Load balancing among multiple servers which have the same alias

 

 

Hierarchical DNS system : 

Root DNS servers have entries of (hostmane and IP address) of TLD servers

-> TLS servers have entries of (hostname and IP address) of authoritative DNS servers

--> Authoritative DNS servers have entries of (hostname and IP address) of web/mail/.. servers which you really want to access

 

In the world, there are only 13 root DNS servers (10 resides in the US, 2, in the EU and 1 in Japan. ) And Korea has 3 root DNS mirrors.

 

 

DNS resolution : Iterative v.s. recursive DNS resolution

Why does DNS use UDP and not TCP?

-> b/c one-connection, short msg => no need to set-up delay

 

 

P2P's self-scalability : as the number of clients (peers) grows, P2P shows less file distribution time than C-S.

Streaming service means that (audio or video) contents are received and immediately played rather than being saved to the hard drive.

What are two challenging issues in the OTT service? 

  -- Server infrastructure (storage, NW link BW)

  ---- Heterogeneous clients (local processing, downlink capacity)

Then what are solutions for them?

  -- Distribute servers by using content distribution network (CDN)

  ---- Make server and client application protocol smarter like DASH

 

 

There are two ways for VoD streaming service, progressive downloading and adaptive streaming.

How does the progressive downloading work? What is its drawback?

 

 

How does a server of DASH protocol work?

How does a client of DASH protocol work?

 

 

In the OTT service, how to distribute servers : enter-deep v.s. bring-home

 

 

Primary role of a transport layer = Muxing at a sender / demuxing at a receiver

Muxing    : adding a destination port # in a transport layer header

Demuxing : finding a right socket(process) and forwarding L5_message

               How to find a right socket is different depending on UDP/TCP

               -- UDP : find the socket using (destination port#, destination IP addr.)

               -- TCP : find the socket using (destination port#, destination IP addr.,

                                                      source port#, source IP addr.)

 

 

TCP (byte-stream oriented transfer)

 - connection setup/teardown (dedicated socket generation/close for each connection)

 - my TCP socket ID = (my IP addr., my port#, the other end's IP addr, the other end's port#)

   *** When demuxing my = destination and the other end = source

 - no loss & in-order delivery

 

UDP (datagram transfer)

 - connection less (no dedicated socket for each connection)

 - my UCP socket ID = (my IP, my port#)

   *** When demuxing my = destination

   *** UDP should give (source IP address, source port#) to the application process in case that the process replies back to the message sender.

 - loss & out-of-order delivery

'TIL > Network' 카테고리의 다른 글

[Network] HTTPS와 SSL인증서  (0) 2020.12.03
[Network] HTTP 프로토콜  (0) 2020.12.03
TIL D-82 멀티스레딩  (0) 2019.11.07
TIL D-89 Best Effort  (0) 2019.10.31
TIL D-96 애플리케이션 계층-DNS resolution, CDN  (0) 2019.10.25

댓글