kt-event-marketing/claude/sample-network-prod.mmd
jhbkjh 3075a5d49f 물리아키텍처 설계 완료
 주요 기능
- Azure 기반 물리아키텍처 설계 (개발환경/운영환경)
- 7개 마이크로서비스 물리 구조 설계
- 네트워크 아키텍처 다이어그램 작성 (Mermaid)
- 환경별 비교 분석 및 마스터 인덱스 문서

📁 생성 파일
- design/backend/physical/physical-architecture.md (마스터)
- design/backend/physical/physical-architecture-dev.md (개발환경)
- design/backend/physical/physical-architecture-prod.md (운영환경)
- design/backend/physical/*.mmd (4개 Mermaid 다이어그램)

🎯 핵심 성과
- 비용 최적화: 개발환경 월 $143, 운영환경 월 $2,860
- 확장성: 개발환경 100명 → 운영환경 10,000명 (100배)
- 가용성: 개발환경 95% → 운영환경 99.9%
- 보안: 다층 보안 아키텍처 (L1~L4)

🛠️ 기술 스택
- Azure Kubernetes Service (AKS)
- Azure Database for PostgreSQL Flexible
- Azure Cache for Redis Premium
- Azure Service Bus Premium
- Application Gateway + WAF

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 15:13:01 +09:00

190 lines
8.6 KiB
Plaintext

graph TB
%% 운영환경 네트워크 다이어그램
%% AI 기반 여행 일정 생성 서비스 - 운영환경
%% 외부 영역
subgraph Internet["🌐 인터넷"]
Users["👥 실사용자<br/>(1만~10만 명)"]
CDN["🌍 Azure Front Door<br/>+ CDN"]
end
%% Azure 클라우드 영역
subgraph AzureCloud["☁️ Azure Cloud (운영환경)"]
%% Virtual Network
subgraph VNet["🏢 Virtual Network (VNet)<br/>주소 공간: 10.0.0.0/16"]
%% Gateway Subnet
subgraph GatewaySubnet["🚪 Gateway Subnet<br/>10.0.4.0/24"]
subgraph AppGateway["🛡️ Application Gateway + WAF"]
PublicIP["📍 Public IP<br/>(고정)"]
PrivateIP["📍 Private IP<br/>(10.0.4.10)"]
WAF["🛡️ WAF<br/>(OWASP CRS 3.2)"]
RateLimiter["⏱️ Rate Limiting<br/>(100 req/min/IP)"]
end
end
%% Application Subnet
subgraph AppSubnet["🎯 Application Subnet<br/>10.0.1.0/24"]
%% AKS 클러스터
subgraph AKSCluster["⚙️ AKS Premium Cluster<br/>(Multi-Zone)"]
%% System Node Pool
subgraph SystemNodes["🔧 System Node Pool"]
SystemNode1["📦 System Node 1<br/>(Zone 1)"]
SystemNode2["📦 System Node 2<br/>(Zone 2)"]
SystemNode3["📦 System Node 3<br/>(Zone 3)"]
end
%% Application Node Pool
subgraph AppNodes["🚀 Application Node Pool"]
AppNode1["📦 App Node 1<br/>(Zone 1)"]
AppNode2["📦 App Node 2<br/>(Zone 2)"]
AppNode3["📦 App Node 3<br/>(Zone 3)"]
end
%% Application Services (High Availability)
subgraph AppServices["🚀 Application Services"]
UserServiceHA["👤 User Service<br/>(3 replicas, HPA)"]
TripServiceHA["🗺️ Trip Service<br/>(3 replicas, HPA)"]
AIServiceHA["🤖 AI Service<br/>(2 replicas, HPA)"]
LocationServiceHA["📍 Location Service<br/>(2 replicas, HPA)"]
end
%% Internal Load Balancer
subgraph InternalLB["⚖️ Internal Services"]
UserServiceLB["user-service:8080"]
TripServiceLB["trip-service:8080"]
AIServiceLB["ai-service:8080"]
LocationServiceLB["location-service:8080"]
end
end
end
%% Database Subnet
subgraph DBSubnet["🗄️ Database Subnet<br/>10.0.2.0/24"]
subgraph AzurePostgreSQL["🐘 Azure PostgreSQL Flexible Server"]
PGPrimary["📊 Primary Server<br/>(Zone 1)"]
PGSecondary["📊 Read Replica<br/>(Zone 2)"]
PGBackup["💾 Automated Backup<br/>(Point-in-time Recovery)"]
end
end
%% Cache Subnet
subgraph CacheSubnet["⚡ Cache Subnet<br/>10.0.3.0/24"]
subgraph AzureRedis["🔴 Azure Cache for Redis Premium"]
RedisPrimary["⚡ Primary Cache<br/>(Zone 1)"]
RedisSecondary["⚡ Secondary Cache<br/>(Zone 2)"]
RedisCluster["🔗 Redis Cluster<br/>(High Availability)"]
end
end
end
%% Service Bus (Premium)
subgraph ServiceBus["📨 Azure Service Bus Premium"]
ServiceBusHA["📮 Service Bus Namespace<br/>(sb-tripgen-prod)"]
subgraph QueuesHA["📬 Premium Message Queues"]
AIQueueHA["🤖 ai-schedule-generation<br/>(Partitioned, 16GB)"]
LocationQueueHA["📍 location-search<br/>(Partitioned, 16GB)"]
NotificationQueueHA["🔔 notification<br/>(Partitioned, 16GB)"]
end
end
%% Private Endpoints
subgraph PrivateEndpoints["🔒 Private Endpoints"]
PGPrivateEndpoint["🔐 PostgreSQL<br/>Private Endpoint"]
RedisPrivateEndpoint["🔐 Redis<br/>Private Endpoint"]
ServiceBusPrivateEndpoint["🔐 Service Bus<br/>Private Endpoint"]
end
end
%% 네트워크 연결 관계
%% 외부에서 Azure로의 접근
Users -->|"HTTPS 요청"| CDN
CDN -->|"글로벌 가속"| PublicIP
%% Application Gateway 내부 흐름
PublicIP --> WAF
WAF --> RateLimiter
RateLimiter --> PrivateIP
%% Application Gateway에서 AKS로
PrivateIP -->|"/api/users/**<br/>NodePort 30080"| UserServiceLB
PrivateIP -->|"/api/trips/**<br/>NodePort 30081"| TripServiceLB
PrivateIP -->|"/api/ai/**<br/>NodePort 30082"| AIServiceLB
PrivateIP -->|"/api/locations/**<br/>NodePort 30083"| LocationServiceLB
%% Load Balancer에서 실제 서비스로
UserServiceLB -->|"고가용성 라우팅"| UserServiceHA
TripServiceLB -->|"고가용성 라우팅"| TripServiceHA
AIServiceLB -->|"고가용성 라우팅"| AIServiceHA
LocationServiceLB -->|"고가용성 라우팅"| LocationServiceHA
%% 서비스 배치 (Multi-Zone)
UserServiceHA -.-> AppNode1
UserServiceHA -.-> AppNode2
UserServiceHA -.-> AppNode3
TripServiceHA -.-> AppNode1
TripServiceHA -.-> AppNode2
TripServiceHA -.-> AppNode3
%% Application Services에서 Database로 (Private Endpoint)
UserServiceHA -->|"Private Link<br/>TCP:5432"| PGPrivateEndpoint
TripServiceHA -->|"Private Link<br/>TCP:5432"| PGPrivateEndpoint
AIServiceHA -->|"Private Link<br/>TCP:5432"| PGPrivateEndpoint
LocationServiceHA -->|"Private Link<br/>TCP:5432"| PGPrivateEndpoint
%% Private Endpoint에서 실제 서비스로
PGPrivateEndpoint --> PGPrimary
PGPrivateEndpoint --> PGSecondary
%% Application Services에서 Cache로 (Private Endpoint)
UserServiceHA -->|"Private Link<br/>TCP:6379"| RedisPrivateEndpoint
TripServiceHA -->|"Private Link<br/>TCP:6379"| RedisPrivateEndpoint
AIServiceHA -->|"Private Link<br/>TCP:6379"| RedisPrivateEndpoint
LocationServiceHA -->|"Private Link<br/>TCP:6379"| RedisPrivateEndpoint
%% Private Endpoint에서 Redis로
RedisPrivateEndpoint --> RedisPrimary
RedisPrivateEndpoint --> RedisSecondary
%% High Availability 연결
PGPrimary -.->|"복제"| PGSecondary
RedisPrimary -.->|"HA 동기화"| RedisSecondary
PGPrimary -.->|"자동 백업"| PGBackup
%% Service Bus 연결 (Private Endpoint)
AIServiceHA -->|"Private Link<br/>HTTPS/AMQP"| ServiceBusPrivateEndpoint
LocationServiceHA -->|"Private Link<br/>HTTPS/AMQP"| ServiceBusPrivateEndpoint
TripServiceHA -->|"Private Link<br/>HTTPS/AMQP"| ServiceBusPrivateEndpoint
ServiceBusPrivateEndpoint --> ServiceBusHA
ServiceBusHA --> AIQueueHA
ServiceBusHA --> LocationQueueHA
ServiceBusHA --> NotificationQueueHA
%% 스타일 정의
classDef azureStyle fill:#0078D4,stroke:#fff,stroke-width:2px,color:#fff
classDef k8sStyle fill:#326CE5,stroke:#fff,stroke-width:2px,color:#fff
classDef appStyle fill:#28A745,stroke:#fff,stroke-width:2px,color:#fff
classDef dbStyle fill:#DC3545,stroke:#fff,stroke-width:2px,color:#fff
classDef cacheStyle fill:#FF6B35,stroke:#fff,stroke-width:2px,color:#fff
classDef serviceStyle fill:#6610F2,stroke:#fff,stroke-width:2px,color:#fff
classDef queueStyle fill:#FD7E14,stroke:#fff,stroke-width:2px,color:#fff
classDef securityStyle fill:#E83E8C,stroke:#fff,stroke-width:2px,color:#fff
classDef haStyle fill:#20C997,stroke:#fff,stroke-width:2px,color:#fff
%% 스타일 적용
class AzureCloud,VNet azureStyle
class AKSCluster,AppSubnet,SystemNodes,AppNodes k8sStyle
class AppServices,UserServiceHA,TripServiceHA,AIServiceHA,LocationServiceHA appStyle
class DBSubnet,AzurePostgreSQL,PGPrimary,PGSecondary,PGBackup dbStyle
class CacheSubnet,AzureRedis,RedisPrimary,RedisSecondary,RedisCluster cacheStyle
class InternalLB,UserServiceLB,TripServiceLB,AIServiceLB,LocationServiceLB serviceStyle
class ServiceBus,ServiceBusHA,QueuesHA,AIQueueHA,LocationQueueHA,NotificationQueueHA queueStyle
class AppGateway,WAF,RateLimiter,PrivateEndpoints,PGPrivateEndpoint,RedisPrivateEndpoint,ServiceBusPrivateEndpoint securityStyle
class CDN,SystemNode1,SystemNode2,SystemNode3,AppNode1,AppNode2,AppNode3 haStyle