본문 바로가기

Study

[내일배움캠프 TIL] 21일차 - MSA 구조 도식화

728x90
반응형

MSA 구조를 복습하면서 

도식화해보았습니다.

 

mermaid를 사용해서 했습니다.

 

 

Gateway를 앞단에 두어서 클라이언트 요청을 한곳으로 받은뒤 ,

필요한 서비스를 호출합니다.

 

config 관련된 내용은 따로 두어 관리하도록 했습니다.

 

 

graph LR
    %% 클라이언트에서 게이트웨이로
    Client([클라이언트 요청]) -- "한 곳으로 호출" --> Gateway[API GW]

    %% 서비스들을 수직으로 정렬
    subgraph "Application Services"
        direction TB
        Auth[Auth Service]
        App2[App. Service 2]
        App1[App. Service 1]
    end

    %% 인프라 서비스 (Config도 서비스로 취급하여 묶음)
    subgraph "Infrastructure"
        direction TB
        Config[Config Server]
        Eureka[Eureka Server]
    end

    %% 데이터 흐름 (실선)
    Gateway --> Auth
    Gateway --> App2
    Gateway --> App1

    %% 관리용 흐름 (점선으로 처리해서 시선 분산 방지)
    Auth -.-> Infrastructure
    App2 -.-> Infrastructure
    App1 -.-> Infrastructure
반응형