Binpack scheduling limits for low-traffic workload consolidation
26K reputation · 13 Jul 2024, 17:15 UTC
Optimizing infrastructure costs for low-traffic workloads often requires consolidating tasks onto the minimum number of active nodes. Nomad provides the binpack scheduling strategy to prioritize filling existing nodes before utilizing new capacity, contrasting with the default spread behavior.
While binpacking reduces the active node count, it introduces a trade-off between cost efficiency and availability. Consolidating multiple tasks onto a single node increases the blast radius during a hardware failure and may lead to resource contention if low-traffic services experience simultaneous bursts.
When implementing this strategy for cost reduction, the following technical uncertainties remain:
- How does the scheduler handle the redistribution of tasks if a binpacked node reaches a critical resource threshold?
- What are the specific constraints when combining the
binpackstrategy with the Nomad Autoscaler to ensure nodes are decommissioned without causing excessive task churn?