Index lifecycle management runs per cluster, and cross-cluster replication copies indices, not policies. Here are the six seams where they collide in a two-site design.
We ran an ILM proof of concept a few months after the CCR one. Most of what we learned wasn't about ILM itself. It was about the seams between ILM and replication.
ILM in one paragraph
ILM moves time-series indices through phases (hot, warm, cold, frozen, delete) and runs actions in each: rollover, shrink, force merge, allocate, searchable snapshot, delete. How data reaches the right nodes changed over the 7.x line. Early 7.x used custom node attributes (box_type: hot), while 7.10 and later use data-tier node roles (data_hot, data_warm, data_cold) and _tier_preference. Newer versions add a frozen tier backed by searchable snapshots, plus downsampling for metrics. If you move from 7.x to 8.x, rewrite any attribute-based allocation in your policies.
Seam 1: policy names travel, policies don't
CCR copies the index.lifecycle.name setting from the leader to the follower, but it doesn't replicate the policy definition. Define a policy with the same name on both clusters, or every replicated index hits ILM errors on the follower side. Treat ILM policies as code applied to both clusters.
Seam 2: deleting an index never replicates
CCR replicates document deletes, but deleting a leader index doesn't delete its follower. Retention has to run on both clusters. If East keeps 13 months and West keeps 18, the same query returns different answers depending on which site you ask. Keep retention identical, and make any site-specific exception explicit and documented.
Seam 3: followers can't roll over
A follower is read-only, so it can't roll over or shrink itself. Elastic's docs describe how ILM coordinates rollover and unfollow for auto-followed indices: the follower waits for the leader to finish with an index, then unfollows before actions that need a writable index. After that, the follower is a regular index and no longer replicates. That is fine for a closed month, but remember it when you debug why a later change didn't arrive. Verify the exact behavior on your version.
Seam 4: calendar months
ILM rollover triggers on age, size or document count, never on the calendar. max_age: 30d drifts away from month boundaries. Date math index names, such as <orders_east-{now/M{yyyy.MM}}-000001>, stamp the time the index was created, not the month of the data in it. Two ways out:
- An external scheduler that calls
_rolloverat midnight UTC on the first of the month. - Monthly indices named by the app or an ingest pipeline (Part 4), with ILM used only for the delete phase.
Seam 5: ILM ages by creation date, not by name
ILM measures an index's age from its creation or rollover date, not from the date in its name. An index backfilled or migrated today for a month two years ago looks brand new, and it survives well past its retention. When you load historical indices, set index.lifecycle.origination_date, or have ILM parse the date from the index name. This matters most during migrations (Part 8).
Seam 6: template patterns that reach too far
Don't attach an ILM policy through a template whose pattern also matches long-lived single indices or system indices. A delete phase on the wrong pattern deletes the wrong things, on each cluster where the template exists. Scope ILM templates to time-series families only.
ILM versus ISM, if you might land on OpenSearch
OpenSearch's Index State Management (ISM) follows the same idea with a different API and policy syntax, and it interacts differently with OpenSearch's own replication. Don't port policies mechanically. Re-test rollover and replication together on the target platform.
The ILM APIs we lived in
GET /orders_east_202311/_ilm/explain # where is this index, and why is it stuck? POST /orders_east_202311/_ilm/retry # retry after fixing the cause GET /_ilm/status POST /_ilm/stop POST /_ilm/start Risks and precautions
- A policy missing on the follower cluster means ILM errors on every replicated index.
- Mismatched retention means each site answers the same question differently.
- A broad template pattern plus a delete phase means data loss.
- Backfilled indices escape retention unless you set their origination date.
- A short
indices.lifecycle.poll_intervalbelongs in test only.
Part 5 of 8 in Elasticsearch Replication & DR Field Notes . Previous: Part 4, Alias or Index Pattern? Next: Part 6, What CCR Won't Copy.


