Blue-green deployment always deploy instantly

When I make a deployment with the bluegreen strategy, it always sees my green machines as passing health checks immediately. It does this even before the machines’ VMs have fully started, long before the health check even finishes its grace period. This makes fly.io instantly stop the blue machines and migrate the green machines over, before the green machines have even booted, interrupting traffic quite drastically.

My health checks config is shown below:

[[http_service.checks]]
grace_period = "10s"
interval = "5s"
timeout = "2s"
path = "/v1/bibles"

Hi… It generally helps to post the full fly.toml, since that format has a lot of nuances, particularly when it comes to service configuration. (People often unknowingly have two conflicting definitions, for example.)

The output of fly checks list would also be a good idea, I think, since it sounds like your health checks might not even be registered, :thinking:

Here is my entire fly.toml:

app = 'bible-web-framework'
primary_region = 'ord'

[env]
DEFAULT_BIBLE = 'webbe'

[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = 'suspend'
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[http_service.checks]]
grace_period = '10s'
interval = '5s'
timeout = '2s'
path = '/v1/bibles'

[deploy]
strategy = 'bluegreen'

[[vm]]
memory = '256mb'
cpu_kind = 'shared'
cpus = 1

And here is the output of fly checks list. As you can see, both checks are here, and both are failing (the machines haven’t even started yet), but the green machines were deployed anyway.

╰─ fly checks list
Health Checks for bible-web-framework
  NAME                      | STATUS  | MACHINE        | LAST UPDATED | OUTPUT
----------------------------*---------*----------------*--------------*-----------------------------
  servicecheck-00-http-8080 | warning | 2872654f0e4668 | 34s ago      | the machine hasn't started  
----------------------------*---------*----------------*--------------*-----------------------------
  servicecheck-00-http-8080 | warning | d8de064bed9e28 | 31s ago      | the machine hasn't started
----------------------------*---------*----------------*--------------*-----------------------------

Hi @taki,

Try removing processes = ['app'] from your http_service.section.

Yes that fixed it. Thanks! Why was that causing an issue?