OpenFGA Implements Self-Tuning Strategy Planner with Thompson Sampling to Reduce P99 Latency by 98%
By
elbuo
Fresh out the oven, still warm. Top of the tray.
Summary
The article details how OpenFGA, an open-source authorization system modeled after Google's Zanzibar, addressed tail latency challenges in its critical Check operation. The system implemented a self-tuning strategy planner using Thompson Sampling to dynamically optimize graph traversal strategies, resulting in a 98% reduction in P99 latency. This approach moved from static rules to adaptive decision-making for authorization queries, significantly improving performance for latency-critical systems.
Key quotes
· 5 pulledOperating a latency-critical system means the inevitable work of reducing tail latency. Tail latency refers to the response time experienced by the slowest requests (the outliers), rather than the average.
Since authorization happens on every request, these decisions must be fast; otherwise, they directly add overhead to the total response time.
For OpenFGA, an open-source authorization system modeled after Google's Zanzibar, that powers up Auth0 FGA, this challenge manifests in its most critical operation: Check.
Answering 'Can user X access resource Y?' requires traversing relationship gra
Learn how OpenFGA used Thompson Sampling to reduce P99 latency by 98%, moving from static rules to a dynamic, self-tuning strategy planner for graph traversals.
You might also wanna read

How micro-optimizations in Azure Service Bus SDK paved the way for a smarter redesign
The article discusses how micro-optimizations in the Azure Service Bus SDK led to meaningful design improvements. Rather than advocating for
How Kestra Improved Orchestrator Performance Across 14 Releases: A Year of Performance Engineering
Kestra's engineering team details their year-long performance engineering journey across releases 0.19 to 1.3, treating performance as an on
OpenJDK Performance Fix: How Replacing /proc Parsing with a Syscall Eliminated 400x Slowdown
The article analyzes a specific OpenJDK commit that dramatically improved Java performance by replacing inefficient /proc file parsing with
Performance Optimization Principles and Techniques from Google Engineers
This document by Google engineers Jeff Dean and Sanjay Ghemawat presents a comprehensive guide to performance tuning principles and techniqu
Implementing SwissTable-Style High-Performance Hash Tables in Java
This article details the author's journey implementing a SwissTable-style hash table in Java, inspired by Google's high-performance C++ hash
Three Years In: A Senior Engineer's Reflection on AI's Impact on the Software Development Role
A senior engineer reflects on the long-term sustainability of AI tools in software development, three years into deep organizational adoptio
