dogo_ day

HTTP ๋ฒ„์ „ ์ฐจ์ด ํŠน์ง• (0.9 1.0 1.1 2.0 3.0) ๋ณธ๋ฌธ

IT/CS_

HTTP ๋ฒ„์ „ ์ฐจ์ด ํŠน์ง• (0.9 1.0 1.1 2.0 3.0)

dogo_ 2023. 4. 27. 22:40

https://www.youtube.com/watch?v=a-sBfyiXysI&t=13s

 

๐Ÿ”…HTTP 0.9

HTTP ์ดˆ๊ธฐ๋ฒ„์ „์„ ๊ตฌ๋ถ„ํ•˜๊ธฐ ์œ„ํ•ด ๋ถ€๋ฅด๋Š” ๋ฒ„์ „์ด๋‹ค. (1991๋…„)

์š”์ฒญ์€ ๋‹จ์ผ ๋ผ์ธ์œผ๋กœ ๊ตฌ์„ฑ๋˜๋ฉฐ ๊ฐ€๋Šฅํ•œ ๋ฉ”์„œ๋“œ๋Š” GET์ด ์œ ์ผํ•˜๋‹ค.

GET /mypage.html

์‘๋‹ต ๋˜ํ•œ ๋‹จ์ˆœํ•˜๋ฉฐ ์˜ค๋กœ์ง€ ํŒŒ์ผ ๋‚ด์šฉ ์ž์ฒด๋กœ ๊ตฌ์„ฑ๋œ๋‹ค.

<html>
	A very simple HTML page
</html>

์ƒํƒœ๋‚˜ ์˜ค๋ฅ˜์ฝ”๋“œ๋„ ์กด์žฌํ•˜์ง€ ์•Š๋Š”๋‹ค.
GET /mypage.html

๐Ÿ”…HTTP 1.0

๋ฒ„์ „ ์ •๋ณด๊ฐ€ ๊ฐ ์š”์ฒญ ์‚ฌ์ดํŠธ๋กœ ์ „์†ก๋˜๊ธฐ ์‹œ์ž‘ํ–ˆ์œผ๋ฉฐ ์š”์ฒญ์— ๋Œ€ํ•œ ์„ฑ๊ณต๊ณผ ์‹คํŒจ๋ฅผ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

์š”์ฒญ์— ๋Œ€ํ•œ ๊ฒฐ๊ณผโžก๋™์ž‘์„ ํ•  ์ˆ˜ ์žˆ๋‹ค.

HTTP ํ—ค๋” ๊ฐœ๋…์€ ์š”์ฒญ๊ณผ ์‘๋‹ต ๋ชจ๋‘๋ฅผ ์œ„ํ•ด ๋„์ž…์ด ๋˜์—ˆ๋‹ค.

๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ์ „์†ก์„ ํ—ˆ์šฉํ–ˆ๊ณ  ํ”„๋กœํ† ์ฝœ์„ ๊ทน๋„๋กœ ์œ ์—ฐํ•˜๊ณ  ํ™•์žฅ ๊ฐ€๋Šฅํ•˜๋„๋ก ๋งŒ๋“ค์—ˆ๋‹ค.

์ƒˆ๋กœ์šด HTTP ํ—ค๋”์˜ ๋„์›€์œผ๋กœ ํ‰์ดํ•œ HTML ํŒŒ์ผ๋“ค ์™ธ์— ๋‹ค๋ฅธ ๋ฌธ์„œ๋“ค์„ ์ „์†กํ•˜๋Š” ๊ธฐ๋Šฅ์ด ์ถ”๊ฐ€๋˜์—ˆ๋‹ค.

 

๐ŸŒˆ์ผ๋ฐ˜์ ์ธ ์š”์ฒญ ์‘๋‹ต

GET /mypage.html HTTP/1.0
User-Agent: KCSA_Mosaic/2.0 (Windows 3.1)

200 OK
Date: Tue, 15 Nov 1994 11:58:00 GMT
Server: CERN/3.0 libwww/2.17
Content-Type: text/html
<HTML>
A page with an image
 <IMG SRC="/myimage.gif">
</HTML>

 

