Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Meta Engineering 8 min read Announcement mediumAdept

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

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.

Assumes: mixed integer programminglocal search heuristicsbin packing

Related posts

  • MilleMiglia: A realistic instance generator for middle-mile logistics

    Google Research easyNovice

    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. Middle-mile delivery is modeled as a multi-commodity flow problem on a space-time graph with hard constraints (fixed vehicle schedules, distribution-center throughput limits, and cross-vehicle synchronization), which standard VRP solvers cannot handle. The generator places distribution centers via gravity models or spatial clustering, samples origin-destination demand, builds structured vehicle rotations, and serializes each instance to a single Protocol Buffers file. Instance sizes range from toy problems for exact algorithms to continent-scale ones needing metaheuristics, with the aim of creating a CVRPLIB-style benchmark suite.

  • Open-sourcing TAOBench: An end-to-end social network benchmark

    Meta Engineering easyNovice

    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. A small set of parameters, including transaction size, key-to-shard mapping and operation-type frequencies, is enough to downscale production request patterns and model emergent application behavior, and the workloads are validated against production. Meta uses it to test new transaction use cases, lock contention, new APIs and high fan-out transactions. The release includes results for Cloud Spanner, CockroachDB, PlanetScale, TiDB and YugabyteDB, which show how the benchmark exposes performance tradeoffs.

  • Linear programming for fun and profit

    Modal mediumAdept

    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. It solves that program with Google's GLOP simplex solver from OR-Tools and outputs a delta of instances to spin up or down. Cheap preprocessing heuristics, such as pruning instance types, keep solves to fractions of a second rather than minutes, trading a little optimality for predictable scaling latency. Background workers make the actual cloud requests and feed observed capacity-limit failures back into later solves. The approach lets Modal exploit price arbitrage, such as H200s priced below H100s, and saves millions per year.

  • Lazy gas, hot gas, and a thousand robots

    Amazon Science hardMaster

    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. A linear program then returns integer, collision-free paths, about O(n^1.68) in practice. On a 150×150 grid with 1,125 robots (3.4M variables, T=30), this takes 478 seconds, while the NP-hard non-TU formulation often fails to find a feasible solution in 12 hours. An entropic relaxation equivalent to a Schrödinger bridge (the 'hot gas' model) is solved with Sinkhorn iterations to find likely corridors, then pruned back to integral paths. This cuts runtime to 67 seconds, scaling roughly O(n^1.15), at a cost of staying within 6.5% of optimal.

  • Viewing the world as a computer: Global capacity management

    Meta Engineering mediumAdept

    Meta manages capacity across its 14 data center regions with two systems built on Twine and RAS. Global Reservations Service lets latency-tolerant services declare one global capacity request; a mixed-integer linear programming solver assigns machines to reservations, enforcing that capacity minus the largest region still meets demand. For example, a 300-server request becomes 150 servers in each of three regions, and the disaster-readiness buffer shrinks as capacity spreads over more regions. Regional Fluidity handles latency-sensitive services by using distributed tracing to attribute traffic to shiftable demand sources, solving a placement plan from dependency and traffic-ratio constraints, and having an Orchestrator sequence safe shifts: add capacity and replicas, move traffic, then reclaim.

The quest for software engineering knowledge.

Look:
Layout: