MSA~!

이석준·2022년 7월 27일
0

MSA : Micro Service Architecture

  • 작은 서비스들을 모아 하나의 Architectrure를 이루도록 함

Spring-cloud

  • MSA 구현을 위한 프로젝트
  • Server, Gateway, Client(Service)로 구성되어 있으며
  • Server : @EnableEurekaServer , 서비스들의 서버
  • Client : @EnableFeignClients , 서비스들
  • Gateway : MSA의 각각의 Service에 접근할 수 있다.
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-gateway</artifactId>
        </dependency>
  • FeignClient : 다른 Service의 API를 이용하기 위한 방법

  • RabbitMQ : Spring-config-bus를 위함

  • Kafka : produce에게 message를 받아 모든 구독자(consumer)에 message를 전달하는 역할

  • Zipkin : 분산 tracking 지원

	ex)
    주문과 창고의 repository는 다른곳에 위치한다.
    주문 service에서 주문이 되어서, 창고 service의 잔고를 같이 줄여야 할 때
    주문 (producer) 창고(consumer)가 되어 주문 시 창고에서도 repository에 

0개의 댓글