Home > Network > 2024 > ๐ŸŒ[Network] CDN(Content Delivery Network) ๊ธฐ์ˆ ์ด๋ž€ ๋ฌด์—‡์ผ๊นŒ์š”?

๐ŸŒ[Network] CDN(Content Delivery Network) ๊ธฐ์ˆ ์ด๋ž€ ๋ฌด์—‡์ผ๊นŒ์š”?
Network

๐ŸŒ[Network] CDN(Content Delivery Network) ๊ธฐ์ˆ ์ด๋ž€ ๋ฌด์—‡์ผ๊นŒ์š”?

๐Ÿ“Œ Intro.

  • โ†˜๏ธŽ CDN(Content Delivery Network, ์ฝ˜ํ…์ธ  ์ „์†ก ๋„คํŠธ์›Œํฌ)์€ ์ „ ์„ธ๊ณ„์— ๋ถ„์‚ฐ๋œ ์„œ๋ฒ„ ๋„คํŠธ์›Œํฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์‚ฌ์šฉ์ž์—๊ฒŒ ์›น ์ฝ˜ํ…์ธ (์ด๋ฏธ์ง€, ๋น„๋””์˜ค, CSS, JavaScript ๋“ฑ)๋ฅผ ๋น ๋ฅด๊ณ  ์•ˆ์ •์ ์œผ๋กœ ์ „๋‹ฌํ•˜๋Š” ๊ธฐ์ˆ .

1๏ธโƒฃ CDN(Content Delivery Network)์˜ ๊ธฐ๋ณธ ๊ฐœ๋….

  • โ†˜๏ธŽ ์ฝ˜ํ…์ธ ๋ฅผ ์‚ฌ์šฉ์ž์™€ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์„œ๋ฒ„์—์„œ ์ œ๊ณตํ•˜์—ฌ ์‘๋‹ต ์†๋„๋ฅผ ๋‹จ์ถ•ํ•จ.
  • โ†˜๏ธŽ ํŠธ๋ž˜ํ”ฝ์„ ๋ถ„์‚ฐ์‹œ์ผœ ์„œ๋ฒ„์˜ ๊ณผ๋ถ€ํ•˜๋ฅผ ๋ฐฉ์ง€ํ•จ.
  • โ†˜๏ธŽ ์ „ ์„ธ๊ณ„์ ์œผ๋กœ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜(UX)๊ณผ ์›น์‚ฌ์ดํŠธ ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ์‹œํ‚ด.

2๏ธโƒฃ CDN(Content Delivery Network)์˜ ์ž‘๋™ ์›๋ฆฌ.

  • 1๏ธโƒฃ ์˜ค๋ฆฌ์ง„ ์„œ๋ฒ„ (Origin Server)
    • โ†˜๏ธŽ ์›๋ณธ ์ฝ˜ํ…์ธ ๊ฐ€ ์ €์žฅ๋œ ์ค‘์•™ ์„œ๋ฒ„.
  • 2๏ธโƒฃ ์—ฃ์ง€ ์„œ๋ฒ„(Edge Server)
    • โ†˜๏ธŽ CDN ๋„คํŠธ์›Œํฌ์— ๋ถ„์‚ฐ๋œ ์บ์‹œ ์„œ๋ฒ„.
    • โ†˜๏ธŽ ์‚ฌ์šฉ์ž์—๊ฒŒ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์„œ๋ฒ„๊ฐ€ ์ฝ˜ํ…์ธ ๋ฅผ ์ œ๊ณตํ•จ.
  • 3๏ธโƒฃ ์บ์‹ฑ(Caching)
    • โ†˜๏ธŽ ์—ฃ์ง€ ์„œ๋ฒ„(Edge Server)๊ฐ€ ์˜ค๋ฆฌ์ง„ ์„œ๋ฒ„(Origin Server)์˜ ์ฝ˜ํ…์ธ ๋ฅผ ์บ์‹ฑ(Caching, ์ž„์‹œ ์ €์žฅ)ํ•จ.
  • 4๏ธโƒฃ ์‚ฌ์šฉ์ž ์š”์ฒญ(Request)
    • โ†˜๏ธŽ ์‚ฌ์šฉ์ž๊ฐ€ ์ฝ˜ํ…์ธ ์— ์ ‘๊ทผํ•˜๋ ค๊ณ  ์š”์ฒญํ•จ.
    • โ†˜๏ธŽ CDN(Content Delivery Network)์€ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์—ฃ์ง€ ์„œ๋ฒ„(Edge Server)์—์„œ ์ฝ˜ํ…์ธ ๋ฅผ ์ œ๊ณตํ•˜์—ฌ ์‘๋‹ต ์‹œ๊ฐ„์„ ๋‹จ์ถ•ํ•จ.
  • 5๏ธโƒฃ ์˜ค๋ฆฌ์ง„ ํด๋ฐฑ(Origin Fallback)
    • โ†˜๏ธŽ ์—ฃ์ง€ ์„œ๋ฒ„(Edge Server)์— ์ฝ˜ํ…์ธ ๊ฐ€ ์—†์„ ๊ฒฝ์šฐ, ์˜ค๋ฆฌ์ง„ ์„œ๋ฒ„(Origin Server)์—์„œ ์ฝ˜ํ…์ธ ๋ฅผ ๊ฐ€์ ธ์™€ ์‚ฌ์šฉ์ž์—๊ฒŒ ์ œ๊ณตํ•จ.

