Technology

Uber's Zone Failure Resilience for OpenSearch

Uber details how Zone Failure Resilience (ZFR) for OpenSearch is achieved using isolation groups and forced shard allocation awareness to maintain stability during zone outages.

StartupHub.ai Staff

By StartupHub.ai Staff, reviewed by Daniel Singer, Editor

4 min read

Diagram illustrating Uber's Zone Failure Resilience strategy for OpenSearch clusters.
An illustration of Uber's approach to ensuring OpenSearch availability during zone failures.Credit: Uber Engineering
Visual TL;DR
Zone FailuresDriver
availability zones going offline impacting core functions
From the article 9+ mentionsUber has detailed its strategy for achieving Zone Failure Resilience (ZFR) in its OpenSearch deployments, a critical requirement for its distributed systems resilience.
Isolation GroupsCore
logical partitioning distributing nodes across failure domains
From the article 9+ mentionsIsolation groups act as a logical partitioning mechanism.
Shard Allocation AwarenessCore
native OpenSearch feature for distributing shards across nodes
From the article 4 mentionsOpenSearch's shard allocation awareness allows for the even distribution of shard copies across logical groupings of nodes.
Forced Allocation AwarenessCore
ensures stability by enforcing shard placement rules
From the article 4 mentionsTo counter this, Uber employs forced shard allocation awareness.
Odin OrchestrationCore
From the articleThis system is underpinned by Odin, Uber's container orchestration platform, which is also a key component in achieving similar stability goals for other services.
OpenSearch Resilience GoalEffect
ensure querying and data ingestion remain operational during outages
From the article 3 mentionsThis resilience is built by integrating OpenSearch's native shard allocation awareness features with Uber's proprietary isolation group infrastructure.
Zone Failure ResilienceEffect
Uber's strategy for maintaining OpenSearch uptime
From the article 9 mentionsUber has detailed its strategy for achieving Zone Failure Resilience (ZFR) in its OpenSearch deployments, a critical requirement for its distributed systems resilience.
Stable OperationsOutcome
core functions remain operational even with zone outages
From the article 3 mentionsIt ensures Uber's search and analytics infrastructure remains stable, performant, and available, even under severe failure conditions like a zone plus one node failure.
Contents(4)

Uber has detailed its strategy for achieving Zone Failure Resilience (ZFR) in its OpenSearch deployments, a critical requirement for its distributed systems resilience. The goal is to ensure that core functions like querying and data ingestion remain operational even if an entire availability zone goes offline.

This resilience is built by integrating OpenSearch's native shard allocation awareness features with Uber's proprietary isolation group infrastructure. This system is underpinned by Odin, Uber's container orchestration platform, which is also a key component in achieving similar stability goals for other services.

Understanding Isolation Groups

Isolation groups act as a logical partitioning mechanism. They ensure that nodes within an OpenSearch cluster are distributed evenly across different failure domains, such as zones or racks. This prevents a single zone failure from disproportionately impacting the cluster.

A core principle is failure domain awareness, where isolation groups map directly to physical failure domains. This ensures that multiple isolation groups do not share the same zone without incurring scheduling penalties. Role-level balancing further guarantees that critical node roles are not concentrated in a single domain.

Stable group membership is also crucial. A node and its replacement are guaranteed to belong to the same isolation group, maintaining consistent shard placement semantics. Uber typically utilizes three isolation groups, meaning a single zone failure affects at most approximately 33% of the cluster's capacity.

Shard Allocation Awareness

OpenSearch's shard allocation awareness allows for the even distribution of shard copies across logical groupings of nodes. This is configured by defining custom node attributes and enabling awareness at the cluster level. For instance, with 5 total shard copies (1 primary, 4 replicas), OpenSearch distributes them across 3 isolation groups as 2, 2, and 1, ensuring the difference between any two groups never exceeds one copy.

However, this relies on a balanced pool of nodes. Uneven distribution can lead to unassigned shards. Therefore, even node distribution across isolation groups is a prerequisite for this system to function effectively.

Forced Shard Allocation Awareness for Stability

During a zone failure, OpenSearch's default behavior of aggressive shard rebalancing across remaining zones can destabilize the cluster. To counter this, Uber employs forced shard allocation awareness. The cluster is configured with the full set of expected attribute values.

When a zone fails and its associated isolation group disappears, OpenSearch recognizes the missing attribute values and refrains from over-allocating shards onto the remaining groups. Shards from the failed group remain unassigned, typically transitioning the cluster to a yellow state instead of triggering a cascade of rebalancing operations. This protects the surviving zones from excessive load, maintaining stability and performance.

This approach trades immediate full replication for cluster stability during failure events. Unassigned shards are only reallocated when the failed zone recovers or an administrator manually updates the configuration.

Resilience Against Zone and Node Failures

The most critical scenario involves a zone failure followed by an additional node failure. For data nodes, Uber ensures at least 3 copies of each shard are distributed across 3 isolation groups. A zone failure removes one group and one copy, and a subsequent node failure may remove a second copy, leaving the third available in the remaining group.

Cluster manager node resilience is handled by running 5 nodes instead of the typical 3. If a zone failure removes up to two cluster manager nodes, the cluster automatically shrinks its voting configuration to the remaining three nodes. A new primary leader is elected, and even if another node fails, the remaining two provide sufficient quorum for continued operation. This is vital for maintaining the availability required for disaster recovery for databases.

Uber's implementation of isolation groups has resolved previous issues where uneven node counts in physical zones led to yellow cluster states. By ensuring an equal number of nodes per isolation group, Uber guarantees 100% shard assignment and a green cluster health, eliminating disk skew and hot nodes caused by physical zone asymmetry.

This architecture, combining isolation groups for physical placement and shard allocation awareness for logical placement, decouples OpenSearch's resilience from the complexities of physical data center topology. It ensures Uber's search and analytics infrastructure remains stable, performant, and available, even under severe failure conditions like a zone plus one node failure.

Mentioned in this story

Markets

TopicsOpenSearchUberZone Failure ResilienceDistributed SystemsHigh AvailabilityContainer Orchestrationcloud infrastructureBackend Engineering

StartupHub.ai StaffDaniel SingerWritten by StartupHub.ai Staff, Editorial teamReviewed by Daniel Singer, EditorAbout

StartupHub.ai Staff, Editorial team

The staff writers of StartupHub.ai, ranging from investment analysts to avid AI tool users, early adopters and critical enthusiasts. Backgrounds span engineering, business and the arts. We hold every piece to rigorous standards of research and review.

Daniel Singer, Editor

Daniel Singer is an AI expert who has been writing about, covering and building AI technology since 2018.

More from Daniel Singer

Get the free daily brief every morning

Every morning the day's AI news, new AI startups and new funding rounds. Free and takes a few minutes to read, unsubscribe at any time.

Join 64,000 other subscribers.

Test your Agent Readiness now

Paste your website. How well ChatGPT, Claude and the other agents can read and use a site, in about a minute.

The videos behind the news, one flip at a time

The feed mixes the videos from our articles with startup demos and you flip through them like TV channels for free with no signup.