MSA
CQRS 구현 - Redis, Kafka 적용
오렌지마끼야또
2022. 11. 23. 10:59
728x90
반응형
CQRS란?
https://orange-makiyato.tistory.com/56
MSA, Database Architecture - Querying : API Composition, CQRS 패턴
● API Composition 패턴 • API Composition은 클라이언트에서 하나의 API만을 호출해서 잘게 쪼개진 API들의 응답을 모아서 보내주는 것이다. • 클라이언트에서 API Composer(조합기)로 요청을 하면 API Compos
orange-makiyato.tistory.com
현재 프로젝트 구조
Read 요청이 오면 마이크로서비스에서 먼저 Redis Cache를 확인하고
없으면 DB에서 데이터를 가져온다.
Create, Update, Delete 요청이 오면 Pub/Sub(게시/구독) 구조에 의해
Publisher(게시자) or Producer(제공자)가 Kafka에 토픽 메시지를 발행하고
Subscriber(구독자) or Consumer(소비자)가 그것을 Pull 방식으로 읽어서 수행한다.
출처
https://jonathanlareau.github.io/kafka-chat/
728x90
반응형