๐ŸŒˆ์ดํ›„ ์ด๋ฏธ์ง€๋ฅผ ๋‚ด๋ ค๋ฐ›๊ธฐ ์œ„ํ•œ ์š”์ฒญ๊ณผ ๊ทธ์— ๋Œ€ํ•œ ์‘๋‹ต

GET /myimage.gif HTTP/1.0
User-Agent: NCSA_Mosaic/2.0 (Windows 3.1)

200 OK
Date: Tue, 15 Nov 1994 13:28:00 GMT
Server: CERN/3.0 libwww/2.17
Content-Type: text/gif
(image content)

๐Ÿ”…HTTP 1.1 - ํ‘œ์ค€ ํ”„๋กœํ† ์ฝœ

HTML/1.0์ด ๋‚˜์˜จ์ง€ ๋ช‡ ๋‹ฌ ์•ˆ๋˜์„œ 1997๋…„ ์ดˆ์— ๊ณต๊ฐœ๋˜์—ˆ๋‹ค.

Header์™€ Body๋กœ ๊ตฌ์„ฑ๋˜์—ˆ์œผ๋ฉฐ TCP ์ปค๋„ฅ์…˜์„ ์ด์šฉํ•˜์˜€๋‹ค.(3-way-handshake)

๊ทธ๋ฆฌ๊ณ  ์š”์ฒญ์— ๋Œ€ํ•œ ์‘๋‹ต์ด ๋๋‚˜๊ธฐ ์ „์— ๋‹ค์Œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฏธ๋ฆฌ ์š”์ฒญ ํ•  ์ˆ˜ ์žˆ๋‹ค.(ํŒŒ์ดํ”„๋ผ์ด๋‹)

/* ์š”์ฒญ */
GET /en-US/docs/Glossary/Simple_header HTTP/1.1
Host: developer.mozilla.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: https://developer.mozilla.org/en-US/docs/Glossary/Simple_header

/* ์‘๋‹ต */
200 OK
Connection: Keep-Alive
Content-Encoding: gzip
Content-Type: text/html; charset=utf-8
Date: Wed, 20 Jul 2016 10:55:30 GMT
Etag: "547fa7e369ef56031dd3bff2ace9fc0832eb251a"
Keep-Alive: timeout=5, max=1000
Last-Modified: Tue, 19 Jul 2016 00:59:33 GMT
Server: Apache
Transfer-Encoding: chunked
Vary: Cookie, Accept-Encoding

(content)

 

์›นํŽ˜์ด์ง€๋Š” ๋งค์šฐ ๋ณต์žกํ•ด์ง€๋ฉด์„œ, ์ข…์ข… ์ง„์ •ํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ๋˜์—ˆ๋‹ค. ๋””์Šคํ”Œ๋ ˆ์ด๋˜๋Š” ์‹œ๊ฐ์  ๋ฏธ๋””์–ด์˜ ์–‘์— ๋ง๋ถ™์—ฌ ์ƒํ˜ธ์ž‘์šฉ์„ ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•œ ์Šคํฌ๋ฆฝํŠธ์˜ ์–‘๊ณผ ํฌ๊ธฐ๋Š” ์ ์  ๋” ๋งŽ์ด ์ฆ๊ฐ€ํ•˜๊ณ  ์žˆ์—ˆ๋‹ค. ๋” ๋งŽ์€ ๋ฐ์ดํ„ฐ๋“ค์ด ๋” ๋งŽ์€ ์š”์ฒญ ๋„ˆ๋จธ๋กœ ์ „์†ก๋˜๊ณ  ์žˆ์—ˆ๋‹ค.

๐Ÿ”…HTTP 2.0

๊ธฐ์กด HTTP 1.X ๋ฒ„์ „์˜ ์„ฑ๋Šฅ ํ–ฅ์ƒ์— ์ดˆ์ ์„ ๋งž์ถ˜ ํ”„๋กœํ† ์ฝœ์ด๋‹ค.(2015๋…„)

ํ‘œ์ค€์˜ ๋Œ€์ฒด๊ฐ€ ์•„๋‹Œ ํ™•์žฅ์ด๋‹ค.(ํ‘œ์ค€: HTTP 1.1)

