2024.11.08 Meta cache, AOP
https://moonsub-kim.github.io/docs/meta/cache-made-consistent-metas-cache-invalidation-solution/
Cache made consistent: Meta’s cache invalidation solution
Meta의 Cache made consistent: Meta’s cache invalidation solution 을 번역한 글 입니다.
moonsub-kim.github.io
https://engineering.fb.com/2022/06/08/core-infra/cache-made-consistent/
Cache made consistent
Caches help reduce latency, scale read-heavy workloads, and save cost. They are literally everywhere. Caches run on your phone and in your browser. For example, CDNs and DNS are essentially geo-rep…
engineering.fb.com
음 meta는 고수준의 클라이언트에 폴라리스라는 것이 있다.
이게 캐시 인벨리데이션을 체킹한다고 함. 버전을 비교하고 DB에 질의도 하는데 이때 throttle을 두기 때문에 meta는 N분동안 99.9999캐시를 보장한다고 하는 것이다.
로깅도 모든 로그를 남기지 않고 언제 캐시 인벨리데이션이 이뤄졌고, 그 이후부터 캐시가 불일치가 되었는지를 로깅한다.
aspectj를 사용해서 AOP 구현할 때 around가 아닌 포인트컷에 call, excution를 명시하지 않으면 aop가 2번 호출 될 수 있다.
around는 excution만 호출.
https://stackoverflow.com/questions/48683175/spring-annotation-aop-called-twice
Spring annotation AOP called twice
I annotate my spring boot controller some functions with a custom annotation for logging purpose. However, I find the before advice is executed twice for nested methods. Looking for some idea here.
stackoverflow.com