๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ‘พ Server/๐Ÿ‘ป ์žฅ์• 2

[์„œ๋ฒ„ ์žฅ์• ] HTTPS -> HTTP ํ†ต์‹  ๋ถˆ๊ฐ€(์›น ๋ธŒ๋ผ์šฐ์ €์˜ Mixed Content ์ฐจ๋‹จ) ์‚ฌ๊ฑด์˜ ๊ฐœ์š” ํ† ์ด ํ”„๋กœ์ ํŠธ(FE ์„œ๋ฒ„, BE ์„œ๋ฒ„) ์ง„ํ–‰ ์ค‘์— ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค. ํ”„๋ก ํŠธ ์„œ๋ฒ„ https ๋ฐฐํฌ, ๋ฐฑ์—”๋“œ ์„œ๋ฒ„ http ๋ฐฐํฌ ํ›„ ํ”„๋ก ํŠธ -> ๋ฐฑ์—”๋“œ ์š”์ฒญ ์‹œ Midxed Content ์ฐจ๋‹จ๋๋‹ค. - ํ”„๋ก ํŠธ(react) ๋ฐฐํฌ : AWS CloudFront + S3 ์‚ฌ์šฉํ•œ HTTPS ์ง€์› - ๋ฐฑ์—”๋“œ(spring) ๋ฐฐํฌ : AWS ec2 DNS ์‚ฌ์šฉ X, HTTP ๋งŒ ์ง€์› ์‚ฌ๊ฑด์˜ ๊ทผ๋ณธ ์›์ธ ์›น๋ธŒ๋ผ์šฐ์ €(ํฌ๋กฌ, ํŒŒ์ดํผํญ์Šค ๋“ฑ) ์ž์ฒด์—์„œ Mixed Content ์ฐจ๋‹จํ•˜์—ฌ HTTP ์„œ๋ฒ„์ธ ๋ฐฑ์—”๋“œ๋กœ ๋ถ€ํ„ฐ API๋ฅผ ๋ฐ›์„ ์ˆ˜ ์—†์—ˆ๋‹ค. Mixed Content(ํ˜ผํ•ฉ ์ฝ˜ํ…์ธ )๋ž€ ๋ณด์•ˆ๋˜์ง€ ์•Š์€ HTTP ํ”„๋กœํ† ์ฝœ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ฆฌ์†Œ์Šค ์š”์ฒญํ•˜๋Š” ๊ฒฝ์šฐ ํ•ด์ปค(๊ณต๊ฒฉ์ž)๊ฐ€ ๋„คํŠธ์›Œํฌ ์—ฐ๊ฒฐ์„ ๋„์ฒญ ํ•˜๊ณ  ์ค‘๊ฐ„์ž ๊ณต๊ฒฉ(man-in-th.. 2022. 7. 2.
[์„œ๋ฒ„ ์žฅ์• ] AWS ํ”„๋ฆฌํ‹ฐ์–ด ๋ฐฐํฌ ํ›„ ์žฅ์•  - CPU ์‚ฌ์šฉ๋ฅ  100%, ํฌ๋ ˆ๋”ง 0๊ฐœ ์ดํ›„ ssh ์ ‘์†๋„ ์•ˆ๋˜๋Š” ์ƒํ™ฉ๊ณผ ํ•ด๊ฒฐ (HW / SW(ํŽ˜์ด์ง• limit ๋ฌธ์ œ) ์ƒํ™ฉ ec2 ํ™˜๊ฒฝ ec2 : AWS ํ”„๋ฆฌํ‹ฐ์–ด t2.micro app : Docker ์œ„์— Spring Server + Nginx ์™ธ๋ถ€ DB : ์•ฝ 10๋งŒ๊ฐœ ๋ฐ์ดํ„ฐ๊ฐ€ ์žˆ๋Š” MySQL airbnb์™€ ์œ ์‚ฌํ•œ ์ˆ™๋ฐ• ์•ฑ ํ”„๋กœ์ ํŠธ๋ฅผ ํ–ˆ๋‹ค. DB์— ์•ฝ 10๋งŒ์—ฌ๊ฐœ ๋”๋ฏธ ๋ฐ์ดํ„ฐ๋ฅผ ๋„ฃ๊ณ  ๋ฐฐํฌํ–ˆ๋‹ค. AWS ํ”„๋ฆฌํ‹ฐ์–ด ec2์— spring ๋ฐฐํฌํ•˜์—ฌ ์‚ฌ์šฉํ•˜๋˜ ์ค‘ ํด๋ผ์ด์–ธํŠธ์˜ ๋งŽ์€ ์š”์ฒญ ์ดํ›„ ์„œ๋ฒ„๊ฐ€ ์•„์˜ˆ ๋ฉˆ์ถฐ ์‘๋‹ต์„ ํ•ด์ฃผ์ง€ ์•Š์•˜๊ณ  ssh ์ ‘์†๋„ ๋˜์ง€ ์•Š์•˜๋‹ค. ๋ฌธ์ œ ํด๋ผ์ด์–ธํŠธ์˜ ๋งŽ์€ ์š”์ฒญ์œผ๋กœ CPU ์‚ฌ์šฉ๋ฅ ์ด 90% ์ด์ƒ์œผ๋กœ ์‚ฌ์šฉํ•˜๋‹ค CPU ํฌ๋ ˆ๋”ง์„ ๋ชจ๋‘ ์‚ฌ์šฉํ•˜์—ฌ CPU ์„ฑ๋Šฅ์ด ๋–จ์–ด์ ธ ์„œ๋ฒ„ ์‘๋‹ต์ด ๋งค์šฐ ๋Šฆ๊ฑฐ๋‚˜ ์•„์˜ˆ ssh ์ ‘์†๊นŒ์ง€ ์•ˆ ๋˜๋Š” ์ƒํ™ฉ ๋ฐœ์ƒ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•œ ์‹œ๋„ HW์  ํ•ด๊ฒฐ 1 : CPU ํฌ๋ ˆ๋”ง ์ดˆ๊ธฐํ™”ํ•˜๊ธฐ ์œ„ํ•œ ๋‹จ์ˆœํ•œ ๋ฐฉ๋ฒ• (.. 2022. 6. 9.