마스터-슬레이브 패턴
중앙 컨트롤러가 결정하고 다른 노드가 수행하는 제어·실행 모델
구조와 동작 원리
구성 요소와 배치 원칙 (조사 기반 개념 설명 · 연결 순서나 토폴로지는 특정하지 않음)
작업을 분배·취합하는 마스터와 동일한 슬레이브 컴포넌트로 구성
마스터가 결과를 DB에 통합하고 추가 데이터를 공급
런타임 작업 조정을 효율화하는 패턴
기대 효과
장애 허용성과 병렬 계산 지원
트레이드오프
단일 장애점, 작업 유실, 대역폭·혼잡 문제
대역폭·혼잡, 단일 장애점, 작업 유실 주의
운영 및 적용 가이드
종합 설명 · 원문 인용으로 검증된 항목과 구분됩니다. 실제 적용 전 확인이 필요합니다.
언제 사용하는가
대량의 독립 작업을 중앙에서 분배하고 결과를 취합하는 병렬 처리·배치 분석, DB 읽기 복제·장애 대체, 산업 제어·로봇 조정에 적합하다.
시나리오
물류 대기업이 전국 300개 허브의 배송 경로 최적화 배치를 매일 2시간 내 처리해야 한다. 중앙 마스터가 허브별 경로 계산 작업을 큐에 넣고 50대 워커(슬레이브)에 분배하며, 워커는 독립 계산 후 결과만 반환한다. 마스터는 결과를 취합해 경로 DB에 저장하고 실패 작업은 재분배한다. 요구사항은 멱등 작업, 결과 검증, 마스터 장애 시 신속한 대체다.
배치 원칙
- 마스터는 작업 큐·스케줄러·결과 취합·메타데이터 DB에 집중 배치
- 슬레이브는 상태 없는 동일 이미지로 오토스케일 그룹/노드 풀에 분산 배치
- 입력 데이터는 공유 오브젝트 스토리지, 작업 패키지는 큐, 결과는 샤드/파티션 DB에 배치
- 마스터 DB는 HA 복제, 슬레이브 로그·중간 산출물은 노드 로컬 임시 저장
- 클라이언트는 마스터 API만 호출하고 슬레이브 내부 토폴로지를 은닉
온프레미스
마스터는 이중화된 소형 노드와 공유 DB/큐에 두고 슬레이브는 동일 사양 워커 클러스터로 구성; 배포는 이미지/패키지 표준화와 구성 관리 자동화, 운영은 작업 큐 길이·슬레이브 처리량·마스터 DB 복제 지연 모니터링; 네트워크 대역폭과 단일 장애점을 사전 점검
클라우드
관리형 큐·오브젝트 스토리지·오토스케일 워커를 사용하고 마스터는 관리형 DB/HA 인스턴스로 배치; 배포는 IaC와 무중단 롤링, 운영은 비용·큐 적체·스팟 회수 대응 및 리전/가용영역 분산; 클라이언트는 마스터 엔드포인트만 사용
Kubernetes
마스터 역할은 Deployment/StatefulSet와 HPA, 슬레이브 워커는 Deployment/Job/노드 풀과 KEDA 기반 큐 오토스케일로 배치; 마스터 리더 선출은 Lease/HA, 결과 DB는 StatefulSet 또는 관리형 DB; readiness/liveness·PDB·토폴로지 분산·NetworkPolicy로 장애 격리
장애 대응
대표 장애는 마스터 다운/리더 상실, 큐 적체·슬레이브 폭주, 네트워크 혼잡, 작업 유실·중복. 감지 시 마스터를 HA 승격/재시작하고 큐를 백프레셔·재분배하며, 멱등 키와 결과 검증으로 중복/유실을 복구; 슬레이브는 격리·교체하고 DB 복제 지연과 단일 장애점을 점검한다.
14개 관점별 근거
조사 당시 근거 보유 여부입니다. 출처의 정확성과 최신성을 별도로 판단하세요.
정의·개요근거 있음
중앙 컨트롤러가 결정하고 다른 노드가 수행하는 제어·실행 모델
Master slave architecture is a control-and-execution model where one node, process, or controller makes decisions and other nodes carry them out해결하는 문제근거 있음
런타임 작업 조정을 효율화하는 패턴
this pattern helps you coordinate the work at runtime efficiently.주요 구성 컴포넌트·리소스근거 있음
작업을 분배·취합하는 마스터와 동일한 슬레이브 컴포넌트로 구성
The master component distributes the work among identical slave components and computes a final result from the results the slaves return.데이터·에셋 배치 원칙근거 있음
마스터가 결과를 DB에 통합하고 추가 데이터를 공급
The Master integrates the results in its database and feeds the Client more data.대표 유스케이스근거 있음
공정 제어, 임베디드, 대규모 병렬 계산, 장애 허용 시스템
in process control, in embedded systems, in large-scale parallel computations and in fault tolerant systems시나리오 예시근거 있음
SETI: 전 세계 유휴 컴퓨팅 자원으로 대량 원시 데이터 처리
They asked all computer owners in the world to donate their idle computer time to the processing of large amounts of raw data.부적합 상황·주의근거 있음
대역폭·혼잡, 단일 장애점, 작업 유실 주의
Problems – bandwidth/congestion/single point of failure. Lost jobs온프레미스 관점(개발·배포·운영)근거 있음
온프레미스에서는 독립 프로세서 클러스터 구성이 적합
This works especially well with clusters – collections of independent processors, rather than the tightly connected special purpose systems.클라우드 관점(개발·배포·운영)근거 있음
클라우드에서도 가능하나 효율적 해결에 유의
So cloud – although there are still significant problems to an efficient solution.Kubernetes 관점(개발·배포·운영)근거 있음
Kubernetes 마스터/슬레이브 노드를 AWS·Azure·로컬에 분산 구성
Where we have configured the master in AWS, One slave in AWS, One slave in Microsoft azure, Two slaves in Local virtual instance.장애 대응 관점근거 있음
마스터 장애 시 HA 모드에서 다른 마스터 레플리카를 리더로 승격
promoting another Mesos master replica to become the current leader장점근거 있음
장애 허용성과 병렬 계산 지원
The Master-Slave pattern (see Figure 3.4) supports fault tolerance and parallel computation.단점·트레이드오프근거 있음
단일 장애점, 작업 유실, 대역폭·혼잡 문제
Problems – bandwidth/congestion/single point of failure. Lost jobs대표 기술·도구근거 있음
분산 컴퓨팅, DB 복제, 산업 컨트롤러, 로보틱스
You see it in Distributed Computing, database replication, industrial controllers, and robotics추가 참고 문헌 (23)
- Master-Slave | Architectural Patterns ↗
- Introducing the Master-Slave Pattern - Pattern-Oriented Software Architecture For Dummies [Book] ↗
- Master-Slave Architecture: How It Works And Trade-Offs ↗
- Architectural patterns ↗
- Parallel Programming Laboratory ↗
- Distributed Computing: Definition, Applications, Components ↗
- Master-slave | IEEE Technology Navigator ↗
- 3DesignForParallel ↗
- Deploy Amazon EKS clusters across cloud and on-premises environments - Amazon EKS ↗
- Multi Cloud Kubernetes with Nodeless ↗
- Creating multi-node and multi-cloud Kubernetes cluster | by suyog shinde | Medium ↗
- Tanzu for Kubernetes Operations on VxRail ↗
- Reference Architecture: GKE Enterprise hybrid environment - part 2 - Dec '24 - Google Docs ↗
- Creating a Multi-cloud Setup of Kubernetes using Ansible Roles ↗
- Managing multi-cloud Kubernetes - Spectro Cloud ↗
- Manage your on-Premises and Cloud Clusters with Cisco Hybrid Solution for Kubernetes on AWS ↗
- How to Design Highly Available Open Source Database Environments ↗
- Dealing with master failure in a master-slave DB setup ↗
- Resiliency - Troubleshooting ↗
- Database Replication: Master-Slave vs. Multi-Master ↗
- Google SRE: Distributed Consensus algorithms and CAP Theorem ↗
- Spring 2020 ↗
- Apache Mesos - Designing Highly Available Mesos Frameworks ↗