May be time to revive that port allocator RFC?
And/or the more generic allocator RFC?
This Nix PR also has good inputs