Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸš€ [feature] λ ˆλ””μŠ€ μž₯애상황 μΆœμ„ λŒ€λΉ„ #104

Open
binary-ho opened this issue Oct 23, 2023 · 0 comments
Assignees
Labels
Feature μƒˆλ‘œμš΄ κΈ°λŠ₯ μΆ”κ°€ 및 κ΅¬ν˜„

Comments

@binary-ho
Copy link
Owner

binary-ho commented Oct 23, 2023

문제 상황

ν˜„μž¬ κ΅¬ν˜„μœΌλ‘œλŠ”, μˆ˜κ°•μƒ 정보 (Attendee) 캐싱은 μ‹€νŒ¨ν•˜λ”λΌλ„ μΆœμ„μ΄ κ°€λŠ₯ν•˜μ§€λ§Œ,
μ—΄λ¦° μˆ˜μ—…μ— λŒ€ν•œ 정보인 OpenLecture 객체의 캐싱에 μ‹€νŒ¨ν•œλ‹€λ©΄ μΆœμ„μ΄ λΆˆκ°€λŠ₯ν•œ 상황이닀. (μˆ˜μ—… OPEN이 λΆˆκ°€λŠ₯ν•˜λ‹€) 즉, λ ˆλ””μŠ€μ— λ¬Έμ œκ°€ 생긴닀면 μ˜μ›νžˆ μΆœμ„ν•  수 μ—†κ²Œ λœλ‹€.
λ˜ν•œ νšŒμ›κ°€μž… κ³Όμ •μ—μ„œ 이메일 인증을 ν•˜λŠ”λ° 이 λ•Œλ„ λ ˆλ””μŠ€ μ‚¬μš©μ΄ ν•„μˆ˜λ‹€! λ¬Όλ‘  λ‚˜μ€‘μ— OAuthκ°€ λ„μž…λ˜λ©΄μ„œ 이메일 인증은 λΆˆν•„μš”ν•΄μ§€λ‚˜, λΆ„λͺ… κ³ λ―Όν•΄λ΄€μ–΄μ•Ό ν•˜λŠ”κ²Œ λ§žλŠ” λ¬Έμ œλ‹€.



κ°μ‚¬ν•˜κ²Œλ„ μ–Όλ§ˆ μ „ λ©΄μ ‘ μžλ¦¬μ—μ„œ 이 뢀뢄에 λŒ€ν•΄ μ–΄λ–€ λŒ€μ²˜λ₯Ό 생각해 λ³΄μ•˜λŠ”μ§€μ— λŒ€ν•œ μ§ˆλ¬Έμ„ λ°›μ•˜κ³ 
문제λ₯Ό μΈμ‹ν•˜κ²Œ 됐닀.

ν•΄κ²°μ±… 후보듀

