간단한 마이크로서비스 아키텍처라면 동기식 블로킹 호출을 사용하는 데 큰 문제가 없으며, 많
은 사람에게 익숙하면 분산 시스템을 다룰 때 유리하다.
필자의 경우, 이러한 호출 유형은 호출 체인이 더 많아질 때 문제가 되기 시작한다. 예를 들어
[그림
4
-
3
]은 결제에 사기 가능성이 있는 활동이 있는지 확인하는 뮤직코프의 처리 흐름 예를
보여준다. 주문 처리기는 지불하기 위해 결제(
Payment
) 서비스를 호출한다. 결제 서비스는
결제 허용 여부를 이상거래 탐지(
Fraud
Detection
) 마이크로서비스에 확인하려고 하며, 이
상거래 탐지 마이크로서비스는 고객(
Customer
) 마이크로서비스에서 정보를 가져와야 한다.
주문 처리기
지불하기
이상거래
확인
고객 레코드를
가져온다
결제이상거래 탐지
고객
그림
4-3
잠재적인 사기 행위 확인은 주문 처리 흐름의 일부 단계다. 잠재적인 사기 행위 확인은 주문 처리 흐름의 일부 단계다.
호출이 모두 동기식이고 블로킹되면 여러 문제에 직면한다. 이러한 종류의 긴 체인이 상당한
리소스 경합을 일으킬 수 있다는 사실은 차치하더라도, 관련된
4
개의 마이크로서비스 중 하나
또는 이들 간의 네트워크 호출에 문제가 발생하면 전체 작업이 실패할 수 있다. 내부에서는 주
문 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.