---
answer: direct
beat: system-design
source: 1 article · updated: November 15, 2026
---

How does FOQS handle priority scheduling without slow full-table scans?

Each shard keeps an in-memory index of ready item primary keys ordered by priority. A prefetch buffer combines candidates across shards with a k-way merge, then retrieves rows from MySQL.

Answered in

How Meta Scaled FOQS, a Priority Queue Built on Sharded MySQL

Meta's FOQS combines MySQL-backed persistence, per-shard ready-item indexes, prefetching, leases, and tenant capacity controls.

Crashtech Editorial November 15, 2026 System Design & Architecture

Read the full analysis

Other questions this article answers

More system design & architecture questions

Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the System Design & Architecture beat.