Meta has open-sourced Rebalancer, a high-performance C++ library with a Python interface designed to solve complex resource allocation and assignment problems. The software, which has been deployed internally at Meta for over nine years, is now available under the Apache 2.0 license with a PyPI package, prebuilt binaries, and a debugging web interface called Rebalancer Explorer.

The library addresses the core challenges of usability and scalability in NP-hard assignment problems, such as placing tasks on servers or routing user traffic to datacenters. Rebalancer separates problem specification from its resolution by utilizing a dedicated spec language and compiling problems into a directed acyclic expression graph. It features two distinct solvers: an optimal mixed integer program solver for smaller tasks and a parallelized local search solver that handles massive hyperscale problems scaling to millions of objects.

In production at Meta, Rebalancer successfully processes about 40 million placement problems daily across more than 30 unique formulations. The tool enables organizations to efficiently manage cluster workloads, balance cross-region traffic, and handle operational scheduling tasks while maintaining strict capacity and constraint rules.