AWS Builder Center

Migrating a 120 TiB Elasticsearch 7.17 cluster to Amazon OpenSearch Service, Part 1: Discovery and sizing

In this post, you learn how to derive daily ingest and peak load from an existing Elasticsearch 7.17 cluster, and how to turn those numbers into a right-sized Amazon OpenSearch Service domain with hot and writable warm tiers.

 OpenSearch  is an open-source software suite for search, analytics, security monitoring, and observability applications, licensed under the Apache License V2.0.  Amazon OpenSearch Service  is a fully managed service that makes it easy to deploy, scale, and operate OpenSearch in the AWS Cloud. Log analytics is one of the three primary workloads for OpenSearch Service. Teams that run self-managed Elasticsearch 7.17 for log and telemetry data on Amazon Elastic Compute Cloud (Amazon EC2) are moving to OpenSearch Service for tiered storage backed by Amazon Simple Storage Service (Amazon S3), managed operations, and a current OpenSearch engine.
I recently worked with a customer on exactly this move, and two questions came up at the start: what should the new domain look like, and how do you move to the new domain without dropping data or taking an outage? This two-part series answers both questions for a fictional customer, Acme Corp. This post, Part 1, covers discovery and sizing. Part 2 (coming soon) covers deploying Migration Assistant for Amazon OpenSearch Service and running a zero-downtime migration. The sizing method applies to most time-series workloads on Elasticsearch 7.x.

Acme Corp's Elasticsearch 7.17 cluster and requirements

Acme runs a software-as-a-service (SaaS) platform and indexes the platform's logs into Elasticsearch. Each document is an application log line, an access log entry, or an audit record. Acme runs the cluster on Amazon EC2 with the following footprint.
Attribute
Value
Engine
Elasticsearch 7.17, self-managed on Amazon EC2
Data nodes
33 hot (i3en.2xlarge, NVMe SSD) and 16 warm (d3.xlarge, HDD)
Other nodes
3 dedicated masters, 2 coordinators
Documents
~180 billion
Primary data
~59 TiB (~117 TiB with 1 replica)
Retention
181 days
Automated snapshots
None
Acme writes to three daily index families. Acme manages the index families with two Index Lifecycle Management (ILM) policies, the Elasticsearch feature that moves indices between tiers and deletes indices by age.
Index family
Share of ingest
ILM policy today
 app-logs-* 
~42%
Hot for 2 days, warm until day 181, then delete
 access-logs-*  and  audit-logs-* 
~58%
Hot for all 181 days, then delete
Acme has three requirements. Acme must keep 181-day retention, keep ingest running throughout the migration, and reduce the operational effort of running the cluster.

Collecting sizing inputs from the source cluster

