How Epic Games Tuned Amazon OpenSearch Service for Fortnite Analytics
USA: Since its global debut in 2017, Epic Games’ Fortnite has grown into a world-spanning interactive ecosystem with hundreds of millions of registered players. Powering real-time gameplay, matchmaking, and live operations for a global player base generates a staggering volume of telemetry—billions of events every single day.
To ingest, store, and analyse this continuous flood of game data, Epic Games relies heavily on Amazon Web Services (AWS) and, specifically, Amazon OpenSearch Service. OpenSearch Service provides the underlying analytical engine for Epic’s live operations, surfacing emerging gameplay trends, detecting balance anomalies, and informing live content distribution across the Fortnite ecosystem.
However, operating at Fortnite’s scale presents unique infrastructure challenges. Epic Games ran into performance and cost bottlenecks when handling simultaneous high-throughput streaming writes and CPU-intensive aggregation queries. In a collaborative engineering initiative with AWS, Epic Games transformed their OpenSearch deployment. By re-architecting hardware utilization, index mappings, sharding strategies, and query patterns, the joint engineering team unlocked drastic reductions in query latency, slashed operational costs, and enabled significantly fresher live analytics.
The Analytical Pulse of Fortnite
Behind every Victory Royale, live concert, or seasonal update lies a complex data pipeline processing millions of concurrent interactions. Epic Games uses OpenSearch Service across two primary operational categories:
-
Search Workloads: Internal operational tools and observability dashboards that search across systems logs, operational events, and system telemetry.
-
Analytics Workloads: Processing a continuous sliding window of player and game telemetry.
+-----------------------------------------------------------------------+
| Fortnite Game Clients |
+-----------------------------------------------------------------------+
|
v
+-----------------------------------------------------------------------+
| Streaming Telemetry (In-Game Events, Combat) |
+-----------------------------------------------------------------------+
|
v
+-----------------------------------------------------------------------+
| Amazon OpenSearch Service Domain |
| +---------------------------------+ +------------------------------+ |
| | Continuous Ingestion (Writes) | | Complex Aggregations (Batch)| |
| +---------------------------------+ +------------------------------+ |
+-----------------------------------------------------------------------+
|
v
+-----------------------------------------------------------------------+
| Internal Operations & Player Experience Systems |
+-----------------------------------------------------------------------+
The sliding window analytics engine runs complex, multi-layered aggregations across millions of incoming records. These analytical outputs feed directly into downstream internal systems to:
-
Identify Emerging Gameplay Trends: Track weapon usage rates, item pickup frequencies, and map hotspots in real time.
-
Maintain Game Balance: Quickly spot overpowered mechanics, bug exploits, or underperforming content.
-
Personalize the Player Experience: Power community-wide activity metrics and surface relevant content dynamically.
-
Inform Live Operations: Allow designers and engineers to evaluate the impact of hotfixes, new seasons, and limited-time modes (LTMs).
The Core Challenge: Balancing High-Volume Writes with Aggregations
At Fortnite’s immense scale, the OpenSearch domain must handle two opposing computational loads simultaneously:
-
High-Throughput Streaming Ingestion: Constant, unyielding batch writes as millions of active players generate events every second.
-
Heavy Read-Side Aggregations: Complex multi-bucket aggregations running on tight schedules across large time ranges.
Ideally, live ops teams want aggregation jobs to run as frequently as possible—every few minutes rather than every hour. Shorter batch intervals provide fresher operational visibility, allowing developers to detect anomalies nearly instantaneously.
However, under Epic’s legacy configuration, increasing query frequency triggered severe CPU spikes and thread pool exhaustion. The cluster was forced to handle heavy garbage collection cycles and memory contention between ingestion buffers and query field data caches.
To maintain performance, the team faced a costly dilemma: either over-provision the OpenSearch cluster with expensive compute nodes to absorb peak query loads, or sacrifice query freshness. Neither option was acceptable for a world-class live-service game. Epic Games partnered directly with AWS solution architects and OpenSearch specialists to re-engineer the system from the ground up.
The Optimization Framework: Four Key Pillars
The joint engineering team focused on four critical areas: hardware, sharding, index mappings, and query design.
+-------------------------------------------------------------------------+
| EPIC GAMES OPENSEARCH TUNING PILLARS |
+------------------------------------+------------------------------------+
| 1. Hardware & Compute Architecture | 2. Sharding & Lifecycle Strategy |
| • AWS Graviton-powered instances | • Right-sized shard sizes |
| • Optimized storage volumes (GP3) | • Index State Management (ISM) |
+------------------------------------+------------------------------------+
| 3. Index Mappings & Data Modeling | 4. Query & Aggregation Engineering |
| • Schema slimming & explicit types| • Filter context vs query context |
| • Disabling unused doc_values | • Cache usage optimization |
+------------------------------------+------------------------------------+
1. Hardware Utilisation and Instance Modernisation
The team re-evaluated the physical infrastructure supporting the OpenSearch domain:
-
Migrating to AWS Graviton-based Instances: Epic migrated data nodes to AWS Graviton-powered instances (such as
r6gorc6gfamilies). Graviton chips offer significantly better price-performance for memory- and compute-heavy workload patterns, delivering lower latency per query at reduced cost. -
Storage Tiering and Volume Tuning: By transitioning storage to high-performance Amazon EBS GP3 volumes, Epic gained independent control over IOPS and throughput without over-provisioning storage capacity. Older, immutable indices were migrated to warm storage tiers, freeing up primary hot storage nodes solely for active ingestion and real-time query execution.
2. Sharding Strategy Optimisation
OpenSearch performance relies heavily on proper shard sizing. Unoptimized sharding leads to uneven load distribution, hotspotting, and excessive overhead:
-
Eliminating Over-Sharding: Epic audited their index creation strategy. Previously, smaller indices contained too many primary shards, causing unnecessary thread pool scheduling overhead.
-
Targeting Optimal Shard Sizes: The team standardized shard sizes for historical time-series data to fall within the optimal 30 GB to 50 GB range.
-
Index State Management (ISM): Epic implemented automated ISM policies to manage index rollover based on target conditions (size and document count) rather than fixed time intervals. This prevented index size skew during peak weekend events or low-traffic mid-week periods.
3. Data Mappings and Schema Slimming
One of the largest hidden drivers of memory consumption in OpenSearch is default dynamic mapping.
-
Explicit Schema Definitions: Epic replaced dynamic mapping with explicit, strict schemas. Fields that were never queried or aggregated were configured with
"index": false, preventing OpenSearch from wasting compute resources indexing unneeded tokens. -
String Optimisation (
keywordvs.text): High-cardinality telemetry attributes (such as session IDs or item identifiers) were explicitly mapped askeywordrather thantext, avoiding unnecessary tokenisation and inverted index overhead. -
Disabling Unused
doc_valuesandnorms: For fields where range queries or aggregations were not required,doc_valueswere disabled to save disk space and reduce disk I/O during writes.
4. Query Behavior and Aggregation Refactoring
To allow batch analytics jobs to run more frequently without overwhelming the cluster, the team refactored the underlying OpenSearch queries:
-
Leveraging Filter Context over Query Context: Queries were updated to use
bool.filterclauses instead of full-text match queries. Filter context skips scoring calculation overhead and enables OpenSearch to leverage its internal bitset cache for near-instant execution. -
Composite Aggregations for Large Datasets: To prevent memory limits from triggering during deep aggregations, the team replaced deep term aggregations with
compositeaggregations. This allowed analytical workers to paginate efficiently through huge result sets without exceeding heap boundaries. -
Pre-aggregating Data at Ingestion: Where applicable, streaming events were partially aggregated prior to ingestion, reducing the raw document count that required real-time bucket calculation.
Key Results and Performance Impact
By executing this joint tuning plan, Epic Games achieved dramatic performance and efficiency gains:
| Metric / Dimension | Before Optimization | After Optimization | Impact |
| Batch Query Frequency | Constrained (Hourly/Infrequent) | High Frequency (Near Real-Time) | Fresher Insights for Live Ops |
| Query Latency | High variance, frequent CPU spikes | Low, predictable latency | Faster Execution & Stability |
| Cluster Scaling Needs | Over-provisioned to absorb spikes | Right-sized compute footprint | Significant Cost Reduction |
| Hardware Efficiency | High CPU & Garbage Collection pressure | Balanced CPU & memory allocation | Higher Resource Utilization |
Architectural Blueprint for Game Analytics at Scale
Epic Games’ work on Amazon OpenSearch Service provides valuable lessons for game developers managing high-volume telemetry:
-
Decouple Storage and Compute: Leverage modern storage tiers like GP3 and warm storage to keep hot cluster memory focused entirely on real-time needs.
-
Schema Control is Essential: Never rely on default dynamic mappings for high-scale event telemetry. Explicit schema design yields massive memory and storage savings.
-
Align Shards with Query Patterns: Right-size shards between 30 GB and 50 GB to maximize read/write parallelism without overloading node coordination pools.
-
Optimise Queries for Filter Caching: Use filter context and composite paginated aggregations to maintain fast response times during complex analytical jobs.
Through systematic infrastructure tuning, Epic Games successfully optimised their OpenSearch Service deployment. As a result, the Fortnite engineering team can process billions of telemetry events faster, operate at lower costs, and deliver an ever-improving experience to millions of players around the world.