---
title: "Open-Sourcing Rebalancer: A Generic, High-Performance Library for Solving Assignment Problems"
description: "Meta has open-sourced Rebalancer, a generic library for solving assignment problems that has been used internally for over nine years. Rebalancer separates problem specification from solution, using a three-step approach with modeling constructs like dimensions, partitions, scopes, and utilization, and a high-level spec API for common objectives and constraints. Problems are translated into an expression graph, and Rebalancer offers two solving techniques: an optimal solver using mixed integer programming (MIP) with commercial or open-source solvers, and a local search solver that evaluates millions of moves per second for large-scale problems. The local search solver handles problems with over a million objects and 5k bins, with an average solve time of 171 seconds. Rebalancer is used for roughly 40 million assignment problems daily across Meta’s infrastructure, and the open-source release includes a debugging UI called Rebalancer Explorer. The accompanying paper was published at OSDI’24."
---

# Open-Sourcing Rebalancer: A Generic, High-Performance Library for Solving Assignment Problems

[Meta](https://yomu.fyi/company/meta) · By Richard Barnes, Neeraj Kumar, Pol Mauri Ruiz · Sep 21, 2026

**Type:** Announcement

## Summary

Meta has open-sourced Rebalancer, a generic library for solving assignment problems that has been used internally for over nine years. Rebalancer separates problem specification from solution, using a three-step approach with modeling constructs like dimensions, partitions, scopes, and utilization, and a high-level spec API for common objectives and constraints. Problems are translated into an expression graph, and Rebalancer offers two solving techniques: an optimal solver using mixed integer programming (MIP) with commercial or open-source solvers, and a local search solver that evaluates millions of moves per second for large-scale problems. The local search solver handles problems with over a million objects and 5k bins, with an average solve time of 171 seconds. Rebalancer is used for roughly 40 million assignment problems daily across Meta’s infrastructure, and the open-source release includes a debugging UI called Rebalancer Explorer. The accompanying paper was published at OSDI’24.

## Context

Assignment problems arise across Meta’s infrastructure, including hardware placement, service placement, task placement, and traffic routing. Practitioners struggle to translate real-life policies into precise mathematical formulas, and NP-hard problems cannot be solved efficiently by commercial solvers at scale.

## Approach / What changed

Rebalancer separates problem specification from solution using a language of objects, bins, constraints, and objectives. It provides a three-step specification approach with modeling constructs (dimensions, partitions, scopes, utilization) and a high-level spec API. Problems are translated into an expression graph. Rebalancer offers two solving techniques: an optimal solver using mixed integer programming (MIP) with commercial or open-source solvers, and a local search solver that evaluates millions of moves per second. It also includes a debugging UI called Rebalancer Explorer.

## Takeaways

- Rebalancer separates problem specification from solution, using an expression graph and two solving techniques (optimal MIP and local search) to handle both small and large-scale problems.
- The local search solver can handle problems with over a million objects and 5k bins, with an average solve time of 171 seconds, and evaluates millions of moves per second.
- Rebalancer is used for roughly 40 million assignment problems daily across Meta’s infrastructure, with a P99 solve time of 12 seconds for problems with 265k objects and 3.2k bins.

## FAQ

### What solving techniques does Rebalancer offer?

Rebalancer offers an optimal solver using mixed integer programming (MIP) with commercial or open-source solvers, and a local search solver that evaluates millions of moves per second. The right technique depends on problem size and requirements.

### How does Rebalancer handle large-scale assignment problems?

Rebalancer's local search solver works directly on the expression graph, exploring moves with a neighborhood size O(|objects|+|bins|). It evaluates millions of moves per second and can handle problems with over a million objects.

### What debugging tools does Rebalancer provide?

Rebalancer includes Rebalancer Explorer, a Dockerized web UI that helps answer questions about binding constraints, the effect of relaxing constraints, and why an object was placed in a particular bin.

**Tags:** [Assignment Problems](https://yomu.fyi/topic/assignment-problems), [Open Source](https://yomu.fyi/topic/open-source), [Optimization](https://yomu.fyi/topic/optimization), [Scalability](https://yomu.fyi/topic/scalability)

- Source: [Meta](https://engineering.fb.com/2026/09/21/open-source/rebalancer-generic-high-performance-library-assignment-problems)
- Source URL: https://engineering.fb.com/2026/09/21/open-source/rebalancer-generic-high-performance-library-assignment-problems
- Ingested by Yomu: 2026-09-21T18:00:13.236Z

[Read original post](https://engineering.fb.com/2026/09/21/open-source/rebalancer-generic-high-performance-library-assignment-problems)
