Skip to content

Execution Modes

Execution modes determine how deployments run across multiple targets.

ModeDescriptionBest For
ParallelAll targets simultaneouslyIndependent services
SequentialOne target at a timeStateful services
RollingBatches of targetsLarge deployments

All targets receive commands at the same time:

PropertyValue
SpeedFastest
Resource usageHigh (all targets active)
RiskHigher (all targets affected at once)
Rollback complexityHigher
  • Stateless services
  • Independent targets
  • Speed is critical
  • Targets don’t share state
  • Database servers
  • Services with shared state
  • When gradual rollout is required
  • Limited network bandwidth

Targets are updated one at a time:

PropertyValue
SpeedSlowest
Resource usageLow (one target active)
RiskLower (issues caught early)
Rollback complexityLower
  • Database servers
  • Primary/replica pairs
  • Ordered dependencies
  • Careful rollouts
  • Large number of targets (takes too long)
  • Time-sensitive deployments
  • Independent services

Targets are updated in batches:

SettingDescriptionDefault
Batch SizeTargets per batch1
PropertyValue
SpeedMedium
Resource usageMedium
RiskBalanced
Rollback complexityMedium
TargetsRecommended Batch Size
4-102
10-505-10
50-10010-20
100+10-25 (5-10% of total)
  • Large deployments
  • Maintaining service availability
  • Gradual rollouts
  • Canary deployments
┌─────────────────────────────────────────────────────────┐
│ Execution Configuration │
├─────────────────────────────────────────────────────────┤
│ │
│ Mode: │
│ ○ Parallel - All targets at once │
│ ○ Sequential - One target at a time │
│ ● Rolling - Targets in batches │
│ │
│ Batch Size: [3 ] │
│ │
└─────────────────────────────────────────────────────────┘
Terminal window
# Parallel
mantisctl deployment create --solution-id <id> --mode parallel
# Sequential
mantisctl deployment create --solution-id <id> --mode sequential

Rolling mode with a specific batch size is configured through the UI or directly via the API using the target_mode field.

Within any mode, targets are ordered by priority. Priority values range from -100 to 100 (default 50), and higher priority values deploy first:

TargetPriorityExecution Order
web-prod-0180First
web-prod-0270Second
web-prod-0360Third
db-prod-0110Last

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.

  • All targets start
  • On failure, no new steps start
  • Running steps complete
  • Deployment marked failed
  • First failure stops entire deployment
  • Remaining targets skipped
  • Easy to identify failing target
  • Current batch completes
  • Remaining batches skipped
  • Partial deployment state
AspectParallelSequentialRolling
Deployment timeFastestSlowestMedium
Risk exposureAll at onceGradualBalanced
Availability during deployPotentially zeroGradual reductionControlled
Rollback scopeAll targetsSingle targetBatch
Monitoring complexityHighLowMedium
Best forStatelessStatefulLarge scale
Service TypeRecommended Mode
Stateless APIParallel or Rolling
DatabaseSequential
Cache layerRolling
Load balancerSequential
Worker queueRolling

Even for stateless services:

Rolling (batch size: 25%)
├── Catch issues early
├── Maintain availability
└── Allow monitoring between batches
ModeSuitable Window
ParallelShort windows
SequentialLong windows
RollingMedium windows

Think about how you’ll rollback:

ModeRollback Strategy
ParallelRollback all
SequentialRollback completed
RollingRollback by batch

Watch for:

  • Overall completion percentage
  • Any failures across all targets
  • Resource utilization spikes

Watch for:

  • Current target progress
  • Cumulative success rate
  • Time per target

Watch for:

  • Current batch progress
  • Batch completion rate
  • Issues between batches

Cause: Batch size too small

Solution: Increase the batch size

Cause: Single target blocking

Solution: Check target status, consider skipping or fixing

Cause: Too many concurrent operations

Solution: Switch to rolling mode with appropriate batch size