3๏ธโƒฃ CDN(Content Delivery Network)์˜ ์ฃผ์š” ๊ธฐ๋Šฅ.

  • 1๏ธโƒฃ ์ฝ˜ํ…์ธ  ์บ์‹ฑ
    • โ†˜๏ธŽ ์ž์ฃผ ์‚ฌ์šฉ๋˜๋Š” ์ฝ˜ํ…์ธ ๋ฅผ ์—ฃ์ง€ ์„œ๋ฒ„(Edge Server)์— ์ €์žฅํ•˜์—ฌ ๋น ๋ฅด๊ฒŒ ์ œ๊ณต.
  • 2๏ธโƒฃ ๋กœ๋“œ ๋ฐธ๋Ÿฐ์‹ฑ(Load Balancing)
    • โ†˜๏ธŽ ์—ฌ๋Ÿฌ ์„œ๋ฒ„ ๊ฐ„์— ํŠธ๋ž˜ํ”ฝ์„ ๋ถ„์‚ฐํ•˜์—ฌ ๊ณผ๋ถ€ํ•˜ ๋ฐฉ์ง€.
  • 3๏ธโƒฃ DDoS ๋ณดํ˜ธ
    • โ†˜๏ธŽ ์•…์˜์ ์ธ ํŠธ๋ž˜ํ”ฝ์„ ๊ฐ์ง€ ๋ฐ ์ฐจ๋‹จ.
  • 4๏ธโƒฃ SSL/TLS ์•”ํ˜ธํ™”
    • ์•ˆ์ „ํ•œ HTTPS ์—ฐ๊ฒฐ ์ œ๊ณต.
  • 5๏ธโƒฃ ๋™์  ์ฝ˜ํ…์ธ  ์ตœ์ ํ™”
    • ๋™์  ์ฝ˜ํ…์ธ (JavaScript, API ์š”์ฒญ ๋“ฑ)๋„ ํšจ์œจ์ ์œผ๋กœ ์ „๋‹ฌ.
  • 6๏ธโƒฃ ์••์ถ• ๋ฐ ์ตœ์ ํ™”
    • ์ฝ˜ํ…์ธ ๋ฅผ ์••์ถ•ํ•˜์—ฌ ๋„คํŠธ์›Œํฌ ํŠธ๋ž˜ํ”ฝ ๊ฐ์†Œ.

4๏ธโƒฃ CDN(Content Delivery Network)์˜ ์žฅ์ .

  • 1๏ธโƒฃ ๋น ๋ฅธ ์ฝ˜ํ…์ธ  ์ œ๊ณต
    • โ†˜๏ธŽ ์‚ฌ์šฉ์ž์™€ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์—ฃ์ง€ ์„œ๋ฒ„(Edge Server)์—์„œ ์ฝ˜ํ…์ธ ๋ฅผ ์ œ๊ณตํ•˜์—ฌ ์ง€์—ฐ ์‹œ๊ฐ„ ๊ฐ์†Œ.
  • 2๏ธโƒฃ ํŠธ๋ž˜ํ”ฝ ๋ถ„์‚ฐ
    • โ†˜๏ธŽ ์˜ค๋ฆฌ์ง„ ์„œ๋ฒ„(Origin Server)์˜ ๊ณผ๋ถ€ํ•˜๋ฅผ ์ค„์ด๊ณ  ์•ˆ์ •์ ์ธ ์„œ๋น„์Šค ์ œ๊ณต.
  • 3๏ธโƒฃ ๊ธ€๋กœ๋ฒŒ ์ปค๋ฒ„๋ฆฌ์ง€
    • โ†˜๏ธŽ ์ „ ์„ธ๊ณ„ ์‚ฌ์šฉ์ž๊ฐ€ ๋™์ผํ•œ ์†๋„๋กœ ์ฝ˜ํ…์ธ ์— ์ ‘๊ทผ ๊ฐ€๋Šฅ.
  • 4๏ธโƒฃ ๋ณด์•ˆ ๊ฐ•ํ™”
    • โ†˜๏ธŽ DDoS ๊ณต๊ฒฉ ๋ฐฉ์–ด, SSL ์•”ํ˜ธํ™” ๋“ฑ.
  • 5๏ธโƒฃ ๊ฐ€์šฉ์„ฑ ๋ฐ ์•ˆ์ •์„ฑ
    • ์„œ๋ฒ„ ์žฅ์•  ์‹œ ๋‹ค๋ฅธ ์—ฃ์ง€ ์„œ๋ฒ„(Edge Server)๋กœ ๋Œ€์ฒด.

5๏ธโƒฃ CDN(Content Delivery Network)์˜ ๋‹จ์ .

  • 1๏ธโƒฃ ๋น„์šฉ ๋ฐœ์ƒ
    • โ†˜๏ธŽ ๋Œ€๊ทœ๋ชจ ์‚ฌ์šฉ์ž์˜ ๊ฒฝ์šฐ CDN(Content Delivery Network) ๋น„์šฉ์ด ์ฆ๊ฐ€ํ•  ์ˆ˜ ์žˆ์Œ.
  • 2๏ธโƒฃ ๋ณต์žกํ•œ ์„ค์ •
    • โ†˜๏ธŽ ์ดˆ๊ธฐ ์„ค์ • ๋ฐ ์œ ์ง€ ๊ด€๋ฆฌ๊ฐ€ ๋ณต์žกํ•  ์ˆ˜ ์žˆ์Œ.
  • 3๏ธโƒฃ ์บ์‹œ ๋ฌดํšจํ™” ๋ฌธ์ œ
    • โ†˜๏ธŽ ์—…๋ฐ์ดํŠธ๋œ ์ฝ˜ํ…์ธ ๊ฐ€ ์ฆ‰์‹œ ๋ฐ˜์˜๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Œ.

6๏ธโƒฃ CDN(Content Delivery Network) ์‚ฌ์šฉ ์‚ฌ๋ก€.

  • 1๏ธโƒฃ ์›น์‚ฌ์ดํŠธ ๋ฐ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜
    • โ†˜๏ธŽ ๋น ๋ฅธ ๋กœ๋”ฉ ์†๋„ ๋ฐ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜ ๊ฐœ์„ .
  • 2๏ธโƒฃ ์ŠคํŠธ๋ฆฌ๋ฐ ์„œ๋น„์Šค
    • โ†˜๏ธŽ ๋™์˜์ƒ ๋ฐ ์˜ค๋””์˜ค ์ŠคํŠธ๋ฆฌ๋ฐ ์•ˆ์ •ํ™”.
  • 3๏ธโƒฃ ์˜จ๋ผ์ธ ๊ฒŒ์ž„
    • โ†˜๏ธŽ ์ง€์—ฐ ์‹œ๊ฐ„ ๊ฐ์†Œ ๋ฐ ์‹ค์‹œ๊ฐ„ ๋ฐ์ดํ„ฐ ์ „์†ก ์ตœ์ ํ™”.
  • 4๏ธโƒฃ ์ „์ž์ƒ๊ฑฐ๋ž˜(E-commerce)
    • โ†˜๏ธŽ ๊ธ€๋กœ๋ฒŒ ์‚ฌ์šฉ์ž์—๊ฒŒ ์‹ ์†ํ•œ ์ฝ˜ํ…์ธ  ์ œ๊ณต.
  • 5๏ธโƒฃ API ์„œ๋น„์Šค
    • โ†˜๏ธŽ API ์š”์ฒญ์˜ ์ง€์—ฐ ์‹œ๊ฐ„ ์ตœ์ ํ™”.

