다운스트림 서비스별 커넥션 풀을 사용한 벌크헤드 다운스트림 서비스별 커넥션 풀을 사용한 벌크헤드
관심사의 분리도 벌크헤드를 구현하는 한 가지 방법이다. 기능을 별도의 마이크로서비스로 분
리하면, 한 영역에서 장애가 발생해 다른 영역에 영향을 미칠 가능성이 줄어든다.
마이크로서비스 내부와 마이크로서비스 사이에서 잘못될 수 있는 시스템의 모든 측면을 살펴
보라. 벌크헤드가 설치돼 있는가? 최소한 각각의 다운스트림과 연결하기 위한 별도의 커넥션
풀을 두는 것부터 시작하는 것이 좋다. 그리고 더 나아가 회로 차단기 사용을 고려할 수 있다.
잠시 후에 살펴보자.
여러 면에서 벌크헤드는 지금까지 살펴본 패턴 중 가장 중요하다. 타임아웃과 회로 차단기는
자원이 제한될 때 자원을 확보하는 데 도움이 되지만, 벌크헤드는 처음부터 자원이 제한되는
것을 방지할 수 있다. 또한 자원이 더 포화되지 않도록 특정 조건에서 요청을 거부할 수 있는
기능을 제공할 수 있는데, 이를
로드 셰딩로드 셰딩
load
shedding
이라고 한다. 때로는 요청을 거부하는 것이
중요한 시스템을 무너뜨리지 않고 여러 업스트림 서비스에 병목 현상이 발생하지 않도록 하는
가장 좋은 방법이다.
12.5.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.