Rolling deployments sequence

Whoops! Missed this earlier.

By default, a deploy does a canary + rolling restart. This means it’ll boot the first instance, wait for health checks, and then promote the canary. When this happens, it goes to a rolling process. The rolling deploy stops one instance, boots another, stops another instance, etc.

What you’re seeing is basically this sequence:

  1. Canary boots, health checks pass
  2. Canary gets promoted, replacing old instance #1
  3. Old instance #2 stops (rolling deploy)
  4. New instance #2 starts

If you had three instances:

  1. Canary boots, health checks pass
  2. Canary gets promoted, replacing old instance #1
  3. Old instance #2 stops (rolling deploy)
  4. New instance #2 starts
  5. Old instance #3 stops
  6. New instance #3 starts

Now that I’ve written all that out, I realize it’s mildly confusing for 2 instance apps. It might be more predictable to do a blue/green deploy, or repeat the canary process all l the way through.

Regarding logs + SIGINT, you should see log messages after SIGINT if you’re still producing them. Is it possible the process is shutting down very quickly on SIGINT?

I ended up replacing a bunch of bash with Go as well. It’s so handy and … compiles.