Files
nexus/wiki/concepts/Orchestration.md

45 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Orchestration"
type: concept
tags:
- EDA
- Architecture
- Microservices
- AWS
last_updated: 2026-04-14
---
## Aliases
- Orchestration Pattern
- 编排模式
- 集中式服务协调
## Definition
编排模式Orchestration是一种由中央协调器Orchestrator集中控制和协调多个服务执行复杂业务流程的模式。与编舞模式Choreography的去中心化不同编排模式通过中央工作流引擎驱动各服务按顺序执行任务。
## AWS Implementation
- **AWS Step Functions**AWS 提供的工作流服务,用于构建状态机
- **State Machine**:状态机由多个 State状态组成每个 State 代表一个工作步骤
- **Transitions**:状态转换定义从一个状态到下一个状态的条件和路径
- **Standard Workflows**:长时运行工作流,适合人工审批、长时间处理流程
- **Express Workflows**:高频短时工作流,适合毫秒级响应的大规模事件处理
## Characteristics
- **Centralized**:中央协调器控制整体流程
- **Visible**:业务流程和状态转换清晰可见,便于监控和追踪
- **Easier Debugging**:工作流失败时可准确定位到具体状态
- **Tight Coupling Risk**:中央协调器与各服务存在一定耦合
## Comparison with Choreography
| 维度 | Orchestration编排 | Choreography编舞 |
|------|---------------------|---------------------|
| 控制 | 集中式 | 去中心化 |
| 协调器 | 有Step Functions | 无 |
| 复杂度 | 局部高,整体低 | 局部低,整体高 |
| 可观测性 | 易于追踪 | 较难追踪 |
| 适用场景 | 复杂、有明确业务流程 | 简单、独立的服务 |
## Sources
- [[public-cloud-learning-sessions-opentext-serverless-computing-20240903-160139-mee]]
- [[public-cloud-learning-sessions-opentext-event-driven-architecture-part-2-2024091]]