Skip to content
This repository has been archived by the owner on Mar 2, 2019. It is now read-only.

Latest commit

 

History

History
78 lines (58 loc) · 1.8 KB

update-strategy-create.md

File metadata and controls

78 lines (58 loc) · 1.8 KB

Summary

BOSH should allow alternative instance update strategy that would reduce process downtime, helping significantly singleton processes.

Motivation

Currently default update strategy Director uses to update instances is replace.

For example here is how replace strategy would update 5 instances within a single instance group and when max_in_flight is 1. The Director will stop jobs on the first instance, delete that VM, create new VM in its place and start jobs. Once that's successful it will move onto the next instance.

There are several advantages to a different update strategy (aka hotswap):

  • speed up VM creation via bulk create operation
    • earlier feedback on IaaS capacity restrictions
  • smaller individual job downtime as time between stopping and starting jobs is decreased
  • delayed VM deletion (to speed up deployment)

create strategy: The Director will create all new VMs, stop jobs on the first instance, start jobs on the new VM for that first instance. Once that's successful it will move onto the next instance. Unused VMs will be considered orphaned and could be deleted after deploy has finished.

Details

Multiple VM flow

prev VM         new VM

...             create_vm
                prepare
                apply
drain
stop
post-stop
unmount
detach
         swap
                attach
                mount
                pre-start
                start 
                ...

Single VM flow

prev VM

drain
stop
post-stop
unmount
delete

          swap

new VM

create_vm
prepare
apply
attach
mount
  apply... <--- ideally removed
pre-start
start 

TBD

...