[10๋ถ„ ํ…Œ์ฝ”ํ†ก] ๐Ÿค”๋””๋””์˜ Redis

JIWOO YUNยท2023๋…„ 4์›” 12์ผ
0
post-custom-banner

movie


Redis

  • Remote Dictionary Server
  • Cache
    • ๋‚˜์ค‘์— ์š”์ฒญ์— ๋Œ€ํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋ฏธ๋ฆฌ ์ €์žฅํ–ˆ๋‹ค๊ฐ€ ๋น ๋ฅด๊ฒŒ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ
  • Database๋ณด๋‹ค ๋” ๋น ๋ฅธ Memory์— ๋” ์ž์ฃผ์ ‘๊ทผํ•˜๊ณ  ๋œ ์ž์ฃผ ๋ฐ”๋€Œ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜์ž.
    • in memory database => Redis
  • Single Thread

Redis ์ž๋ฃŒ ๊ตฌ์กฐ

  • Collection ์ž๋ฃŒ๊ตฌ์กฐ๋ฅผ ์ œ๊ณต
    • String , List , Set , Sorted Set,Hash

Redis๋Š” ์–ด๋””์— ์‚ฌ์šฉ๋˜๋Š”๊ฐ€?

  • ์—ฌ๋Ÿฌ ์„œ๋ฒ„์—์„œ ๊ฐ™์€ ๋ฐ์ดํ„ฐ๋ฅผ ๊ณต์œ ํ•  ๋•Œ
  • singServer์ผ๊ฒฝ์šฐ - Atomic ์ž๋ฃŒ๊ตฌ์กฐ & ์บ์‹œ๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ

์ฃผ์˜์ 

  • Single Thread ์ด๊ธฐ ๋•Œ๋ฌธ์— ์‹œ๊ฐ„๋ณต์žก๋„๋ฅผ ๊ณ ๋ ค ํ•„์š”(O(N)์ด์ƒ์˜ ์‹œ๊ฐ„์ด ๊ฑธ๋ฆด๊ฒฝ์šฐ ๋Œ๋ฆฌ๋ฉด ์œ„ํ—˜)
  • In-memory ํŠน์„ฑ์ƒ ๋ฉ”๋ชจ๋ฆฌ ํŒŒํŽธํ™”, ๊ฐ€์ƒ ๋ฉ”๋ชจ๋ฆฌ๋“ฑ์˜ ์ดํ•ด๊ฐ€ ํ•„์š”ํ•จ.

๋ ˆ๋””์Šค๊ฐ€ ์™œ Single Thread ๋™์ž‘์„ ํ•˜๋Š”๊ฐ€?

  • ์—ฌ๋Ÿฌ ๊ฐ€์ง€๊ฐ€ ์žˆ์ง€๋งŒ, ๊ฐœ๋ฐœ์˜ ๋‹จ์ˆœํ•จ์„ ์œ„ํ•ด์„œ ์‚ฌ์šฉํ•œ๋‹ค.
profile
์—ด์‹ฌํžˆํ•˜์ž
post-custom-banner

0๊ฐœ์˜ ๋Œ“๊ธ€