Sizing starts with four numbers: how much data the cluster stores, how much data arrives each day, how fast data arrives at peak, and how far back users query. Most of these numbers come from a handful of read-only API calls against the source cluster. The following calls are safe to run on a production Elasticsearch 7.17 cluster.
GET _cat/nodes?v&h=name,node.role,disk.used,disk.total,heap.max
GET _cat/allocation?v
GET _cat/indices/*-logs-*?v&bytes=gb&s=index
GET _ilm/policy
GET _nodes/stats/indices/indexing
The  _cat/allocation  and  _cat/nodes  output gives disk used per tier, and  GET _ilm/policy  tells you how long each index family stays on each tier. The  _cat/indices  output gives document counts and primary store size per index, which confirms the split between index families. The  _nodes/stats/indices/indexing  output gives cumulative indexing counters. Sample the indexing counters twice, a few minutes apart, to get a measured indexing rate. Query patterns don't come from an API, so ask the teams that use the cluster how far back they search, or read the time range from saved dashboards.
Acme's team had disk usage and ILM policies but no indexing-rate history, which is common. The next two sections show how to reconstruct daily ingest and peak load from the data you probably already have.

Deriving daily ingest from disk usage and ILM policies

You can reconstruct the daily ingest rate from per-tier disk usage and the ILM policies. Acme's warm tier holds only  app-logs-*  data for 179 days, so the warm tier gives the application log rate directly. Acme's hot tier holds 2 days of application logs plus all 181 days of access and audit logs, so the remainder of hot disk usage gives the access and audit log rate. Both tiers store 2 copies of each shard because Acme runs 1 replica.
Step
Calculation
Result
Hot disk used
Measured ( _cat/allocation )
73.9 TiB
Warm disk used
Measured ( _cat/allocation )
52.8 TiB
App logs per day (warm tier only)
52.8 TiB ÷ 2 copies ÷ 179 days
≈ 151 GiB/day
App logs still on hot (2 days)
151 GiB × 2 days × 2 copies
≈ 0.6 TiB
Access + audit logs per day
(73.9 − 0.6) TiB ÷ 2 copies ÷ 181 days
≈ 207 GiB/day
Total daily ingest (disk basis)
151 + 207 GiB/day
≈ 358 GiB/day
Cross-check (primary store)
58.7 TiB ÷ 181 days
≈ 332 GiB/day
The disk-based figure runs about 7% high because disk usage includes translog, in-flight merges, and other non-index files. Acme plans for about 340 GiB of primary (indexed) data per day, which is roughly 1 billion documents per day. The tier math also surprised Acme's team. The team believed  app-logs-*  was the largest index family, but access and audit logs together are larger. Confirm the split with  GET _cat/indices  for each index pattern before you size anything.

Estimating peak ingest from write IOPS

Average throughput doesn't size a cluster; peak throughput does. Acme had no indexing-rate metrics, so Acme used the peak-to-average ratio of the Amazon CloudWatch  DiskWriteOps  metric (write input/output operations per second, or IOPS) across the hot nodes as a proxy.
Step
Calculation
Result
Peak / average hot write IOPS
32,042 ÷ 6,277
≈ 5.1×
Average documents per second
180 billion ÷ 181 d ÷ 86,400 s
≈ 11,500
Peak documents per second
11,500 × 5.1
≈ 59,000
Treat 59,000 documents per second as an estimate. The CloudWatch datapoints are hourly, so the hourly averages hide shorter bursts, and write IOPS also counts merge and translog writes. Replace the estimate with the measured rate from  GET _nodes/stats/indices/indexing  as soon as you can collect it.

Moving aged data to a writable warm tier before choosing hardware

The tiering decision shapes the domain more than any hardware decision does. Acme runs 33 hot nodes to hold storage, not to supply compute, because 181 days of access and audit logs sit on NVMe SSD even though most queries target recent data.  Multi-tier storage  in OpenSearch Service, available on OpenSearch 3.3 and later, adds a warm tier built on OpenSearch optimized OI2 instances. OI2 warm nodes keep index data in Amazon S3 and use local NVMe storage as a cache. Unlike UltraWarm, which holds read-only indices, the OI2 warm tier is writable, so late-arriving events and occasional updates can still reach an index after the index moves to warm.
Multi-tier storage pairs OR1, OR2, OM2, or OI2 hot nodes with OI2 warm nodes. A domain uses either multi-tier storage or UltraWarm, not both, and multi-tier storage doesn't offer a cold tier. Acme doesn't need a cold tier, because Acme deletes every index at 181 days.
Acme replaces the ILM policies with Index State Management (ISM) policies, the OpenSearch equivalent of ILM. The new policy for access and audit logs moves indices to the warm tier at 14 days instead of keeping the indices on hot for 181 days. The  app-logs-*  policy keeps the existing 2-day hot window.
PUT _plugins/_ism/policies/access-audit-logs
{
"policy": {
"description": "Hot 14 days, warm until 181 days, then delete",
"default_state": "hot",
"states": [
{ "name": "hot", "actions": [],
"transitions": [{ "state_name": "warm", "conditions": { "min_index_age": "14d" } }] },
{ "name": "warm", "actions": [{ "warm_migration": {} }],
"transitions": [{ "state_name": "delete", "conditions": { "min_index_age": "181d" } }] },
{ "name": "delete", "actions": [{ "delete": {} }], "transitions": [] }
],
"ism_template": [{ "index_patterns": ["access-logs-*", "audit-logs-*"], "priority": 100 }]
}
}
With the 14-day window, the hot tier holds about 3 TiB of primary data instead of about 33 TiB. Confirm how far back your users actually query before you adopt a 14-day window. If users regularly search 30-day-old access logs, a 14-day hot window adds warm-tier latency to those searches, so set the hot window from real query patterns.
Multi-tier domains accept the  _tier  APIs (for example,  POST <index>/_tier/warm ) and the legacy UltraWarm APIs, and the preceding policy uses the ISM  warm_migration  action. Test the policy on a multi-tier domain before you roll it out. A move to the OI2 warm tier doesn't force merge the index, which keeps migrations fast, so add a  force_merge  action to the policy if you want fewer segments on warm indices.

Deploying the domain across three Availability Zones

Acme deploys the domain across three Availability Zones (AZs) with  Multi-AZ without Standby , which provides 99.9% availability. OpenSearch Service distributes primary and replica shards across different AZs, so each index needs at least 1 replica. Acme keeps its existing 1 replica, which means 2 copies of every hot shard, and all hot nodes index and serve searches during normal operation.
The three-AZ layout drives two sizing choices. Acme uses node counts that are a multiple of three for both tiers, so each AZ holds the same hot and warm capacity and shards balance evenly. Acme also sizes for the loss of one AZ. When an AZ fails, two-thirds of the hot nodes carry the full indexing load while OpenSearch Service replaces the lost nodes and rebuilds replicas, so the hot tier needs headroom for that state as well as for normal operation.

Sizing the hot tier for indexing compute

With most data on the warm tier, indexing compute sets the size of the hot tier, and storage becomes a check rather than the constraint. Acme chose OR2 instances, which use segment replication with remote-backed storage in Amazon S3. With segment replication, replica shards copy finished segments from the primary shards instead of re-indexing every document. All the virtual CPUs (vCPUs) in the hot tier therefore work on primary indexing, which fits a workload that writes about 4 times as often as it reads.
Step
Calculation
Result
Hot primary
14 days × ~200 GiB + 2 days × ~145 GiB
≈ 3.0 TiB
On disk
3.0 TiB × 2 copies (1 replica)
≈ 6.0 TiB
Provisioned
9 nodes × 1.36 TiB Amazon EBS
= 12.2 TiB (~50% full)
Each or2.2xlarge.search node supports up to 6 TiB of Amazon Elastic Block Store (Amazon EBS) storage, so 1.36 TiB per node leaves room to grow the volumes later without changing instance type. The 50% fill level also leaves space for the migration backfill, which Part 2 covers.
The following table compares the estimated indexing capacity of the hot tier with Acme's 59,000 documents-per-second peak. The estimate assumes 2,000–3,000 documents per second per vCPU at about 70% CPU for small documents (about 360 bytes on disk). That figure is a planning heuristic, not a published OR2 benchmark.
Domain state
Hot data nodes
vCPUs
Estimated capacity
Headroom over 59,000 docs/s
All AZs healthy
9
72
145,000–215,000 docs/s
2.4–3.7×
One AZ lost
6
48
95,000–145,000 docs/s
1.6–2.4×
Your mileage will vary. Ingest processors that run on the domain, wide mappings, and heavy search load on the hot tier all reduce indexing throughput. The one-AZ-lost row matters most. At 1.6× on the low end, the domain still absorbs the peak, but shard recovery after the failure competes with indexing for the same nodes. If the staging validation in the next section lands near the low end, add one node per AZ (12 nodes) before you add anything else.

Sizing the OI2 warm tier for addressable storage

Warm-tier sizing depends on addressable storage. Each OI2 warm node uses 80% of its local NVMe storage as cache and can address 5 times the cache size, so an oi2.xlarge.search node, with a 750 GB cache, addresses 3,750 GB. Acme keeps application logs on warm from day 2 to day 181, and access and audit logs from day 14 to day 181.
Step
Calculation
Result
App logs, days 2–181
179 days × ~145 GiB
≈ 25 TiB
Access + audit, days 14–181
167 days × ~200 GiB
≈ 33 TiB
Warm primary data
—
≈ 56–60 TiB
Step
Calculation
Result
Addressable
18 nodes × 3,750 GB
= 67,500 GB
Warm data
56–60 TiB
≈ 61,600–66,000 GB
Headroom
—
≈ 2–10%
Acme provisions 18 oi2.xlarge.search warm nodes, 6 per AZ. Eighteen is the smallest multiple of three that covers the warm data and keeps the warm tier balanced across AZs, but 2–10% headroom leaves little room for growth. Acme watches warm storage use and adds warm nodes 3 at a time, one per AZ, as daily volume grows. Acme sized the warm tier on primary data. On warm indices, searches go to the primary shard, and a replica serves reads only when the primary is unavailable. Confirm how replicas count against addressable storage for your domain configuration before you finalize the warm node count.

Validating the hot tier in a staging environment

The per-vCPU figure in the capacity table is a heuristic, so Acme validated the hot tier with its own workload before any migration work started. Acme stood up a staging OpenSearch Service domain with the same instance types, node counts, AZ layout, mappings, and ingest pipelines as the planned production domain. Acme then sent production-shaped ingest from its own pipeline to the staging domain at and above the 59,000 documents-per-second peak, alongside the dashboard queries that analysts run every day.
Staging validation with real traffic catches what a synthetic test can miss: ingest pipeline cost, mapping width, client batch sizes, and the mix of searches that compete with indexing. While the test runs, watch  CPUUtilization ,  IndexingLatency , and  ThreadpoolWriteRejected  in Amazon CloudWatch. A useful pass criterion is to sustain the peak with no write rejections at no more than 75% CPU. To cover the loss of one AZ, repeat the test at two-thirds of the node count, or confirm that the 9-node result leaves enough margin to absorb the peak on 6 nodes. If you don't have a staging pipeline,  OpenSearch Benchmark  with a custom workload built from sampled production documents is an alternative.
Keep the staging domain after the test, because Part 2 uses the same domain as the pilot target for Migration Assistant.

The resulting OpenSearch Service domain

The following table summarizes the domain. Fixing the ILM gap let Acme size the hot tier for compute instead of storage, and that one decision accounts for most of the reduction in nodes and provisioned disk.
Role
Instance type
Count
Layout
Dedicated cluster manager
m8g.xlarge.search
3
1 per AZ
Hot data
or2.2xlarge.search
9
3 per AZ, 1.36 TiB EBS each plus remote storage in Amazon S3
Warm (multi-tier storage)
oi2.xlarge.search
18
6 per AZ, 67,500 GB addressable
Acme moves from 49 self-managed data nodes with 230 TiB of provisioned disk to 27 data nodes with 12.2 TiB of hot EBS storage and the rest in Amazon S3. At list prices, the new domain costs approximately 60% less per month than the Amazon EC2 instances that run the current cluster, before counting the operational effort that OpenSearch Service takes over. Estimate costs for your own Region and pricing model with the  AWS Pricing Calculator .

Conclusion

In this post, you collected sizing inputs from an Elasticsearch 7.17 cluster and derived daily ingest and peak load from disk usage, ILM policies, and CloudWatch metrics. You then sized an OpenSearch Service domain by moving aged data to an OI2 writable warm tier, deploying across three AZs, and sizing the hot tier for indexing compute. For Acme, the largest gain came from the tiering decision: about 95% of the retained data moved off the hot tier.
In Part 2 (coming soon), you deploy Migration Assistant for Amazon OpenSearch Service on Amazon Elastic Kubernetes Service (Amazon EKS) and move Acme's 180 billion documents to this domain without stopping ingest. For more information, see  Sizing Amazon OpenSearch Service domains ,  Multi-tier storage for Amazon OpenSearch Service , and  Index State Management in Amazon OpenSearch Service .
Acme Corp is a fictional company. The numbers in this post come from a representative workload and are illustrative. Validate sizing and costs against your own data.

About the Author

Jagadish Kumar (Jag) is a Senior Solutions Architect at Amazon Web Services, focused on Amazon OpenSearch Service.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article