일단 기본적으둜 Redis μž₯애에 λŒ€ν•œ 경보λ₯Ό μ„€μΉ˜ν•œλ‹€.

  1. Redis의 κ°€μš©μ„± κΈ°λŠ₯듀인 μ„ΌνŠΈλŸ΄μ΄λ‚˜ ν΄λŸ¬μŠ€ν„°λ§ κΈ°λŠ₯듀은 λ„ˆλ¬΄ κ±°μ°½ν•˜λ‹€. 이듀은 μ—¬λŸ¬ μ„œλ²„λ₯Ό μš΄μš©ν•˜λŠ” κ²½μš°μ— μ“Έλ§Œν•˜λ‹€.
    • μ„ΌνŠΈλŸ΄μ€ μ΅œμ†Œ 3개의 물리 μ„œλ²„λ₯Ό μš΄μš©ν•  것을 κΆŒν•˜κ³  μžˆλ‹€.
    • ν΄λŸ¬μŠ€ν„°λ§ λ˜ν•œ λ‹€μˆ˜μ˜ λ…Έλ“œλ₯Ό μ‚¬μš©ν•  것을 κΆŒν•˜κ³  μžˆλ‹€.
    • λ‹¨μˆœ λ³΅μ œλŠ” λ°μ΄ν„°λŠ” μ €μž₯λ˜μ§€λ§Œ, μžλ™ 볡ꡬ가 μ•ˆ λœλ‹€.
    • Redis κ°€μš©μ„± λ•Œλ¬Έμ— 그만큼의 μ„œλ²„λ₯Ό μš΄μš©ν•˜λŠ” 것은 큰 낭비이닀.
  2. λ ˆλ””μŠ€ μ‚¬μš©μ΄ λΆˆκ°€λŠ₯ν•œ λ™μ•ˆ DBλ‚˜ 둜컬 μΊμ‹œλ₯Ό μž„μ‹œλ‘œ μ‚¬μš©ν•˜λ„λ‘ ν•œλ‹€.
    • μ§€κΈˆ κ°€μž₯ μ‹œλ„ν•΄ 보고 싢은 방법이닀.
    • λ¬Έμ œλŠ” μž₯μ• λŠ” μ–΄λ–»κ²Œ νŒλ‹¨ν•  것이냐, μž₯μ• κ°€ λλ‚˜λŠ” 것은 μ–΄λ–»κ²Œ νŒλ‹¨ν•  것이냐, μž₯μ• κ°€ λλ‚œ 이후 μž„μ‹œ μ €μž₯μ†Œμ˜ λ°μ΄ν„°λŠ” μ–΄λ–»κ²Œ λ‹€μ‹œ λ ˆλ””μŠ€μ— μ €μž₯ν•  것이냐이닀. ν•œλ²ˆ κ³ λ―Όν•΄λ³΄μž.
  3. λ ˆλ””μŠ€λ₯Ό μ „λΆ€ κ±·μ–΄λ‚΄κ³  둜컬 μΊμ‹±μœΌλ‘œ λŒ€μ²΄ν•œλ‹€
    • μ†”μ§νžˆ ν˜„μž¬ 이 방법을 μ„ νƒν•˜μ§€ μ•Šμ„ μ΄μœ κ°€ μ—†λ‹€. 맨 μ²˜μŒμ—” μ „ν˜€ κ³ λ €ν•˜μ§€ λͺ»ν–ˆκ³ , μ§€κΈˆμ€ λŒ€μ²΄ν•˜μ§€ μ•Šμ„ μ΄μœ κ°€ μ—†λ‹€κ³  μƒκ°ν•œλ‹€. ν•˜μ§€λ§Œ, ν‰μ†Œ Redisλ₯Ό κ³΅λΆ€ν•˜κ³  μ‹Άμ—ˆλ˜ 만큼 일단 계속 μ‚¬μš©ν•΄λ³΄λ €κ³  ν•œλ‹€. μ‹€μ œλ‘œ μ΄μ œκΉŒμ§€ Redisλ₯Ό μ‚¬μš©ν•˜λ©΄μ„œ 많이 κ³΅λΆ€ν•˜κ²Œ λμ—ˆλ‹€. λ‚˜μ€‘μ— λ™μ‹œ μ“°κΈ° κ°œμ„ μ— 쓰일 μˆ˜λ„ μžˆλŠ”λ°, κ·Έ 뒀에도 μ • ν•„μš” μ—†λ‹€λ©΄ κ±·μ–΄λ‚΄μž

β˜‘ Implement TODO

  • [ ]
@binary-ho binary-ho added the Feature μƒˆλ‘œμš΄ κΈ°λŠ₯ μΆ”κ°€ 및 κ΅¬ν˜„ label Oct 23, 2023
@binary-ho binary-ho self-assigned this Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature μƒˆλ‘œμš΄ κΈ°λŠ₯ μΆ”κ°€ 및 κ΅¬ν˜„
Projects
None yet
Development

No branches or pull requests

1 participant