FacebookRichard Barnes, Neeraj Kumar, Pol Mauri Ruiz8 min readintermediate
Open-Sourcing Rebalancer: A Generic, High-Performance Library for Solving Assignment Problems
Summary
Meta open‑sourced Rebalancer, a library that lets engineers describe assignment problems (objects → bins) via a high‑level spec API, then solves them with either a MIP backend or a highly parallel local‑search engine. It handles millions of objects, solves ~40 M problems daily, and includes a debugging UI.
- Rebalancer separates problem specification (dimensions, partitions, scopes) from solving, enabling reusable specs for common constraints and objectives.
- Two solvers: an optimal MIP path (with variable aggregation, symmetry breaking) and a parallel local‑search path with O(|objects|+|bins|) neighborhood evaluation.
- Production metrics: P99 solve time 12 s for 265k objects/3.2k bins; 1 M+ objects/5k bins solved in ~171 s, handling 40 M daily assignments.
- Explorer UI (Dockerized) provides visual debugging of assignments, constraints, and objective changes.
Engineers building large‑scale resource allocation or scheduling systems need a reusable, high‑performance solver that scales to millions of items while remaining debuggable.
7/10



