Skip to content

Boot in parallel for roles on the same host#1731

Merged
djmb merged 1 commit intomainfrom
boot-parallel-roles
Dec 4, 2025
Merged

Boot in parallel for roles on the same host#1731
djmb merged 1 commit intomainfrom
boot-parallel-roles

Conversation

@djmb
Copy link
Collaborator

@djmb djmb commented Dec 3, 2025

If you have multiple roles on the same host, we'll boot them sequentially on that host. This may be important to avoid overloading the server but it's actually just there as a consequence of SSHKit's on() method only connecting once per host.

To allow roles to boot in parallel on the same host, add a new option:

boot
  parallel_roles: true

This is implenented by adding a new on_roles method that uses a separate thread for each role.

It defaults to false though as underpowered servers may struggle with booting new containers in parallel.

If you have multiple roles on the same host, we'll boot them
sequentially on that host. This may be important to avoid overloading
the server but it's actually just there as a consequence of SSHKit's
`on()` method only connecting once per host.

To allow roles to boot in parallel on the same host, add a new
option:
```yaml
boot
  parallel_roles: true
```

This is implenented by adding a new `on_roles` method that uses a
separate thread for each role.

It defaults to `false` though as underpowered servers may struggle
with booting new containers in parallel.
@djmb djmb merged commit e40731a into main Dec 4, 2025
10 checks passed
@djmb djmb deleted the boot-parallel-roles branch December 4, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant