Citation and evidence

Rebalancer

5 min full readUpdated 10 references

This article's verification

Report a problem with this article

More

Use this article

Raw MarkdownExplore connections

Improve this page

Suggest editRevision history

Topics

AI InfrastructureAlgorithmsDeveloper Tools

Cite this article

Rebalancer is a resource-allocation library developed at Meta for assigning objects to containers under constraints and optimization goals. Its C++ core runs in one process with multiple threads; applications can use C++ or Python interfaces.[2] Meta announced its open-source release on September 21, 2026, after more than nine years of internal use.[1]

Modeling an assignment

The model describes what can be placed, where it can go, and the properties relevant to placement. The same task-to-server problem can express limits on individual servers and requirements across racks.[3]

ConstructMeaningTask-placement example
ObjectItem being assignedTask
Container, also called a binAssignment destinationServer
DimensionNumeric object or container propertyTask CPU requirement or server CPU capacity
ScopeGrouping of containersServers belonging to a rack
PartitionGrouping of objectsTasks belonging to jobs

Expanded article table

Dimensions can depend on both the object and its destination. Object groups need not be disjoint.[3]

Goals and constraints

Reusable specifications, or specs, describe placement requirements and quantities to optimize. The reference catalog contains more than 25 specs. Some support both goals and constraints; others support only one.[4]

SpecExample purposeSupported role
CapacityKeep utilization within limitsBoth
GroupCountBound a group's utilization within each scope itemBoth
BalanceEqualize utilization across scope itemsGoal
AvoidAssignmentsExclude particular placementsConstraint
ToFreeDrain listed containersBoth
DisasterRecoveryCapacityReserve capacity for correlated failuresBoth

Expanded article table

A constraint's policy matters when the initial assignment is invalid.[5]

PolicyTreatment
DEFAULTPreserve initially satisfied constraints. Repair existing violations as high-priority goals while prohibiting deterioration beyond their initial level.
HARDRequire satisfaction; inability to satisfy the constraint is an error.
SOFTPenalize violations, which can remain or worsen when the overall objective improves.

Expanded article table

Multiple goals can share a weighted sum or occupy ordered priority buckets. Buckets are compared lexicographically: a lower-priority goal can improve only when earlier buckets tie. A large weight alone does not establish strict priority.[6]

Expression graph and solvers

Rebalancer translates specifications into a directed acyclic expression graph. The OSDI 2024 paper describes a representation that grows with objects plus bins, rather than the object-bin product of a direct mixed-integer formulation. The graph separates problem representation from the choice of solving algorithm.[7]

Solver familyApproachImportant limitation
Local searchImprove an initial assignment through incremental movesCan stop at a local optimum rather than the best possible assignment
Optimal solverTranslate the model for FICO Xpress, Gurobi, or open-source HiGHSLarge problems can exhaust resources; a time-limited result need not be optimal

Expanded article table

The model can remain unchanged when switching between these families.[2][8]

Local search is the default. Its configurable move types determine which neighboring assignments it evaluates. Time and applied-move limits provide stopping conditions; without configured stopping limits, it searches until reaching a local optimum. Discontinuous requirements can make incremental search get stuck.[9]

Production use at Meta

Meta uses Rebalancer for database-shard placement, allocating servers to services, traffic routing, serverless-function locality, and balancing online machine-learning training across regions. Its September 2026 release post reported the following operating scale.[1]

Reported measureValue and scope
Daily assignment problemsRoughly 40 million
Distinct problem formulationsMore than 30
99th-percentile solve time12 seconds for a problem with 265,000 objects and 3,200 bins
Large-problem average171 seconds for problems exceeding 1 million objects with 5,000 bins; more than 3,400 such runs

Expanded article table

These figures describe Meta's workloads, not a guaranteed runtime for arbitrary models.[1]

Research and evaluation

Neeraj Kumar and eight coauthors presented Rebalancer at OSDI 2024. In one Azure-data placement experiment involving 10,000 pods and 500 nodes, the paper reported 94.6% placement with an optimal MIP solver, 92.8% with SINGLE_GREEDY, and 93.2% with SINGLE_RANDOM. SINGLE_RANDOM ran faster but placed fewer pods than the MIP baseline in that experiment.[7]

The paper's separate DCM comparison used published DCM measurements rather than running both systems on identical hardware, because of security and dependency restrictions.[7]

Explorer and distribution

Rebalancer Explorer is a web interface for inspecting solver inputs, assignments, goals, constraints, and solution scores. Its Next.js frontend communicates through a JSON proxy with a C++ Thrift backend. Docker Compose can start these components with example problem bundles. The proxy URL and bearer token are configurable; the token is required unless proxy authentication has explicitly been disabled.[10]

Rebalancer is distributed under Apache 2.0. Python installation uses pip install rebalancer; the repository also provides platform-specific native builds and packages. Building the C++ library from source does not itself create the Python package.[2]

See also

References

  1. ^1 ^2 ^3Engineering at Meta. Open-Sourcing Rebalancer: A Generic, High-Performance Library for Solving Assignment Problems. September 21, 2026.
  2. ^1 ^2 ^3Meta. Rebalancer repository and README. GitHub.
  3. ^1 ^2Meta. Core Concepts. Rebalancer documentation.
  4. ^Meta. Goals and Constraints. Rebalancer documentation.
  5. ^Meta. Constraint policy. Rebalancer documentation.
  6. ^Meta. Goal priorities. Rebalancer documentation.
  7. ^1 ^2 ^3Kumar, Neeraj, et al. Optimizing Resource Allocation in Hyperscale Datacenters: Scalability, Usability, and Experiences. OSDI 2024, pp. 507-528.
  8. ^Meta. Solver Overview. Rebalancer documentation.
  9. ^Meta. Local Search Solver. Rebalancer documentation.
  10. ^Meta. Rebalancer Explorer. Rebalancer documentation.

Improve this article

Add missing citations, update stale details, or suggest a clearer explanation. Every suggestion is reviewed for sourcing before it goes live.

1 revision · v1 · 929 words · full history

Fact-checks are independent of edits: a reviewer re-verifies the article against its sources and stamps the date. How we verify

Research and drafting on this wiki are AI-assisted, under named human editorial standards. How AI is used here

Reviewer note: Independent full-article review against 10 cited primary and academic sources, October 12, 2026. Checked subject identity, specifications, availability, benchmark conditions and limitations.

Cite this page: AI Wiki. "Rebalancer." aiwiki.ai, updated 11 Oct 2026, fact-checked 11 Oct 2026. CC BY 4.0. https://aiwiki.ai/wiki/rebalancer

Suggest edit