Execution Modes
Execution modes determine how deployments run across multiple targets.
Available Modes
Section titled “Available Modes”| Mode | Description | Best For |
|---|---|---|
| Parallel | All targets simultaneously | Independent services |
| Sequential | One target at a time | Stateful services |
| Rolling | Batches of targets | Large deployments |
Parallel Execution
Section titled “Parallel Execution”All targets receive commands at the same time:
Characteristics
Section titled “Characteristics”| Property | Value |
|---|---|
| Speed | Fastest |
| Resource usage | High (all targets active) |
| Risk | Higher (all targets affected at once) |
| Rollback complexity | Higher |
When to Use
Section titled “When to Use”- Stateless services
- Independent targets
- Speed is critical
- Targets don’t share state
When to Avoid
Section titled “When to Avoid”- Database servers
- Services with shared state
- When gradual rollout is required
- Limited network bandwidth
Sequential Execution
Section titled “Sequential Execution”Targets are updated one at a time:
Characteristics
Section titled “Characteristics”| Property | Value |
|---|---|
| Speed | Slowest |
| Resource usage | Low (one target active) |
| Risk | Lower (issues caught early) |
| Rollback complexity | Lower |
When to Use
Section titled “When to Use”- Database servers
- Primary/replica pairs
- Ordered dependencies
- Careful rollouts
When to Avoid
Section titled “When to Avoid”- Large number of targets (takes too long)
- Time-sensitive deployments
- Independent services
Rolling Execution
Section titled “Rolling Execution”Targets are updated in batches:
Configuration
Section titled “Configuration”| Setting | Description | Default |
|---|---|---|
| Batch Size | Targets per batch | 1 |
Characteristics
Section titled “Characteristics”| Property | Value |
|---|---|
| Speed | Medium |
| Resource usage | Medium |
| Risk | Balanced |
| Rollback complexity | Medium |
Batch Size Strategy
Section titled “Batch Size Strategy”| Targets | Recommended Batch Size |
|---|---|
| 4-10 | 2 |
| 10-50 | 5-10 |
| 50-100 | 10-20 |
| 100+ | 10-25 (5-10% of total) |
When to Use
Section titled “When to Use”- Large deployments
- Maintaining service availability
- Gradual rollouts
- Canary deployments
Configuring Execution Mode
Section titled “Configuring Execution Mode”In the UI
Section titled “In the UI”┌─────────────────────────────────────────────────────────┐│ Execution Configuration │├─────────────────────────────────────────────────────────┤│ ││ Mode: ││ ○ Parallel - All targets at once ││ ○ Sequential - One target at a time ││ ● Rolling - Targets in batches ││ ││ Batch Size: [3 ] ││ │└─────────────────────────────────────────────────────────┘Via CLI
Section titled “Via CLI”# Parallelmantisctl deployment create --solution-id <id> --mode parallel
# Sequentialmantisctl deployment create --solution-id <id> --mode sequentialRolling mode with a specific batch size is configured through the UI or directly via the API using the target_mode field.
Target Priority
Section titled “Target Priority”Within any mode, targets are ordered by priority. Priority values range from -100 to 100 (default 50), and higher priority values deploy first:
| Target | Priority | Execution Order |
|---|---|---|
| web-prod-01 | 80 | First |
| web-prod-02 | 70 | Second |
| web-prod-03 | 60 | Third |
| db-prod-01 | 10 | Last |
In parallel mode, all targets start together and results are reported as they complete (no priority-based ordering).
When targets are resolved from an environment, their configured priority determines the execution order in sequential and rolling modes; for explicitly listed target IDs, the order follows the order provided.
Failure Handling by Mode
Section titled “Failure Handling by Mode”Parallel + Stop on Failure
Section titled “Parallel + Stop on Failure”- All targets start
- On failure, no new steps start
- Running steps complete
- Deployment marked failed
Sequential + Stop on Failure
Section titled “Sequential + Stop on Failure”- First failure stops entire deployment
- Remaining targets skipped
- Easy to identify failing target
Rolling + Stop on Failure
Section titled “Rolling + Stop on Failure”- Current batch completes
- Remaining batches skipped
- Partial deployment state
Comparison Table
Section titled “Comparison Table”| Aspect | Parallel | Sequential | Rolling |
|---|---|---|---|
| Deployment time | Fastest | Slowest | Medium |
| Risk exposure | All at once | Gradual | Balanced |
| Availability during deploy | Potentially zero | Gradual reduction | Controlled |
| Rollback scope | All targets | Single target | Batch |
| Monitoring complexity | High | Low | Medium |
| Best for | Stateless | Stateful | Large scale |
Best Practices
Section titled “Best Practices”1. Match Mode to Service Type
Section titled “1. Match Mode to Service Type”| Service Type | Recommended Mode |
|---|---|
| Stateless API | Parallel or Rolling |
| Database | Sequential |
| Cache layer | Rolling |
| Load balancer | Sequential |
| Worker queue | Rolling |
2. Use Rolling for Production
Section titled “2. Use Rolling for Production”Even for stateless services:
Rolling (batch size: 25%)├── Catch issues early├── Maintain availability└── Allow monitoring between batches3. Consider Deployment Windows
Section titled “3. Consider Deployment Windows”| Mode | Suitable Window |
|---|---|
| Parallel | Short windows |
| Sequential | Long windows |
| Rolling | Medium windows |
4. Plan for Rollback
Section titled “4. Plan for Rollback”Think about how you’ll rollback:
| Mode | Rollback Strategy |
|---|---|
| Parallel | Rollback all |
| Sequential | Rollback completed |
| Rolling | Rollback by batch |
Monitoring by Mode
Section titled “Monitoring by Mode”Parallel
Section titled “Parallel”Watch for:
- Overall completion percentage
- Any failures across all targets
- Resource utilization spikes
Sequential
Section titled “Sequential”Watch for:
- Current target progress
- Cumulative success rate
- Time per target
Rolling
Section titled “Rolling”Watch for:
- Current batch progress
- Batch completion rate
- Issues between batches
Troubleshooting
Section titled “Troubleshooting”Rolling Deployment Too Slow
Section titled “Rolling Deployment Too Slow”Cause: Batch size too small
Solution: Increase the batch size
Sequential Deployment Stuck
Section titled “Sequential Deployment Stuck”Cause: Single target blocking
Solution: Check target status, consider skipping or fixing
Parallel Overwhelming Resources
Section titled “Parallel Overwhelming Resources”Cause: Too many concurrent operations
Solution: Switch to rolling mode with appropriate batch size
Next Steps
Section titled “Next Steps”- Creating Deployments - Create new deployments
- Target Selection - Choose targets
- Monitoring - Track progress
- Overview - Return to deployments overview