HTTP ๋ฉ”์‹œ์ง€ ์ „์†ก ๋ฐฉ์‹์ด ์ „ํ™˜๋˜์—ˆ์œผ๋ฉฐ 4๊ฐ€์ง€ ํŠน์ง•์ด ์žˆ๋‹ค.

๋จผ์ € HTTP ๋ฉ”์„ธ์ง€ ์ „์†ก ๋ฐฉ์‹์ด ์–ด๋–ป๊ฒŒ ์ „ํ™˜๋˜์—ˆ๋Š”์ง€ ์•Œ์•„๋ณด์ž.

๊ธฐ์กด์˜ HTTP 1.1 ๋ฐฉ์‹์€ ์ผ๋ฐ˜ ํ…์ŠคํŠธ ํ˜•์‹์ด์—ˆ๋‹ค.

HTTP 2.0์€ Binary frame์œผ๋กœ ์ธ์ฝ”๋”ฉ๋˜์–ด ์ „์†ก์ด ๋œ๋‹ค.

Multiplexed Stream
๊ธฐ์กด: HTTP 1.1์˜ ํŒŒ์ดํ”„๋ผ์ด๋‹์œผ๋กœ ํ•˜๋‚˜์˜ ์ปค๋„ฅ์…˜์— ์—ฌ๋Ÿฌ ์š”์ฒญ์ด ์กด์žฌํ•˜์ง€๋งŒ, ๊ฒฐ๊ตญ ๋™์‹œ์— ์—ฌ๋Ÿฌ ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•ด ์‘๋‹ต์œผ๋กœ ์ฃผ์ง€๋Š” ๋ชปํ•œ๋‹ค.
๊ฐœ์„ : ๊ตฌ์„ฑ๋œ ์—ฐ๊ฒฐ ๋‚ด์— ์ „๋‹ฌ๋˜๋Š” ๋ฐ”์ดํŠธ์˜ ์–‘๋ฐฉํ–ฅ ํ๋ฆ„์„ ์˜๋ฏธํ•˜๋Š” stream์œผ๋กœ ์š”์ฒญ๊ณผ ์‘๋‹ต์ด ๊ตํ™˜๋œ๋‹ค.
๋™์‹œ์— ์—ฌ๋Ÿฌ ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.
Stream Prioritization
๋ฆฌ์†Œ์Šค๊ฐ„ ์šฐ์„ ์ˆœ์œ„๋ฅผ ์„ค์ •ํ•˜๋Š” ๊ธฐ๋Šฅ์ด๋‹ค.
Stream์— ์šฐ์„ ์ˆœ์œ„๋ฅผ ๋ถ€์—ฌํ•ด์„œ ์ธํ„ฐ๋ฆฌ๋น™๋˜๊ณ  ์ „๋‹ฌํ•˜๋Š” ๊ฒƒ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.
์ค‘์š”ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์šฐ์„ ์ ์œผ๋กœ ๋ณด๋‚ผ ์ˆ˜ ์žˆ๋‹ค.
Server Push
๋‹จ์ผ ํด๋ผ์ด์–ธํŠธ ์š”์ฒญ์— ์—ฌ๋Ÿฌ ์‘๋‹ต์„ ๋ณด๋‚ผ ์ˆ˜ ์žˆ๋Š” ํŠน์ง•์„ ํ†ตํ•ด Server์—์„œ Client์—๊ฒŒ ํ•„์š”ํ•œ ์ถ”๊ฐ€์ ์ธ ๋ฆฌ์†Œ์Šค๋ฅผ pushํ•ด์ฃผ๋Š” ๊ธฐ๋Šฅ์ด๋‹ค.
ํ•œ๋งˆ๋””๋กœ Client์—๊ฒŒ ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๊ฐ€ ์žˆ๋‹ค๋ฉด ์ง์ ‘ ์šฉ์ฒญํ•˜๊ธฐ ์ „์— ์„œ๋ฒ„๊ฐ€ ๋ฏธ๋ฆฌ ๋ฐ์ดํ„ฐ๋ฅผ ์ „์†กํ•˜์—ฌ Client๊ฐ€ ๋ฐ›์•„๋ณผ ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋Š” ๊ฒƒ์ด๋‹ค.
Header Compression
๊ธฐ์กด: ์—ฐ์†๋œ ์š”์ฒญ์˜ ๊ฒฝ์šฐ ๋งŽ์€ ์ค‘๋ณต๋œ ํ—ค๋”์˜ ์ „์†ก์œผ๋กœ ์˜ค๋ฒ„ํ—ค๋“œ๊ฐ€ ๋งŽ์ด ๋ฐœ์ƒํ•˜์˜€๋‹ค.
๊ฐœ์„ : ์š”์ฒญ๊ณผ ์‘๋‹ต์˜ ํ—ค๋” ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ ์••์ถ•ํ•ด์„œ ์˜ค๋ฒ„ํ—ค๋“œ๋ฅผ ๊ฐ์†Œ์‹œ์ผฐ๋‹ค.

