MQ
-
Message Queue(RabbitMQ) 장점 알아보기MQ 2022. 6. 18. 20:44
이전 포스팅에서 Message Queue를 적용할 수 있는 간단한 사례에 대해 설명했다. 이번 포스팅에서는 MQ중에서도 RabbitMQ의 장점에 대해 알아보려고 한다. 그저 선입선출(FIFO)의 자료구조인가? MQ의 적용 사례야 어느정도 알았는데, 이 메세지 큐(메세지 브로커)가 CS에서 배우는 자료구조와 별다를 것이 없다면 사용하는데에 이점이 별로 없을 것이다. 하지만 그렇지 않다. RabbitMQ는 개발자 관점에서 편리하고 강력한 기능을 제공한다. 그 내용은 아래와 같다. - 와이어 레벨 프로토콜 RabbitMQ가 AMQP(Advanced Message Queuing Protocol)을 구현했기 때문에 나타나는 장점인데, 바이트 스트림으로 데이터를 조작하므로 구현 언어에 관계없이 상호 운용이 가능하다..
-
Message Queue(RabbitMQ)와 AMQPMQ 2022. 5. 21. 04:41
이번에 회사에서 햇수로 3년차라고(...)20년 12월에 입사하여 실제 일한 기간은 18개월이다 제품 설계부터 진행하라고 미션을 줬다. 바로 API의 비동기 처리인데, 이를 위해 Message Queue를 도입하기로 했다. 이번 포스팅에서는 그 과정의 첫 부분에 대해서 다뤄보려고 한다. Why Message Queue? 위와 같이 사용자가 어떤 상품을 구매하기 위한 시스템이 있다고 하자. (생략이 많이 된 그림이다.) 서버는 주문을 받는 시스템이고, 외부연동 API는 결제 시스템이다. 이렇게 외부연동 시스템이 있을 때 Synchronous로 구성하게 되면 대기시간이 발생하여 비즈니스 처리 시간이 증가하고, 요청이 늘어나게 되면 서버 부하가 커지게 된다. 그래서 Asynchronous로 처리하는 방향으로 ..