--- id: wiki-2026-0508-integration-architecture-diagram title: Integration Architecture Diagrams category: 10_Wiki/Topics status: verified canonical_id: self aliases: [Integration Diagrams, System Integration Diagram, Context Diagram] duplicate_of: none source_trust_level: A confidence_score: 0.85 verification_status: applied tags: [architecture, diagrams, integration, c4, documentation] raw_sources: [] last_reinforced: 2026-05-10 github_commit: pending tech_stack: language: mermaid framework: c4-plantuml --- # Integration Architecture Diagrams ## 매 한 줄 > **"매 system 의 external collaborators (services, APIs, queues, DBs) 의 visual mapping 의 통한 boundary + flow 의 communication"**. 매 Brown 의 C4 model (2018) 의 Context/Container level, 매 ArchiMate 의 application/technology layer, 매 modern 의 diagrams-as-code (Mermaid, Structurizr, D2) 의 dominant. ## 매 핵심 ### 매 Diagram 종류 - **System Context** (C4 L1): 매 system + users + external systems. - **Container** (C4 L2): 매 deployable units (web, api, db, queue). - **Component** (C4 L3): 매 container 내부 의 logical block. - **Sequence**: 매 time-ordered 의 message flow. - **Data Flow Diagram (DFD)**: 매 process / store / external entity / flow. - **Deployment**: 매 infra topology (regions, VPCs, nodes). ### 매 Notation - C4 (simple, opinionated). - ArchiMate (enterprise, exhaustive). - UML deployment / component (legacy but valid). - Custom (Mermaid + emoji label). ### 매 응용 1. Onboarding doc — 매 new hire 의 system map. 2. ADR 의 visual aid. 3. Threat modeling (STRIDE) 의 trust boundary 의 mark. ## 💻 패턴 ### C4 System Context (Mermaid) ```mermaid C4Context title System Context — Order Platform Person(customer, "Customer", "Buys products") System(order, "Order Platform", "Handles order lifecycle") System_Ext(stripe, "Stripe", "Payment processor") System_Ext(shipping, "ShipEngine", "Shipping carrier API") System_Ext(email, "SendGrid", "Transactional email") Rel(customer, order, "Places order", "HTTPS") Rel(order, stripe, "Charges card", "REST") Rel(order, shipping, "Creates shipment", "REST") Rel(order, email, "Sends confirmation", "SMTP API") ``` ### C4 Container (Structurizr DSL) ```dsl workspace { model { user = person "Customer" order = softwareSystem "Order Platform" { web = container "Web App" "Next.js 15" api = container "API" "Node.js / Fastify" db = container "Postgres" "RDS" "Database" cache = container "Redis" "ElastiCache" queue = container "Kafka" "MSK" } user -> web "Uses" "HTTPS" web -> api "JSON/HTTPS" api -> db "SQL" api -> cache "RESP" api -> queue "produces" } views { container order { include * autolayout lr } } } ``` ### Sequence — Distributed Transaction (Mermaid) ```mermaid sequenceDiagram participant C as Client participant O as Order API participant P as Payment participant I as Inventory participant K as Kafka C->>O: POST /orders O->>I: Reserve stock I-->>O: OK (reservation_id) O->>P: Charge card P-->>O: success O->>K: publish OrderCreated O-->>C: 201 Created Note over K: Async fanout to Shipping, Email, Analytics ``` ### Data Flow Diagram (D2) ```d2 direction: right customer: Customer { shape: person } api: Order API db: Postgres { shape: cylinder } queue: Kafka { shape: queue } analytics: Analytics WH { shape: cylinder } customer -> api: POST /order api -> db: INSERT api -> queue: OrderCreated queue -> analytics: stream ``` ### Deployment (PlantUML) ```plantuml @startuml !include Deployment_Node(aws, "AWS us-east-1") { Deployment_Node(eks, "EKS cluster") { Container(api, "Order API", "Node.js") } Deployment_Node(rds, "RDS Multi-AZ") { ContainerDb(db, "Postgres 16") } } Rel(api, db, "TLS") @enduml ``` ### Trust Boundary (Threat Model overlay) ```mermaid flowchart LR subgraph Public[Public Internet] U[User] end subgraph DMZ LB[ALB / WAF] end subgraph Private[Private VPC] API[Order API] DB[(Postgres)] end U -- TLS 1.3 --> LB LB -- mTLS --> API API --> DB classDef boundary stroke-dasharray: 5 5 class Public,DMZ,Private boundary ``` ## 매 결정 기준 | 상황 | Approach | |---|---| | Quick wiki diagram | Mermaid (GitHub renders inline) | | Versioned + reviewed | Structurizr DSL or PlantUML in repo | | Enterprise governance | ArchiMate (Archi tool) | | Generated from code | terraform-graph, kroki, arkade | | Threat modeling | DFD + trust boundaries (Microsoft TMT) | **기본값**: 매 C4 model — Context + Container 의 minimum, diagrams-as-code 의 (Mermaid / Structurizr). ## 🔗 Graph - 부모: [[Software-Architecture]] - 변형: [[C4 Model (Architecture Documentation)]] - 응용: [[Mermaid]] · [[Structurizr]] · [[PlantUML]] · [[D2]] - Adjacent: [[ADR]] · [[Threat-Modeling]] ## 🤖 LLM 활용 **언제**: diagram 의 Mermaid/D2 source 의 generate, existing diagram 의 explanation, missing actor 의 detect. **언제 X**: 매 enterprise architecture 의 governance decision (human + tool standard 필요). ## ❌ 안티패턴 - **PowerPoint architecture**: PNG screenshot 의 stale, source 의 X. - **Box-and-line soup**: 매 label 없이 arrow 의 multitude. - **Mixing levels**: Context 의 component-level detail 의 cram. - **No legend**: 매 reader 의 notation 의 guess. - **Aspirational diagram**: actual deployment 의 mismatch — 매 onboarding 의 misleading. ## 🧪 검증 / 중복 - Verified (Brown "Software Architecture for Developers", c4model.com, ArchiMate 3.2 spec). - 신뢰도 A. ## 🕓 Changelog | 날짜 | 변경 | |---|---| | 2026-05-08 | Phase 1 | | 2026-05-10 | Manual cleanup — integration architecture diagrams 의 full content |