Services

Resources

Company

OpenSearch

OpenSearch is an open-source search and analytics engine. It stores JSON documents in an index, builds an inverted index over their text, and answers full-text searches and aggregations in milliseconds. Teams use it for product search, log analytics and dashboards. It is licensed under Apache 2.0 and started as a fork of Elasticsearch 7.10.2.

How it works

An index is split into shards, and each shard is a Lucene index with zero or more replicas spread across data nodes. A search fans out to one copy of every shard, each shard returns its best matches, and the coordinating node merges them into one result.

For example, an index of 30 million products with 6 primary shards and 1 replica has 12 shards on the cluster. A search for "red sneakers" runs on 6 of them in parallel. A 30-day aggregation for a finance report hits the same shards, so one heavy report can slow every product search. OpenSearch Workload Management lets you put the two kinds of query in separate workload groups with their own CPU and memory limits.

Why it matters in production

Most OpenSearch incidents are capacity incidents: too many shards per node, heavy aggregations next to latency-sensitive search, or JVM heap pressure. Size shards (a common target is 10 to 50 GB each), separate workloads, and watch search latency at p99, not the average.

See also

On the One2N blog

References

  1. OpenSearch documentation

  2. OpenSearch FAQ

Comic about OpenSearch: on sale day one cluster runs shopper search and a 30-day sales report, and search p99 hits 2.4 s; workload groups tag each request, giving search 70% CPU and 60% memory and reports 30% CPU and 20% memory; with reports capped at 30% CPU, search p99 drops to 180 ms and the report goes from 90 s to 4 min, marked as example numbers, not a benchmark.