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:
- Backfill — pins Lucene segments via
Engine.Searcherand bulk-copies all documents to the target index. - 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.
- Converge — repeats replay until each shard is within a configurable gap (default: 500 ops).
- 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¶
- sources/2026-07-24-atlassian-online-index-migration-and-shard-scaling-in-opensearch-with-aosc — design, architecture, and production experience at Atlassian scale (300+ clusters, 1.7 PB)
(Source: sources/2026-07-24-atlassian-online-index-migration-and-shard-scaling-in-opensearch-with-aosc)