ArroyoSystems / arroyo

Distributed stream processing engine in Rust
https://arroyo.dev
Apache License 2.0
3.44k stars 188 forks source link

Support per-slot k8s resource management #649

Closed mwylde closed 3 weeks ago

mwylde commented 3 weeks ago

Currently, k8s resources are specified on a per-pod basis, with some number of task slots deployed per pod. However, this is inefficient if you are deploying a mix of small jobs (that just need a single slot) and large jobs. This PR adds a new (now default) option to configure resources on a per slot basis instead. In this mode, the number of slots needed for the pod is calculated (up to a max number of task slots allowed on a single pod), then it is given slots * per_slot_cpu cpu and slots * per_slot_mem memory.

To restore the existing behavior, use this config:

[kubernetes-scheduler]
resource-mode = "per-pod"