7๏ธโƒฃ ์œ ๋ช…ํ•œ CDN(Content Delivery Network) ์ œ๊ณต ์—…์ฒด.

  • 1๏ธโƒฃ AWS CloudFront
    • โ†˜๏ธŽ Amazon Web Services์—์„œ ์ œ๊ณตํ•˜๋Š” CDN ์„œ๋น„์Šค.
  • 2๏ธโƒฃ Cloudflare
    • โ†˜๏ธŽ ๋ณด์•ˆ ๋ฐ ์„ฑ๋Šฅ ์ตœ์ ํ™”์— ๊ฐ•์ .
  • 3๏ธโƒฃ Akamai
    • โ†˜๏ธŽ ๊ธ€๋กœ๋ฒŒ ์‹œ์žฅ์—์„œ ๊ฐ€์žฅ ์˜ค๋ž˜๋œ CDN ์ œ๊ณต ์—…์ฒด.
  • 4๏ธโƒฃ Fastly
    • โ†˜๏ธŽ ์‹ค์‹œ๊ฐ„ ์ฝ˜ํ…์ธ  ์ œ๊ณต์— ๊ฐ•์ .
  • 5๏ธโƒฃ Google Cloud CDN
    • โ†˜๏ธŽ Google Cloud ํ”Œ๋žซํผ ํ†ตํ•ฉ CDN

8๏ธโƒฃ CDN(Content Delivery Network)๊ณผ ์บ์‹œ(Cache)์˜ ์ฐจ์ด์ .

๊ตฌ๋ถ„ CDN Cache
ํ•ต์‹ฌ ์—ญํ•  ๊ธ€๋กœ๋ฒŒ ๋„คํŠธ์›Œํฌ๋ฅผ ํ†ตํ•ด ์ฝ˜ํ…์ธ  ์ „๋‹ฌ ์ตœ์ ํ™” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋˜๋Š” ๋ธŒ๋ผ์šฐ์ € ๋ฉ”๋ชจ๋ฆฌ์— ๋ฐ์ดํ„ฐ ์ €์žฅ ๋ฐ ๋น ๋ฅธ ์ ‘๊ทผ
์ œ๊ณต ์ปจํ…์ธ  ์ฃผ๋กœ ์ •์  ์ฝ˜ํ…์ธ (์ด๋ฏธ์ง€, CSS, JS) ๋ฐ ์ผ๋ถ€ ๋™์  ์ฝ˜ํ…์ธ  ์ฃผ๋กœ ์ •์  ์ฝ˜ํ…์ธ (์ž์ฃผ ์กฐํšŒ๋˜๋Š” ๋ฐ์ดํ„ฐ, ์ฟผ๋ฆฌ ๊ฒฐ๊ณผ)
์ œ๊ณต ์œ„์น˜ ์ฃผ๋กœ ์‚ฌ์šฉ์ž์™€ ๊ฐ€๊นŒ์šด ์—ฃ์ง€ ์„œ๋ฒ„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋กœ์ปฌ ๋ฉ”๋ชจ๋ฆฌ ๋˜๋Š” ๋ธŒ๋ผ์šฐ์ € ์บ์‹œ
๋ชฉ์  ๋„คํŠธ์›Œํฌ ๋Œ€๊ธฐ ์‹œ๊ฐ„(Latency) ๊ฐ์†Œ, ๊ธ€๋กœ๋ฒŒ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜ ์ตœ์ ํ™” ๋ฐ˜๋ณต์ ์ธ ๋ฐ์ดํ„ฐ ์š”์ฒญ ์ตœ์†Œํ™”, ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์„ฑ๋Šฅ ์ตœ์ ํ™”
์˜ˆ์‹œ AWS CloudFront, Cloudflare, Akamai Redis, Memcached, ๋ธŒ๋ผ์šฐ์ € ์บ์‹œ

