The 40,000-field Query: Optimizations for Gigantic High-QPS Operations
summary
Meta handles a 40,000-field persisted query by storing fragment-name-to-offset maps and implementing lazy fragment parsing so only needed fragments are parsed, cutting parse time from 60 ms to 2 ms for a typical newsfeed response. Traffic shows 500,000 distinct persisted documents/day and a 65% LRU hit rate, so a probabilistic cache-fill (e.g. fill 25% of misses) plus traffic-aware caching and fragment inlining reduces parse overhead from 37% → 20% → 10% → 2% of server cost.
AI-written summary · about
chapters (5)
- 0:00The parsing bottleneck
- 1:20Limitations of caching
- 2:54Lazy fragment parsing
- 5:06Resolving optimization conflicts
- 7:29Results and final thoughts
related talks
28mUnderstand GraphQL API performance options and query optimizations
26mBuild a performance-optimized GraphQL API
23mHow to edge cache GraphQL APIs
12mImprove Application Performance and User Engagement with Advanced GraphQL Features
23mGraphQL - Accelerated
39mGraphQL Accelerated
25mGraphQL Pagination at Meta
25mOptimizing GraphQL Applications