๐Ÿ”…HTTP 3.0

Google์—์„œ UDP ๊ธฐ๋ฐ˜์˜ ์ „์†ก ํ”„๋กœํ† ์ฝœ์ธ QUIC(Quick UDP Internet Connections)์„ ๊ฐœ๋ฐœํ•˜์˜€๋‹ค.

Google์—์„œ TCP์˜ ๊ตฌ์กฐ์  ๋ฌธ์ œ๋กœ ์„ฑ๋Šฅ ํ–ฅ์ƒ์ด ์–ด๋ ต๋‹ค๊ณ  ํŒ๋‹จํ•˜์—ฌ UDP ๊ธฐ๋ฐ˜์„ ์„ ํƒํ•˜์˜€๋‹ค๊ณ  ํ•œ๋‹ค.

QUIC๋Š” TCP์˜ 3-way-handshake๊ณผ์ •์„ ์ตœ์ ํ™” ํ•˜๋Š” ๊ฒƒ์— ์ดˆ์ ์„ ๋‘๊ณ  ๊ฐœ๋ฐœํ•˜์˜€๋‹ค.

TCP์˜ Stream์€ ํ•˜๋‚˜์˜ chain์œผ๋กœ ์—ฐ๊ฒฐ๋˜๋Š” ๊ฒƒ๊ณผ๋Š” ๋‹ค๋ฅด๊ฒŒ QUIC๋Š” ๊ฐ Stream๋‹น ๋…๋ฆฝ๋œ Stream chain์„ ๊ตฌ์„ฑํ•˜์—ฌ TCP HOL Blocking์„ ํ•ด๊ฒฐํ•˜์˜€๋‹ค.

HTTP 3.0์€ QUIC์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๋‚˜์˜จ ์ƒˆ๋กœ์šด HTTP ๋ฉ”์ด์ € ๋ฒ„์ „์ด๋‹ค.


์ฐธ๊ณ ์ž๋ฃŒ

 

HTTP (1) - version ๋ณ„ ํŠน์ง• (0.9 / 1.0 / 2.0 / 3.0)

[HTTP 0.9] [HTTP 1.0] [HTTP 2.0] [HTTP 3.0]

velog.io

 

HTTP์˜ ์ง„ํ™” - HTTP | MDN

HTTP๋Š” ์›”๋“œ ์™€์ด๋“œ ์›น์— ๋‚ด์žฌ๋œ ํ”„๋กœํ† ์ฝœ์ž…๋‹ˆ๋‹ค. Tim Berners-Lee์— ์˜ํ•ด 1989๋…„๋ถ€ํ„ฐ 1991๋…„์— ๋ฐœ๋ช…๋œ HTTP๋Š”, ๋ณธ๋ž˜์˜ ๋‹จ์ˆœํ•จ์˜ ๋Œ€๋ถ€๋ถ„์„ ์ง€ํ‚ค๋ฉด์„œ ํ™•์žฅ์„ฑ ์œ„์—์„œ ๋งŒ๋“ค์–ด์ง€๋„๋ก, ๋งŽ์€ ์ˆ˜์ •์„ ๊ฑฐ์ณ์™”์Šต๋‹ˆ

developer.mozilla.org

 

'IT > CS_' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

HTTP vs HTTPS  (1) 2023.04.27