9๏ธโƒฃ CDN(Content Delivery Network)์„ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ.

  • 1๏ธโƒฃ ๊ธ€๋กœ๋ฒŒ ์‚ฌ์šฉ์ž ๋Œ€์ƒ ์„œ๋น„์Šค.
  • 2๏ธโƒฃ ๊ณ ์„ฑ๋Šฅ ๋ฐ ๋‚ฎ์€ ์ง€์—ฐ ์‹œ๊ฐ„ ์š”๊ตฌ.
  • 3๏ธโƒฃ ๋Œ€๊ทœ๋ชจ ํŠธ๋ž˜ํ”ฝ ์ฒ˜๋ฆฌ.
  • 4๏ธโƒฃ ๋ณด์•ˆ ๊ฐ•ํ™” ํ•„์š” (DDoS ๋ณดํ˜ธ ๋“ฑ)
  • 5๏ธโƒฃ ์ŠคํŠธ๋ฆฌ๋ฐ ๋ฐ ๋ฏธ๋””์–ด ์ฝ˜ํ…์ธ  ์ œ๊ณต

1๏ธโƒฃ0๏ธโƒฃ CDN(Content Delivery Network) ์ตœ์ ํ™” ํŒ.

  • 1๏ธโƒฃ TTL(Time To Live) ์„ค์ • ์ตœ์ ํ™”.
  • 2๏ธโƒฃ ์ •์  ๋ฐ ๋™์  ์ฝ˜ํ…์ธ  ๋ถ„๋ฆฌ.
  • 3๏ธโƒฃ SSL/TLS ํ™œ์„ฑํ™”.
  • 4๏ธโƒฃ ์บ์‹œ ๋ฌดํšจํ™” ์ •์ฑ… ์„ค์ •.
  • 5๏ธโƒฃ ๋ชจ๋‹ˆํ„ฐ๋ง ๋ฐ ๋ถ„์„ ๋„๊ตฌ ์‚ฌ์šฉ.

๐Ÿš€ ๊ฒฐ๋ก .

  • CDN(Content Deilvery Network)์€ ํ˜„๋Œ€ ์›น ์„œ๋น„์Šค์—์„œ ํ•„์ˆ˜์ ์ธ ๊ธฐ์ˆ ๋กœ, ์ฝ˜ํ…์ธ  ์ „๋‹ฌ ์†๋„๋ฅผ ๊ฐœ์„ ํ•˜๊ณ  ์„œ๋ฒ„ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐ์‹œํ‚ค๋ฉฐ ๋ณด์•ˆ์„ ๊ฐ•ํ™”ํ•˜๋Š” ์—ญํ• ์„ ํ•จ.
  • ๋น„์šฉ๊ณผ ์‚ฌ์šฉ ์‚ฌ๋ก€๋ฅผ ๊ณ ๋ คํ•ด ์ ํ•ฉํ•œ CDN ์ œ๊ณต์—…์ฒด๋ฅผ ์„ ํƒํ•˜๊ณ  ์ตœ์ ํ™”ํ•ด์•ผ ํ•จ.
  • ๐Ÿ”‘ ํ•ต์‹ฌ: โ€œCDN์€ ์‚ฌ์šฉ์ž์—๊ฒŒ ๋” ๋น ๋ฅด๊ณ  ์•ˆ์ •์ ์œผ๋กœ ์ฝ˜ํ…์ธ ๋ฅผ ์ „๋‹ฌํ•˜๊ธฐ ์œ„ํ•ด ๋ถ„์‚ฐ๋œ ์„œ๋ฒ„ ๋„คํŠธ์›Œํฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ธฐ์ˆ ์ž„.โ€