Architecture Overview
Comprehensive architecture guide covering Elsa's components, execution model, data flow, and deployment patterns for architects and integrators.
High-Level Architecture
┌─────────────────────────────────────────────────────────────┐
│ Presentation Layer │
│ ┌────────────────┐ ┌────────────────┐ ┌───────────────┐ │
│ │ Elsa Studio │ │ REST APIs │ │ SignalR Hub │ │
│ │ (Blazor WASM) │ │ │ │ │ │
│ └────────────────┘ └────────────────┘ └───────────────┘ │
└─────────────────────────────────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────┐
│ Application Layer │
│ ┌──────────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Workflow │ │ Activity │ │ Trigger │ │
│ │ Management │ │ Registry │ │ System │ │
│ └──────────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────┐
│ Workflow Runtime Layer │
│ ┌──────────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Workflow │ │ Bookmark │ │ Workflow │ │
│ │ Execution │ │ Manager │ │ Dispatcher │ │
│ │ Engine │ │ │ │ │ │
│ └──────────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────┐
│ Persistence Layer │
│ ┌──────────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Workflow │ │ Activity │ │ Execution │ │
│ │ Definitions │ │ Execution │ │ Logs │ │
│ │ & Instances │ │ Records │ │ │ │
│ └──────────────────┘ └──────────────┘ └──────────────┘ │
│ (EF Core / MongoDB) │
└─────────────────────────────────────────────────────────────┘Major Components
1. Elsa Server
2. Elsa Studio
3. Activities
4. Workflows
Workflow Definitions
Workflow Instances
5. Persistence Layer
Store Type
Data Stored
Purpose
Execution Model
Workflow Execution Flow
Execute vs Dispatch
Execute
Dispatch
Aspect
Execute
Dispatch
Bookmarks, Triggers, and Stimuli
Bookmarks
Triggers
Stimuli
Workflow Execution Internals
Activity Execution Pipeline
Workflow Scheduler
State Management
Data Flow
Request Flow (HTTP Trigger Example)
Variable and Output Flow
Scalability and Performance
Performance Characteristics
Horizontal Scaling
Strategy
Description
Use Case
Optimization Tips
Extensibility Points
1. Custom Activities
2. Custom Triggers
3. Custom Middleware
4. Custom Persistence Providers
5. Custom Expression Evaluators
6. Studio Extensibility
Deployment Topologies
1. All-in-One (Development)
2. Separate Server and Studio (Recommended)
3. Multi-Instance Cluster (High Availability)
4. Kubernetes Deployment
5. Microservices Architecture
Multi-Tenancy Architecture
Tenant Isolation Strategies
Multi-Tenant Configuration
Tenant Resolution
Security Considerations
Authentication & Authorization
Workflow Security
Monitoring and Observability
Health Checks
Logging
Execution Logs
Metrics and Telemetry
Best Practices
Design Patterns
Performance
Reliability
Maintenance
Reference Sources
Next Steps
Summary
Last updated