Skip to content

SYSTEM Cited by 1 source

OpenSearch AOSC

AOSC (Atlassian OpenSearch Shard Control) is an open-source OpenSearch plugin that performs zero-downtime index reshaping — changing shard counts, modifying field mappings, extracting tenants, or removing unused fields — without requiring application-level dual-writes or index downtime.

How It Works

AOSC applies database-style CDC to OpenSearch internals:

  1. Backfill — pins Lucene segments via Engine.Searcher and bulk-copies all documents to the target index.
  2. Replay — uses retention leases + the Lucene changes snapshot (an operation-level changelog per shard) to replay writes that landed on the source during and after backfill.
  3. Converge — repeats replay until each shard is within a configurable gap (default: 500 ops).
  4. Cutover — applies a brief write-block, does a final replay, validates doc counts, and atomically swaps the index alias.

Architecture

Two coordination roles:

  • AoscCoordinatorService (cluster-manager node) — orchestrates migration lifecycle, tracks global convergence, triggers write-block and alias swap. Communicates state changes to data nodes via cluster state.
  • AoscShardService (each data node) — spawns per-shard ShardMigrationWorkers that do backfill/replay locally. Reports progress to coordinator via transport actions.

Overload Protection

AOSC is designed to run on live production clusters without degrading search latency:

  • Transient target settings (0 replicas, no refresh) during backfill
  • Max 1 concurrent source shard backfill per node (production default)
  • Pluggable rate controllers: fixed, adaptive batch (AIMD), or Gradient2-tuned adaptive
  • Exponential backoff with jitter on overload/admission-control rejections

Limitations

  • Non-power-of-2 shard changes with custom routing keys unsupported (pending OpenSearch#20907)
  • Applications must retry write-block errors during cutover
  • Designed for OpenSearch only (not Elasticsearch)

Seen In

(Source: sources/2026-07-24-atlassian-online-index-migration-and-shard-scaling-in-opensearch-with-aosc)

Last updated · 596 distilled / 1,814 read