0607 - 0613


# 0607 - 0613

# 0609 - ๋ฌด์ค‘๋‹จ ๋ฐฐํฌ๋ฅผ ์œ„ํ•œ ํ™˜๊ฒฝ ์ดํ•ดํ•˜๊ธฐ

# ๋ฌด์ค‘๋‹จ ๋ฐฐํฌ?

๋ฐฐํฌ๋ฅผ ์ค‘๋‹จ์—†์ด ํ•œ๋‹ค๋Š” ๊ฒƒ
๋ฐฐํฌ(deploy)๋ž€ ๊ฐœ๋ฐœํ™˜๊ฒฝ์—์„œ ์ƒˆ๋กœ ๊ฐœ๋ฐœ๋œ ์ฝ”๋“œ๋ฅผ ํŒจํ‚ค์ง•ํ•˜์—ฌ ์„œ๋ฒ„์—์„œ ์ƒˆ๋กœ์šด ๋ฒ„์ „์˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‹คํ–‰

# ๋ฐฐํฌ ๊ณผ์ •

  • ์ผ๋ฐ˜์ ์ธ ๋ฐฐํฌ์—์„œ์˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ค‘๋‹จ
  1. ์ด์ „ ๋ฒ„์ „์˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ข…๋ฃŒ
  2. ์ƒˆ๋กœ์šด ๋ฒ„์ „ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‹คํ–‰
  3. ์ƒˆ๋กœ์šด ๋ฒ„์ „ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ์š”์ฒญ์„ ๋ฐ›์„ ์ค€๋น„๊ฐ€ ๋  ๋•Œ๊นŒ์ง€ ์„œ๋น„์Šค ์ค‘๋‹จ => ์„œ๋น„์Šค๊ฐ€ ์ค‘๋‹จ๋˜๋Š” ์‹œ๊ฐ„์„ ๋‹ค์šดํƒ€์ž„(downtime)์ด๋ผํ•œ๋‹ค.

# ๋ฌด์ค‘๋‹จ ๋ฐฐํฌ

์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์„œ๋ฒ„์™€ ์‚ฌ์šฉ์ž ์‚ฌ์ด์—์„œ ์š”์ฒญ์„ ์ค‘๊ณ„ํ•ด์ฃผ๋Š” ๋ฆฌ๋ฒ„์Šค ํ”„๋ก์‹œ(Reverse Proxy) ์„œ๋ฒ„๋ฅผ ์‚ฌ์šฉ. => ๋กค๋ง(Rolling) ๋ฐฐํฌ

  • ํ”„๋ก์‹œ๋ž€?
    • ์ผ๋ฐ˜์ ์ธ ํ”„๋ก์‹œ๋Š” ํด๋ผ์ด์–ธํŠธ๋ฅผ ์ˆจ๊ฒจ์ฃผ๋Š” ์—ญํ• 
    • ๋Œ€๋ฆฌ์ž
    • ๋ฆฌ๋ฒ„์Šค ํ”„๋ก์‹œ๋Š” ํ”„๋ก์‹œ์™€ ๋ฐ˜๋Œ€๋กœ ์„œ๋ฒ„๋ฅผ ์ˆจ๊ฒจ์ฃผ๋Š” ์—ญํ• 
  • ๋กœ๋“œ๋ฐธ๋Ÿฐ์‹ฑ์ด๋ž€?
    • ํŠธ๋ž˜ํ”ฝ์„ ๋ถ„์‚ฐํ•˜์—ฌ ๊ฐ ์„œ๋ฒ„๊ฐ€ ๋ฐ›๋Š” ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๋Š” ๊ฒƒ
  • Nginx
    • ๋ฌด์ค‘๋‹จ ๋ฐฐํฌ์™€ ๋กœ๋“œ๋ฐธ๋Ÿฐ์‹ฑ์„ ์œ„ํ•ด ์‚ฌ์šฉ
  • ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฐฐํฌ ๋ฐฉ์‹
    • ๋กค๋ง ๋ฐฐํฌ, ๋ธ”๋ฃจ๊ทธ๋ฆฐ ๋ฐฐํฌ, ์นด๋‚˜๋ฆฌ ๋ฐฐํฌ

# ํŠธ๋ ˆํ”ฝ์ด ๋งŽ์•„์กŒ์„ ๋•Œ์˜ ๋กœ๋“œ๋ฐธ๋Ÿฐ์‹ฑ

  1. Nginx๊ฐ€ ์‹คํ–‰๋˜๋Š” ์„œ๋ฒ„์˜ Scale-up
  2. ๋„คํŠธ์›Œํฌ ์žฅ์น˜๋กœ ๋กœ๋“œ ๋ฐธ๋Ÿฐ์‹ฑ(ํ•˜๋“œ์›จ์–ด ์ ์œผ๋กœ)
    • L4 ์Šค์œ„์น˜ ๋˜๋Š” L7 ์Šค์œ„์น˜
  3. DNS ๋ฆฌ๋‹ค๋ฆฌ๋ ‰์…˜

# 0611 - StringTokenizer

# StringTokenizer ์ƒ์„ฑ์ž

// ๋„์–ด์“ฐ๊ธฐ ๊ธฐ์ค€์œผ๋กœ ๋ฌธ์ž์—ด์„ ๋ถ„๋ฆฌ
StringTokenizer st = new StringTokenizer(๋ฌธ์ž์—ด);

// ๊ตฌ๋ถ„์ž๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋ฌธ์ž์—ด์„ ๋ถ„๋ฆฌ 
StringTokenizer st = new StringTokenizer(๋ฌธ์ž์—ด, ๊ตฌ๋ถ„์ž);

// ๊ตฌ๋ถ„์ž๋„ ํ† ํฐ์œผ๋กœ ๋„ฃ์„์ง€ (true)
StringTokenizer st = new StringTokenizer(๋ฌธ์ž์—ด, ๊ตฌ๋ถ„์ž, boolean);

# StringTokenizer ๋ฉ”์„œ๋“œ

st_๋ฉ”์„œ๋“œ

# StringTokenizer vs Split

  1. StringTokenizer๋Š” java.util์— ํฌํ•จ๋˜์–ด ์žˆ๋Š” ํด๋ž˜์Šค, split๋Š” Stringํด๋ž˜์Šค์— ์†ํ•ด์žˆ๋Š” ๋ฉ”์†Œ๋“œ.
  2. StringTokenizer๋Š” ๋ฌธ์ž ๋˜๋Š” ๋ฌธ์ž์—ด์„ ๊ตฌ๋ถ„, split๋Š” ์ •๊ทœํ‘œํ˜„์‹์œผ๋กœ ๊ตฌ๋ถ„
  3. StringTokenizer๋Š” ๋นˆ ๋ฌธ์ž์—ด์„ ํ† ํฐ์œผ๋กœ ์ธ์‹X, split๋Š” ๋นˆ ๋ฌธ์ž์—ด์„ ํ† ํฐ์œผ๋กœ ์ธ์‹
  4. StringTokenizer๋Š” ๊ฒฐ๊ณผ๊ฐ’์ด ๋ฌธ์ž์—ด, split๋Š” ๊ฒฐ๊ณผ ๊ฐ’์ด ๋ฌธ์ž์—ด ๋ฐฐ์—ด

# 0612 - TDD, BDD, DDD, RDD

# TDD (Test)

  • ํ…Œ์ŠคํŠธ๋ฅผ ๋จผ์ € ์ž‘์„ฑํ•˜๊ณ  ํ•ด๋‹น ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋ฅผ ํ†ต๊ณผํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑ
  • ๊ทธ ํ›„ ์ƒํ™ฉ์— ๋งž๊ฒŒ ๋ฆฌํŒฉํ† ๋ง ๊ณผ์ •์„ ๊ฑฐ์นจ
  • ์ฝ”๋“œ ์ƒ์‚ฐ์„ฑ์— ๋ฌธ์ œ๊ฐ€ ์žˆ๊ณ , ๋Ÿฌ๋‹์ปค๋ธŒ๊ฐ€ ํฌ๋‹ค.

# BDD (Behavior)

  • TDD์—์„œ ํ•œ๋ฐœ ๋” ๋‚˜์•„๊ฐ€ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ์ž์ฒด๊ฐ€ ์š”๊ตฌ์‚ฌํ•ญ์ด ๋˜๋Š” ๊ฐœ๋ฐœ ๋ฐฉ์‹
  • TDD์—์„œ๋Š” ์œ ๋‹› ํ…Œ์ŠคํŠธ๋กœ ์ž‘์„ฑ ๋œ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค์— ๋Œ€ํ•œ ๋ฌธ์„œ๋ฅผ ์ž‘์„ฑํ–ˆ์ง€๋งŒ, BDD๋Š” ์ด๊ฒƒ์„ ๊ฒฐํ•ฉ ํ…Œ์ŠคํŠธ์™€ ์‹œ๋‚˜๋ฆฌ์˜ค ํ…Œ์ŠคํŠธ๊นŒ์ง€ ํ™•์žฅํ•˜์—ฌ ๊ฐ๊ฐ์— ํ•ด๋‹นํ•˜๋Š” ๋ฌธ์„œ๋ฅผ ๋Œ€์ฒดํ•œ๋‹ค.

# DDD (Domain)

  • ๋„๋ฉ”์ธ ๊ทธ ์ž์ฒด์™€ ๋„๋ฉ”์ธ ๋กœ์ง์— ์ดˆ์ ์„ ๋งž์ถ˜๋‹ค.
  • ์ผ๋ฐ˜์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๋Š” ๋ฐ์ดํ„ฐ ์ค‘์‹ฌ์˜ ์ ‘๊ทผ๋ฒ•์„ ํƒˆํ”ผํ•˜์—ฌ ์ˆœ์ˆ˜ํ•œ ๋„๋ฉ”์ธ์˜ ๋ชจ๋ธ๊ณผ ๋กœ์ง์— ์ง‘์ค‘ํ•œ๋‹ค.

# RDD (Responsibility)

  • ์ฑ…์ž„์„ ์ฐพ๊ณ  ์ฑ…์ž„์„ ์ˆ˜ํ–‰ํ•œ ์ ์ ˆํ•œ ๊ฐ์ฒด๋ฅผ ์ฐพ์•„ ์ฑ…์ž„์„ ํ• ๋‹นํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ํ˜‘๋ ฅ์„ ์„ค๊ณ„ํ•˜๋Š” ๋ฐฉ๋ฒ•
  • ๊ฐ์ฒด์˜ ๊ตฌํ˜„์ด ์•„๋‹Œ ์ฑ„์ž„์— ์ง‘์ค‘
Last update: July 22, 2021 19:09
Contributors: jaesungahn91