---
title: "Open-Sourcing Rebalancer: A Generic, High-Performance Library for Solving Assignment Problems"
description: "Meta has open-sourced Rebalancer, an assignment-problem solver used for nine years to place hardware, services, tasks and traffic across its infrastructure."
url: "https://swe.quest/articles/open-sourcing-rebalancer-a-generic-high-performance-library-for-solving-d79479af3daad1e0"
canonical: "https://engineering.fb.com/2026/09/21/open-source/rebalancer-generic-high-performance-library-assignment-problems/"
source: "Meta Engineering"
published: "2026-09-21"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 8
tags: ["algorithms","scheduling","open-source","datacenters","performance"]
---

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

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2026-09-21, 8 min read, Announcement. Original: [https://engineering.fb.com/2026/09/21/open-source/rebalancer-generic-high-performance-library-assignment-problems/](https://engineering.fb.com/2026/09/21/open-source/rebalancer-generic-high-performance-library-assignment-problems/)

## Summary

Meta has open-sourced Rebalancer, an assignment-problem solver used for nine years to place hardware, services, tasks and traffic across its infrastructure. Problems are specified with objects, bins, dimensions, partitions, scopes and reusable specs (e.g. CapacitySpec, BalanceSpec), then compiled into an expression graph. That graph either drives a parallelized local search with an O(objects+bins) neighborhood or is translated into a MIP for Xpress, Gurobi or HiGHS, which shrinks models with variable aggregation and symmetry breaking but can still grow O(objects×bins). Rebalancer solves about 40 million problems a day, with a P99 of 12 seconds at 265k objects and 3.2k bins, and ships alongside Explorer, a Dockerized debugging UI.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Algorithms](https://swe.quest/tags/algorithms.md) (Architecture & design)
- [Scheduling](https://swe.quest/tags/scheduling.md) (Distributed systems)
- [Open source](https://swe.quest/tags/open-source.md) (Engineering practices)
- [Datacenters](https://swe.quest/tags/datacenters.md) (Infrastructure)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- mixed integer programming
- local search heuristics ([easy posts on Search](https://swe.quest/tags/search.md?difficulty=easy))
- bin packing

## Keywords

Rebalancer, Rebalancer Explorer, Gurobi, FICO Xpress, HiGHS, Shard Manager, Taiji, OSDI

## Related posts

- [MilleMiglia: A realistic instance generator for middle-mile logistics](https://swe.quest/articles/millemiglia-a-realistic-instance-generator-for-middle-mile-logistics-6dcc1ed2fd92bea0.md): Google Research · 2026-09-18 · Easy · 8 min read · Algorithms, Scientific computing, C & C++, Open source
  MilleMiglia is an open-source C++ instance generator that produces realistic, privacy-preserving benchmarks for middle-mile logistics, where shipments are relayed across multiple vehicles between distribution centers over multi-day horizons.
- [Open-sourcing TAOBench: An end-to-end social network benchmark](https://swe.quest/articles/open-sourcing-taobench-an-end-to-end-social-network-benchmark-d1487a3fe445aa76.md): Meta Engineering · 2022-09-07 · Easy · 3 min read · Distributed databases, Performance engineering, Open source
  TAOBench is an open-source benchmark that reproduces Meta's social graph workload from TAO, a read-optimized, geo-distributed store serving over 10 billion requests per second on petabytes of data.
- [Linear programming for fun and profit](https://swe.quest/articles/linear-programming-for-fun-and-profit-77f85e06bfe14840.md): Modal · 2025-05-07 · Medium · 8 min read · Capacity planning, Cost optimization, Algorithms, Cloud platforms, Serverless
  Modal provisions GPU and CPU capacity across multiple clouds with a "resource solver" that formulates demand, prices, availability and per-instance limits as a linear program.
- [Lazy gas, hot gas, and a thousand robots](https://swe.quest/articles/lazy-gas-hot-gas-and-a-thousand-robots-6f7a6530e96fde6f.md): Amazon Science · 2026-11-24 · Hard · 6 min read · Algorithms, Scientific computing, Machine learning
  Anonymous multiagent pathfinding (MAPF) for warehouse robots can be solved to optimality in polynomial time by formulating it as multimarginal optimal transport (MMOT) whose constraint matrices stay totally unimodular.
- [Viewing the world as a computer: Global capacity management](https://swe.quest/articles/viewing-the-world-as-a-computer-global-capacity-management-a52a2917bf341403.md): Meta Engineering · 2022-09-06 · Medium · 13 min read · Capacity planning, Datacenters, Scheduling, Distributed systems, Resilience
  Meta manages capacity across its 14 data center regions with two systems built on Twine and RAS.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
