devHudi / hudi.blog

개인 블로그
https://hudi.blog
MIT License
17 stars 3 forks source link

concurrency-issue-causing-redis-cache-consistency-problem/ #100

Open utterances-bot opened 4 months ago

utterances-bot commented 4 months ago

동시성 이슈로 인해 발생한 레디스 캐시 정합성 이슈

https://hudi.blog/concurrency-issue-causing-redis-cache-consistency-problem/

be-student commented 4 months ago

오 잘 봤습니다 3번째 방법에서 궁금한 점인데요 조회 API에서 호출할때 무조건 데이터베이스 조회로 화살표가 가있던데 이 부분은 레디스쪽에 없으면 데이터베이스로 가는 방식이겠죠? 시점을 로컬 변수로 두기도 하고, 레디스에 한번 요청을 보내야한다는 점을 잘 기록해두기만 하면 되게 간단하게 해결했네요 감사합니다

devHudi commented 4 months ago

@be-student 넵넵 맞아요. 캐시가 없을때만 데이터베이스를 조회해요. 다이어그램에서는 생략했어요 🙂

parkmuhyeun commented 4 months ago

매번 좋은 퀄리티의 글 너무 잘 읽고 있습니다!! 🙇‍♂️

devHudi commented 4 months ago

@parkmuhyeun 님 감사합니다. 좋은 하루 보내세요 🙂