微服务 API 网关架构
Architecture
微服务 API 网关架构图,展示请求路由、JWT 身份验证、速率限制、服务发现以及跨分布式后端服务的响应聚合。该模板模拟微服务生态系统中所有客户端流量的入口点,在请求到达内部服务之前执行安全策略。适合设计具有集中式横切关注点的可扩展 API 基础设施的平台工程师。
Architecture
GitOps 部署架构图,展示开发者 Git 工作流、CI/CD 管道构建和推送容器镜像、ArgoCD 或 Flux 检测 Git 清单变更、漂移检测、自动集群同步和向 Kubernetes 的滚动更新部署。该模板模拟 GitOps 范式,Git 是应用代码和基础设施状态的唯一真实来源,实现声明式、可审计和可重现的部署。对于采用 GitOps 实践进行 Kubernetes 部署的团队至关重要。
Developer { # Developer
n1: circle label:"Code Change"
n2: rectangle label:"Git Push to Main"
n3: rectangle label:"Open Pull Request"
n4: rectangle label:"Merge After Review"
n1.handle(right) -> n2.handle(left)
n2.handle(right) -> n3.handle(left) [label="Feature Branch"]
n3.handle(right) -> n4.handle(left) [label="Approved"]
n4.handle(bottom) -> CICD.n5.handle(top) [label="Trigger"]
}
CICD { # CI/CD Pipeline
n5: rectangle label:"Run Tests and Lint"
n6: rectangle label:"Build Container Image"
n7: rectangle label:"Push to Registry"
n8: rectangle label:"Update Manifest in Git"
n5.handle(right) -> n6.handle(left) [label="Tests Pass"]
n6.handle(right) -> n7.handle(left) [label="Tag: sha-abc123"]
n7.handle(right) -> n8.handle(left) [label="Update Image Tag"]
n8.handle(bottom) -> GitOps.n9.handle(top) [label="Commit Manifest"]
}
GitOps { # GitOps Controller (ArgoCD/Flux)
n9: rectangle label:"Detect Git Diff"
n10: rectangle label:"Compare Desired vs Live"
n11: diamond label:"Drift Detected?"
n12: rectangle label:"Sync to Cluster"
n13: rectangle label:"State Already Synced"
n14: rectangle label:"Health Check"
n9.handle(right) -> n10.handle(left) [label="Poll/Webhook"]
n10.handle(right) -> n11.handle(left)
n11.handle(right) -> n12.handle(left) [label="Yes"]
n11.handle(bottom) -> n13.handle(top) [label="No"]
n12.handle(right) -> n14.handle(left) [label="Apply"]
n14.handle(bottom) -> Cluster.n15.handle(top) [label="Deploy"]
}
Cluster { # Kubernetes Cluster
n15: rectangle label:"Rolling Update Deployment"
n16: rectangle label:"New Pods Created"
n17: rectangle label:"Old Pods Terminated"
n18: rectangle label:"Service Routes Traffic"
n19: circle label:"Deployment Complete"
n15.handle(right) -> n16.handle(left) [label="Scale Up"]
n16.handle(right) -> n17.handle(left) [label="Healthy"]
n17.handle(right) -> n18.handle(left) [label="Cutover"]
n18.handle(right) -> n19.handle(left)
}
Manual deployments and imperative scripts are error-prone, hard to audit, and impossible to reproduce. GitOps makes Git the single source of truth for infrastructure state, enabling declarative deployments where every change is version-controlled, peer-reviewed, and automatically applied to the cluster.
Imperative CI/CD pipelines (Jenkins) push changes directly to clusters without drift detection. Helm charts provide templating but not continuous reconciliation. This template shows the full GitOps workflow with ArgoCD/Flux.
| Template Name | GitOps 部署架构 |
| Category | Architecture |
| Steps | 6 workflow steps |
| Format | FlowZap Code (.fz file) |
Architecture
微服务 API 网关架构图,展示请求路由、JWT 身份验证、速率限制、服务发现以及跨分布式后端服务的响应聚合。该模板模拟微服务生态系统中所有客户端流量的入口点,在请求到达内部服务之前执行安全策略。适合设计具有集中式横切关注点的可扩展 API 基础设施的平台工程师。
Architecture
每服务独立数据库架构图,每个微服务拥有其专用数据存储,通过 Kafka 进行事件驱动同步以实现跨服务数据一致性。该模板展示了微服务数据隔离的核心原则,展示 PostgreSQL 和 MongoDB 如何在多语言持久化策略中共存。对于在保持最终一致性的同时强制服务自治的架构师至关重要。
Architecture
按业务能力组织的微服务分解架构图:身份认证、产品目录、定价和订单履行,每个都有独立的数据存储和 API。该模板展示如何将单体应用拆分为与业务领域对齐的服务,使用 Backend-for-Frontend (BFF) 模式进行客户端特定的聚合。适合规划领域驱动微服务边界的架构师。
Architecture
绞杀者模式迁移架构图,展示使用路由层在新旧系统之间分流流量,逐步用新微服务替换遗留单体应用。该模板模拟经过验证的迁移策略,新功能作为微服务构建,遗留端点逐步退役。对于在不进行高风险大爆炸重写的情况下现代化遗留系统的团队至关重要。