Meta Open-Sourced Their Scheduler

October 6, 2026 · infrastructure · optimization

Meta just open-sourced Rebalancer, the tool that decides which task runs on which machine across their data centers. It has been running in production for 9 years and solves about 40 million assignment problems every single day. The assignment problem sounds academic. It is actually one of the most practical problems in computing, and you've been living inside it your whole life.

Current cost
–
Best found
–
Swaps tried
0
Improving swaps
0
task (left) machine (right) just swapped

This is a miniature of Rebalancer's local-search solver. Press Solve and it starts with a random assignment, then keeps swapping two tasks whenever the swap lowers the total cost. Watch the cost drop fast, then stall. That stall is the solver admitting it's done.

1. The problem

You have a pile of tasks and a row of machines. Every task costs a different amount to run on every machine (scroll the matrix the solver is using at the bottom of the page). Put each task on exactly one machine, keep the machines reasonably balanced, and make the total cost as low as possible. That's it. That's the assignment problem.

It shows up everywhere once you start looking. Which delivery driver takes which order. Which cell tower handles your phone call. Which server runs your Instagram request. Airlines use it to assign crews to flights. Meta uses it to place hardware, schedule services, and route traffic. Your life is a long series of assignment problems being solved by computers you will never meet.

The cruel part: the number of possible assignments explodes. With 24 tasks and 6 machines, there are more combinations than you could check in the lifetime of the universe. You cannot brute force it. You need to be clever. Try it above: hit Shuffle costs, then Solve, and watch how far the cost falls from a random start.

2. The clever part

Rebalancer ships two solvers. The first is an optimal MIP solver: it finds the mathematically perfect answer, and it takes as long as it takes. The second is a parallelized local search solver: it starts with a random assignment, then keeps trying small swaps. If a swap lowers the total cost, keep it. If not, throw it away. Repeat until nothing improves. That's exactly what you just ran above.

Local search almost never finds the perfect answer. It finds a great answer fast, which at Meta's scale is the whole game. When you're solving 40 million problems a day, "perfect" is a luxury and "great in 12 seconds" is the product.

40Massignment problems solved per day at Meta
9+years running in production before open source
12sP99 solve time on 265k objects, 3.2k bins
30+different problem formulations in use

3. Why open source it now

Nine years is a long time to sit on something useful. The generous read: Meta cleaned it up, generalized it, and decided the goodwill was worth more than the moat. The cynical read: after nine years, the moat already did its job. Both can be true.

What I like about the release is the design. Rebalancer separates how you describe the problem from how it's stored, solved, and debugged. That's the kind of separation that sounds obvious and is rare in practice. Most solvers glue all of it together and you spend your weekends untangling it. Whoever designed this interface has debugged a scheduler at 3am and vowed never again. Respect.

The code is C++ and Python, at github.com/facebook/rebalancer. If you've ever written a greedy assigner and felt vaguely guilty about it, this is your upgrade path.

The cost matrix the solver is using

Every cell is the cost of running that task on that machine. Highlighted cells are the current assignment. Hit Shuffle costs above and this table regenerates.