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:

SettingDescriptionRequired?
Batch SizeTargets per batchYes — minimum 1; there is no default. Lens prefills 2.
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, two targets at a time
mantisctl deployment create --solution-id <id> --mode rolling:2

--mode takes the batch size inline as rolling:N (N of at least 1); the same deployment is expressed through the API as the target_mode field.

A deployment runs the targets its request names, in the order named. Sequential and rolling modes follow that order; parallel mode starts all targets together and reports results as they complete.

Promotions and rollbacks resolve their targets from the environment instead, ordered by each assignment’s priority (-100 to 100, default 50, higher first):

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

See Target Selection.

  • 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