Hot-Warm-Cold Architecture in Elasticsearch
Learn how Elasticsearch keeps fresh data on fast, expensive machines and pushes older data onto slower, cheaper ones, so you get speed where it matters and savings everywhere else.
Imagine you work in a very busy office. The papers you are using today lie on your desk, because you grab them every few minutes. Last month’s papers sit in a filing cabinet next to you, because you need them now and then. Last year’s papers go to the basement, and papers from ten years ago live in a rented warehouse across town. Nobody puts ten-year-old papers on their desk, and nobody keeps today’s urgent paper in a distant warehouse. Elasticsearch has the same problem with data, and the Hot-Warm-Cold architecture is the tidy office system that solves it.
1The Problem: Data Grows, Budgets Do Not
Before learning the solution, it helps to feel the pain that created it.
Why time-based data is special
Many of the biggest Elasticsearch clusters in the world do not store product catalogs or user profiles. They store logs, metrics, security events, traces and clickstreams. This kind of data has a strong feature: it arrives constantly, every record has a timestamp, and old records almost never change. A web server writes a log line, and that line will never be edited again. It is only added, searched, and eventually deleted.
Because the data keeps arriving, the total size only goes up. A company that produces 200 gigabytes of logs a day holds about 6 terabytes after a month and more than 70 terabytes after a year. If every single byte lives on the fastest and priciest disks, the bill grows without limit.
Who actually reads old data?
When something breaks in production, people look at the last few minutes or hours. Dashboards refresh over the last 15 minutes. Alerts check the last five minutes. Only occasionally does someone ask what happened three months ago, perhaps during an audit, a security investigation, or a yearly comparison. So the newest data is read very often, and the oldest data is read very rarely.
That uneven reading pattern is the key insight. If some data is hit thousands of times more than other data, it makes no sense to give both the same expensive hardware. Treating all data equally means either you overspend on old data or you starve the new data of speed.
Think of a restaurant kitchen. The salt, oil and knives you use every minute stay on the counter. Ingredients for tomorrow sit in the fridge. Bulk sacks of rice sit in a storeroom. You would never haul a sack of rice to the counter for each meal, and you would never lock the salt in a storeroom. Each item goes where its usage pattern says it should go.
Hot-Warm-Cold is not a product you install. It is a way of arranging the machines in a cluster and moving data between them as it ages, so cost follows value.
2Elasticsearch Basics You Need First
A few building blocks appear in every later chapter, so let us define them once, plainly.
Cluster
A group of Elasticsearch servers working together as one system. You talk to the cluster, not to a single machine.
Node
One running Elasticsearch process, usually on its own server. Each node is given jobs called roles.
Document
One record of data, such as a single log line or a single order. It is stored as JSON.
Index
A named collection of related documents, like a folder that holds many similar records.
Shard
A slice of an index. An index is cut into shards so the pieces can live on different nodes and be searched in parallel.
Replica
A spare copy of a shard placed on a different node, so data survives when a machine fails and searches can be shared.
Segment
Inside a shard, data is written into small immutable files called segments. Fewer, larger segments are cheaper to search.
Data Stream
A named handle for time-based data that hides a growing series of hidden backing indices behind one name.
Why shards matter so much for tiers
The unit that moves between hot, warm and cold machines is the shard. Elasticsearch never moves a single document. It moves whole shards from one node to another. Every decision in this tutorial, from sizing to lifecycle timing, comes back to how many shards you have, how big they are, and where they currently sit.
An index is a big book. Shards are chapters of that book, and each chapter can be stored in a different room. Replicas are photocopies of chapters kept in other rooms in case one room floods. Moving between tiers means carrying chapters, and their photocopies, from one room to another.
Why old indices become read-only in spirit
Because time-based data is append-only, once a day or a size limit has passed, Elasticsearch stops writing into that index and starts a fresh one. The old index is now effectively frozen in content, which makes it a perfect candidate to be squeezed, compressed, moved and protected. Without this natural break, tiering would be much harder.
3The Big Idea: Tiers of Storage
A tier is simply a group of nodes with similar hardware, chosen for how often their data is used.
In a Hot-Warm-Cold architecture, you divide your cluster into groups of nodes. Each group has different hardware and a different purpose. New data lands on the first group. As time passes, Elasticsearch relocates it to the next group, then the next, until it is finally deleted or kept only as a cheap backup. The whole system is a conveyor belt that runs from expensive and fast to cheap and slow.
flowchart LR
A["New data arrives"] --> B["Hot tier: fast disks, writes and frequent searches"]
B --> C["Warm tier: fewer writes, still searched"]
C --> D["Cold tier: rare searches, cheaper storage"]
D --> E["Frozen tier: object storage, slowest and cheapest"]
E --> F["Delete when retention ends"]
The tiers at a glance
| Tier | Typical Age | Main Job | Hardware Style | Speed |
|---|---|---|---|---|
| Hot | Newest, hours to days | Receive writes, serve most searches | Fast SSD or NVMe, strong CPU, plenty of memory | Fastest |
| Warm | Days to weeks | Serve reads, no more writes | Good SSD or fast spinning disks, moderate CPU | Fast enough |
| Cold | Weeks to months | Keep data searchable for rare queries | Large, cheaper disks, low CPU | Slower |
| Frozen | Months to years | Keep huge volumes searchable at lowest cost | Small local cache plus object storage | Slowest |
There is also a fifth kind of data node called the content tier. It is for data that is not time-based, such as product catalogs, user records, or the internal system indices Elasticsearch keeps for itself. That data does not age out, so it stays put on the content tier and never joins the conveyor belt.
Think of a shipping company with an express lane, a standard lane, a slow boat, and a long-term warehouse. All four exist because different parcels have different urgency, and paying express rates for a parcel nobody is waiting for is just wasteful.
Many people believe the tiers are separate clusters. They are not. Hot, warm, cold and frozen nodes all belong to the same cluster and share the same cluster state, and one search request can cover shards on all of them at once.
4The Hot Tier: Where Data Is Born
The hot tier is the front door and the busiest room in the building.
What the hot tier does
Every new document enters through the hot tier. Hot nodes hold the shards that are being actively written to, and they also serve the majority of searches, because the newest data is what people look at most. This tier therefore carries two heavy workloads at the same time: constant indexing and constant querying.
Indexing is expensive. For each incoming document, Elasticsearch analyzes text, builds inverted indexes, writes to a transaction log for safety, and periodically flushes tiny segments to disk. Then background merges combine those small segments into bigger ones. All of this creates heavy disk writes and heavy CPU use.
Why hot nodes need strong hardware
Fast storage is the most important requirement. Solid-state drives, and ideally NVMe drives, keep both writing and searching quick. Hot nodes also want good CPU counts, because indexing and searching are both parallel work, and generous memory, because the operating system uses free memory to cache the files that searches read most often.
In practice, a hot node holds relatively little data per machine compared to other tiers. A common rule of thumb in Elastic’s own sizing guidance is that hot nodes work well with a memory-to-disk ratio around one gigabyte of memory for roughly thirty gigabytes of data, although your own workload should decide the real number.
The hot tier is a chef’s counter during dinner rush. It is small, expensive real estate, and everything on it is within arm’s reach because every second counts. You cannot afford to keep old boxes on that counter.
Heavy Writing
Every new document is analyzed, indexed and logged here first.
Frequent Reading
Dashboards and alerts mostly query the last minutes and hours.
SSD or NVMe
Low disk latency keeps indexing and searching from stalling.
Strong CPU and Memory
More cores and more cached file pages mean more work done at once.
What lives in the hot tier
Only the current write index of each data stream is actually being written to. Older indices that have already been rolled over may still sit on hot nodes for a short while, because they are still queried constantly. Usually you keep data hot for a few days up to a week or two, depending on how far back your typical dashboards look.
Choose the length of the hot phase by looking at your users, not by guessing. If 95 percent of searches cover the last seven days, seven days of hot storage is a strong starting point.
5The Warm Tier: Still Useful, No Longer Urgent
Warm data is like last month’s paperwork in the cabinet by your desk.
What changes when data turns warm
Once an index is rolled over and its writing stops, it no longer needs the heavy write capacity of hot nodes. It still receives searches, but far fewer than fresh data. Moving it to the warm tier frees the hot nodes to focus on the new incoming flow, which is the whole point of separating the tiers.
Because warm indices are no longer being written to, Elasticsearch can prepare them for a long and quiet life. It can shrink them into fewer shards, merge their segments into one big segment per shard, mark them read-only, and lower their priority for recovery after failures. Each of these steps saves space, memory or cost.
Warm-phase housekeeping
Move shards to warm nodes
Shards are copied to nodes that hold the warm role, then the old copies on hot nodes are removed.
Shrink the shard count
An index that was spread over many shards for fast writing can be reduced to fewer shards, since it no longer needs write parallelism.
Force merge segments
Many small segments are merged into far fewer large ones, making searches leaner and shrinking storage overhead.
Make the index read-only
Since no new writes are expected, the index is locked against accidental changes and becomes safer to manage.
Warm housekeeping is like packing a cabinet neatly. Loose sheets are stapled together, thin folders are combined into one thick folder, and the whole drawer gets a label saying “do not edit”. It takes a little effort once, and then it is easier to store and quicker to search for years.
Hardware for warm nodes
Warm nodes trade some speed for capacity. They still want decent storage, often SSD but sometimes high-quality spinning disks, and they hold much more data per node than hot ones. Elastic-style sizing advice often mentions a memory-to-disk ratio in the region of one to a hundred or more for this tier. Fewer CPU cores are needed, because there is almost no indexing work to do.
Running a force merge on an index that is still being written to. It wastes resources and produces segments that will need merging again. Only merge after the index has rolled over and stopped receiving writes.
6The Cold Tier: Rarely Read, Still Reachable
Cold data is the box in the basement: you know where it is and you can get it, but it is not a quick trip.
What the cold tier is for
Cold data is read only occasionally. Maybe an auditor asks for a quarter-old transaction trail, or a security analyst is investigating an intrusion that started months ago. The requirement is that the data still be searchable with the same tools, but nobody expects it to answer in milliseconds.
Cold nodes are built for low cost per stored gigabyte. They have large, cheaper disks and modest CPU, and a very high amount of data per node. Sizing guides often quote a memory-to-disk ratio in the hundreds to one for this tier. The trade-off is that searches over cold data are slower and can be more affected when many people query at the same time.
Saving money with fewer replicas
In a plain setup, cold indices still keep replica copies, which doubles their storage. Elasticsearch offers a smarter path: searchable snapshots. With this feature, a copy of the index is stored in a snapshot repository, which is cheap object storage or a shared file system, and the cold node mounts that snapshot as if it were a normal index. Because the durable copy already lives in the repository, the cluster can run with no replicas for that index and still recover if a node fails, by fetching the shard back from the snapshot.
The result is that the local storage needed drops to roughly half of a replicated setup. This is why many teams treat the cold tier as the place where a large bill turns into a modest one.
Fully mounted snapshot
The whole shard is copied onto the local disk of the cold node. Searches are quick because the data is local, while the repository acts as the safety copy. This is the mode normally used in the cold tier.
Regular replicated index
The index stays a normal index with replicas on cold nodes. It is simpler and needs no repository for the index itself, but it stores two full copies and so costs more. It suits teams without the required subscription level or who prefer simplicity.
Instead of keeping two paper copies of every old file in your basement, you keep one copy in the basement and a scanned backup in a secure cloud vault. If the basement floods, you rebuild the copy from the scan. You pay for one paper copy plus cheap scanning instead of two paper copies.
Searchable snapshots are a subscription feature. Ordinary hot, warm and cold tiers driven by lifecycle policies are available more broadly, but always check what your license level includes before you design around snapshots.
7The Frozen Tier and Searchable Snapshots
The frozen tier keeps almost nothing on local disks and reaches into cheap object storage only when a search demands it.
How frozen differs from cold
Cold nodes hold a full local copy of each shard. Frozen nodes do not. They use partially mounted searchable snapshots, which means the data stays in the snapshot repository, such as Amazon S3, Google Cloud Storage or Azure Blob Storage, and the node fetches only the pieces a search needs. Those pieces are kept in a local shared cache so repeated reads are quicker.
This changes the economics dramatically. A frozen node can look after far more data than its own disks could ever hold, because the disks only serve as a cache. Object storage is among the cheapest ways to keep bytes, so you can keep years of data searchable at a small fraction of the hot-tier price.
flowchart TD
U["Search request"] --> F["Frozen node"]
F --> C{"Needed data in local cache?"}
C -->|Yes| R["Answer quickly from cache"]
C -->|No| S["Fetch only needed pieces from object storage"]
S --> K["Store pieces in shared cache"]
K --> R
What you give up
Searches on frozen data can take seconds or even minutes for large ranges, because network fetches are slower than local disk reads. The tier works best when searches are narrow, for example a small time window or a specific filter, because Elasticsearch can skip whole shards whose time range cannot match. It is also friendly to asynchronous searches, where you submit a request and collect the result a little later.
Frozen is like a big rented warehouse with a small reading room. When you ask for a box, a courier brings only the pages you need to the reading room and leaves them on the table for a while, in case you ask again. You never bring the whole warehouse home.
Advantages
- Lowest cost per searchable gigabyte
- Keeps years of data searchable in the same interface
- Durability comes from the repository copy
- Small local footprint per terabyte stored
- Scales retention without scaling servers proportionally
Disadvantages / Trade-offs
- Searches are noticeably slower than other tiers
- Wide-range queries can be costly and slow
- Depends on the health and speed of object storage
- Requires an appropriate subscription level
Frozen does not mean unreachable or archived offline. It is fully searchable, just slower. If you need data to be truly offline and not searchable, you would keep plain snapshots instead and restore them only when needed.
8Node Roles: How Tiers Are Built
A tier is not magic. It is just a role label on a node, plus a rule that says which indices may live on nodes with that label.
The role names
In Elasticsearch, every node carries one or more roles. The tier roles are named data_content, data_hot, data_warm, data_cold and data_frozen. If you give a node the role data_hot, it becomes a hot node. If you give another node data_warm, it becomes a warm node. There is also the older generic data role, which makes a node a member of all the tiers except frozen at once, which is convenient for small clusters but gives up the ability to separate them.
Master-eligible
Manages cluster state and decisions. Best kept on small dedicated nodes, usually three for safety.
Ingest
Runs pipelines that clean or enrich documents before they are stored.
Coordinating
A node with no special role that receives requests, fans them out to shards, and merges the answers.
Data tier roles
Hot, warm, cold, frozen and content roles decide where shards of each age may live.
How Elasticsearch decides where a shard goes
Each index carries a setting called a tier preference. It is an ordered list such as “prefer cold, then warm, then hot”. Elasticsearch places the shard on a node that belongs to the first tier in the list that has an available node. If no cold node exists, it falls back to the warm tier, and so on. This fallback is a safety net that keeps a small or damaged cluster running rather than leaving shards homeless.
You rarely set this by hand. When a lifecycle policy enters a new phase, it updates the tier preference for you through a built-in migrate step. All you do is define the phases, and the cluster does the wiring.
A short history lesson
Before data tiers arrived in version 7.10, engineers built the same idea manually. They tagged nodes with custom attributes, often called box types with values like hot, warm and cold, and wrote allocation rules that said “this index must live on nodes tagged warm”. It worked, but it was easy to misconfigure and every team invented its own naming. Data tiers turned that hand-made pattern into a first-class feature with proper roles and automatic handling.
If you inherit an older cluster that uses custom node attributes, plan a careful move to data tier roles. Mixing the two approaches in one cluster can create confusing allocation behavior, so change gradually and verify shard placement at each step.
9Index Lifecycle Management: The Automation Engine
Having tiers is only half the story. Something must decide, automatically and on time, when each index moves.
What ILM is
Index Lifecycle Management, usually shortened to ILM, is the built-in system that moves indices through phases according to a policy you write once. A policy describes phases, the age at which each phase starts, and the actions to perform in each. After that, ILM checks your indices on a schedule and applies the next step whenever the conditions are met, so nobody needs to run manual jobs at midnight.
The phases
Hot
The index is being written to. Rollover is decided here, and priority is set high.
Warm
Writing has stopped. Shrink, merge and read-only steps take place and shards move to warm nodes.
Cold
Reads are rare. Shards move to cold nodes, often as a fully mounted searchable snapshot.
Frozen
The index becomes a partially mounted snapshot backed by object storage.
Delete
The index and, optionally, its snapshot are removed when retention ends.
The actions
Inside phases, ILM runs actions. The most important ones are easy to understand once you know what each is for. Rollover starts a new index when the current one is too old or too big. Set priority decides which indices recover first after a restart, with hot data usually first. Shrink reduces the shard count, and force merge reduces the segment count. Read-only locks an index. Migrate moves shards to the right tier. Searchable snapshot converts an index to a snapshot-backed one. Downsample, available for time series data, replaces fine-grained old metrics with coarser summaries. Delete removes the data.
| Action | Plain Meaning | Where It Is Usually Used |
|---|---|---|
| Rollover | Start a fresh index when this one is full or old | Hot |
| Set priority | Decide recovery order after a failure | Hot, warm, cold |
| Shrink | Combine many shards into fewer | Warm |
| Force merge | Combine many segments into fewer | Warm |
| Read-only | Block further edits | Warm |
| Migrate | Move shards to the next tier | Warm, cold, frozen (automatic) |
| Searchable snapshot | Store the index in a repository and mount it | Cold, frozen |
| Downsample | Keep coarser summaries of old metrics | Warm, cold |
| Delete | Remove the index when retention ends | Delete |
Understanding timing: min age
Each phase has a minimum age. It says how old an index must be before the phase may start. There is one subtle rule that surprises beginners: when rollover is used, the age is measured from the moment of rollover, not from the moment the index was first created. This makes sense, because an index that was actively receiving data for two days should not count those two days as time spent in the warm phase.
ILM does not act instantly. It checks indices on a schedule, by default every ten minutes. So an index might sit a few minutes past its target age before the next action begins. This is normal and rarely matters.
Setting the minimum age of each phase as if it were “time since the previous phase started”. Ages are measured from one clock, the rollover moment, so the warm age of seven days and the cold age of thirty days mean days one to seven hot, days seven to thirty warm, and so on, not seven days of each.
10Data Streams, Rollover and the Life of a Document
Follow one log line from birth to deletion to see every part of the system working together.
Data streams hide the complexity
Time-based data is normally written into a data stream. A data stream looks like one index to the outside world, so your applications and dashboards use a single name. Behind the scenes it is a chain of hidden backing indices. New documents always go to the newest backing index, called the write index, while earlier ones are read-only and available for searches.
An index template attached to the data stream tells Elasticsearch which lifecycle policy and which settings to use for each new backing index. When an index template and a lifecycle policy are wired together, every new backing index automatically inherits the whole lifecycle with no manual setup.
The journey of one document
Arrival
An agent or application sends a log line. It may pass through an ingest pipeline that parses and enriches it.
Written to the hot write index
The document is stored on a hot node, copied to a replica on another hot node, and becomes searchable within about a second.
Rollover
When the write index reaches its size or age limit, ILM creates a new write index. The old one stops receiving writes.
Warm, cold and frozen moves
As the minimum ages pass, the old index is shrunk, merged, relocated and possibly converted into a snapshot-backed index.
Deletion
When the retention period ends, the delete phase removes the index, and if configured, the related snapshot too.
flowchart TD
W["Write index on hot node"] --> Q{"Size or age limit reached?"}
Q -->|No| W
Q -->|Yes| R["Rollover: create new write index"]
R --> O["Old index enters warm phase after min age"]
O --> CP["Cold phase after its min age"]
CP --> FP["Frozen phase after its min age"]
FP --> D["Delete phase at retention end"]
Why rollover by size beats rollover by day alone
If you create one index per day, a quiet Sunday produces a tiny index and a busy Monday produces a huge one. Tiny indices waste resources because every shard has fixed overhead, and huge shards are slow to move and recover. Rolling over when a primary shard reaches a target size, such as around fifty gigabytes, keeps shards evenly sized regardless of traffic. Adding a maximum age as a second condition makes sure quiet periods still roll over eventually.
11Internal Working: How Shards Really Move
Understanding what happens under the hood makes troubleshooting far less mysterious.
The allocation system
The elected master node keeps the cluster state, which is a map of every index, shard and node. When the tier preference of an index changes, the master runs its allocation logic. A set of rules called allocation deciders looks at each candidate node and answers yes or no: does this node have the right tier role, enough disk space, no conflicting copy of the same shard, and room under any limits?
If the answer is yes for a node, the master instructs it to start receiving the shard. The target node copies the shard’s files from the current holder. Only after the new copy is fully in sync does the master remove the old one. During the whole move, searches continue on the old copy, so users notice nothing.
Disk watermarks
Each node protects itself with disk watermarks. By default, when a node passes about eighty-five percent disk usage, the cluster stops sending it new shards. At about ninety percent, it starts moving shards away. At about ninety-five percent, the affected indices are made read-only to prevent complete disk exhaustion. On a hot node, this can quickly become a crisis if cold-bound data is not moved out fast enough, which is why lifecycle timing matters.
Shrink, merge and why they matter
Shrinking creates a new index with fewer primary shards by hard-linking or copying the files of the old one, so it is efficient but needs all shards of the source on one node first. That is why ILM briefly gathers shards together before shrinking. Force merge rewrites the segments of each shard into a small number, often just one. It temporarily needs extra disk space and causes I/O, which is why it belongs on warm nodes and not on the hot ones under load.
Recovery priority
When a cluster restarts or a node fails, many shards need to recover at once. Elasticsearch uses the priority setting on indices to decide the order. Hot indices get the highest priority because they are being written to and read the most. Warm indices get a middle value and cold a low value. This ensures the most valuable data becomes healthy first.
After a power cut in a hospital, generators power the operating rooms first, then the wards, then the offices. Recovery priority is that same ordering applied to data.
12Sizing and Shard Strategy
Good tiering is mostly good arithmetic done before you buy machines.
Start with the daily data volume
Begin by estimating how much raw data you will ingest per day. Then add the overhead of indexing, which depends on your mappings and the data itself and is often a noticeable fraction on top of raw size. Then multiply by the number of copies you keep, since a replica doubles the space. That gives you the daily storage cost on the hot tier.
Next, apply your retention rules. If data spends seven days hot, twenty-three days warm, sixty days cold and the rest frozen, you can compute the storage needed on each tier by multiplying the daily volume by the days spent there. Cold data using searchable snapshots needs no replicas locally, and frozen data needs only a cache, so their local disk needs are far smaller than their logical size suggests.
Choose a healthy shard size
A widely used guideline is to aim for shards between about ten and fifty gigabytes. Shards that are too small waste memory because every shard has a fixed overhead. Shards that are too large take a long time to move between nodes and to recover after failures. Another practical guideline is to keep the number of shards per node modest relative to the heap, with a common older rule of thumb being about twenty shards per gigabyte of heap as an upper bound. Treat these as starting points and measure your own cluster.
Oversharding
Thousands of tiny shards drain heap memory and slow the master, without improving speed.
Giant shards
Moves and recoveries take hours, and a single failure hurts a lot.
Balanced shards
Moderate, even sizes move quickly and spread evenly across nodes.
Different targets
Hot shards may stay smaller for write parallelism, while warm shards can be merged bigger.
Memory-to-disk ratios
Each tier tolerates a different amount of data per gigabyte of memory. Hot nodes need generous memory for caching and heavy work, so they hold less data per node. Cold nodes serve infrequent queries and can hold many times more. Frozen nodes hold the most logical data, as they mostly rely on object storage. The exact numbers depend on workload, so use published guidance only as a first draft and validate with a realistic test.
| Tier | Data per Memory | CPU Need | Main Cost Driver |
|---|---|---|---|
| Hot | Lowest | High | Fast disks and cores |
| Warm | Medium | Medium | Disk capacity |
| Cold | High | Low | Disk capacity, fewer replicas |
| Frozen | Very high logical data | Low | Object storage and cache disks |
Always leave free headroom on every tier, not just hot. Data must be able to arrive from the previous tier, force merges need temporary space, and disk watermarks trigger unpleasant behavior when nodes run too full.
13Searching Across Tiers
A single search can span hot, warm, cold and frozen data without the user knowing.
The request path
A search request arrives at any node in the cluster, which then acts as the coordinating node for that request. It works out which shards must be consulted, sends the query to a copy of each, waits for the partial answers, merges them, and sends the final result back. It does not care which tier a shard is on. To the user, one request returns one merged answer.
sequenceDiagram
participant U as User
participant C as Coordinating node
participant H as Hot shards
participant W as Warm shards
participant Z as Cold and frozen shards
U->>C: Search for last 90 days
C->>C: Find shards matching the time range
C->>H: Query recent shards
C->>W: Query warm shards
C->>Z: Query cold and frozen shards
H-->>C: Fast partial results
W-->>C: Partial results
Z-->>C: Slower partial results
C-->>U: Merged final result
Why the slowest tier sets the pace
The coordinating node must wait for all involved shards, so the final answer is only as fast as the slowest shard it queried. If a dashboard covers the last ninety days, and a part of that range lives on cold or frozen tiers, the whole panel may load slowly. That is why dashboards for daily operations should look at short recent windows and leave long-range questions to targeted investigations.
Skipping shards that cannot match
Elasticsearch has a cheap pre-check step that asks each shard whether it could possibly contain matches, based on things like the time range stored for the data. Shards that cannot match are skipped before doing the expensive work. This is especially valuable with frozen data, where avoiding a network fetch saves a great deal of time. Well-chosen time filters in every query are therefore one of the best performance habits you can build.
Operational dashboards
Cover the last minutes to a day. They mostly touch hot shards and stay snappy.
Weekly trend reports
Span hot and warm data. They are still quick since both tiers use good storage.
Security investigations
May reach back months into cold and frozen tiers. Analysts accept longer waits for the ability to look back.
Building a default dashboard with a time range of one year. Every viewer who opens it quietly triggers heavy reads on the slowest tiers and slows everyone else too.
14Resilience, Backups and Snapshots
Tiers save money, but they must never save money by losing data.
Replicas differ by tier
Hot data usually keeps at least one replica, because losing the only copy of fresh, valuable data is unacceptable and the replica helps share the search load. Warm data often keeps a replica too. Cold data using fully mounted searchable snapshots can run without replicas, since the snapshot is the safety copy. Frozen data depends entirely on its repository copy, so the repository itself must be protected.
Snapshot lifecycle management
A snapshot is a backup of one or more indices stored in a repository. Snapshot lifecycle management, often called SLM, is the scheduler that takes snapshots on a timetable and deletes old ones after a retention period. Even if you do not use searchable snapshots, regular snapshots of important indices are your protection against bigger disasters such as accidental deletion, a bad deployment, or losing an entire data center.
One node dies
Replicas or snapshot copies rebuild the lost shards on other nodes of the same tier.
A whole tier is short on space
Shards may fall back to another tier if the preference list allows it, though performance and cost change.
Object store outage
Frozen and cold snapshot-backed searches may fail or slow until the store returns.
Human error
An accidental delete is recoverable only if a recent snapshot exists in a separate repository.
Replicas are like keeping two keys in the same house. They help if you lose one key. Snapshots are like leaving a spare key with a trusted friend across town. If the whole house burns down, only the friend’s key helps.
Availability zones
In cloud deployments, spreading nodes and replicas across separate availability zones protects against the failure of one zone. Elasticsearch supports awareness settings that keep a shard and its replica in different zones. For the hot tier, this is worth the small cost, because it keeps fresh data safe. For lower tiers, decisions balance cost and risk, and the snapshot repository often provides the durability.
15Security in a Tiered Cluster
Security follows the data wherever it moves, so it must be built into every tier equally.
Protect the data in motion and at rest
Every connection between nodes should use encrypted transport, and client connections should use encrypted HTTP. When shards move between tiers, they travel across the network, so unencrypted internal traffic would expose data during every relocation. Disks on all tiers, including cold and frozen cache disks, should use encryption at rest, provided by the operating system, the storage layer or the cloud platform.
Protect the snapshot repository
The repository holds a full copy of your data, so it deserves the same care as the cluster. Restrict who can read or delete objects in the bucket using the cloud provider’s access controls, use dedicated credentials for the cluster, enable versioning or object lock where possible, and keep a separate repository for backups so one mistake cannot wipe both.
Control who can see what
Elasticsearch supports role-based access control. Roles can be limited to certain indices, certain fields and even certain documents. A team that should only view application logs can be restricted from seeing security logs, no matter which tier those logs currently live on. Also restrict who may change lifecycle policies, because a wrongly edited policy can delete data early or keep it far too long. Enable audit logging so you can trace who changed what.
Retention rules are often a legal matter, not just a technical choice. Some regulations require keeping data for a minimum time, while privacy laws may require deleting personal data by a maximum time. Write these requirements into your lifecycle policy so the delete phase enforces them automatically.
16Monitoring, Logging and Troubleshooting
A tiered cluster is a moving system, so you need to watch both the machines and the movement.
What to watch on every tier
Disk usage
Watch each tier against the watermarks. Rising usage on hot is an early warning that data is not leaving fast enough.
Indexing rate and latency
Slow indexing on hot nodes usually points to disk pressure, merge backlogs or an undersized tier.
Search latency by tier
Separate timings for hot, warm, cold and frozen show where slowness really comes from.
ILM step status
Indices stuck in one step for a long time need attention before they cause bigger problems.
Shard counts and sizes
Track average shard size and shards per node to catch oversharding early.
Cache and repository health
For frozen data, cache hit rates and object storage latency drive user experience.
Useful diagnostic tools
Elasticsearch includes a lifecycle explain feature that tells you, for each index, which phase and step it is in and, if it is stuck, the error message. It also has an allocation explain feature that tells you why a specific shard is not being placed on a node, listing each decider’s reason. Together with the standard cluster health and node statistics views, these answer most “why is my data not moving” questions. Kibana’s stack monitoring pages show the same information in graphs.
Typical stuck situations
No node with the target role
The policy asks to move data to warm, but no warm node exists or all are full. Add nodes or free space.
Rollover never happens
The index is not attached to the policy correctly, or the rollover alias or data stream is misconfigured, so the first step never fires.
Shrink fails
The shards could not all be placed on one node, often due to lack of space or conflicting allocation rules.
Snapshot step fails
The repository is unreachable, credentials expired, or permissions changed, so the searchable snapshot step cannot complete.
Waiting for the hot disks to fill before checking lifecycle health. By the time a flood-stage watermark hits, writes may be blocked. Alert on ILM errors and on hot-tier disk growth trends much earlier.
17Design Patterns and Anti-patterns
Patterns that work in many clusters, and mistakes that show up again and again.
Patterns worth copying
Right-sized retention per data type
Do not give every data source the same policy. Debug logs might live seven days total, security events a year, and financial audit trails several years. Separate data streams with separate policies keep cost proportional to value.
Two-tier start
A small team can begin with only hot and warm tiers, adding cold and frozen later when data volume justifies it. The architecture grows with the need rather than being built in full on day one.
Downsampling for metrics
Metrics recorded every ten seconds are valuable for last week’s debugging but wasteful a year later. Downsampling keeps hourly summaries for old data and cuts storage sharply.
Dedicated coordinating nodes
When many users run heavy dashboards, placing coordinating-only nodes in front of the data tiers isolates the merging work from the storage work.
Anti-patterns to avoid
Problem
A team gives every node the generic data role and never separates tiers, then wonders why costs keep rising.
Why It’s Harmful
All data, new and old, competes for the same expensive resources, and there is no way to give old data cheaper hardware.
Correct Approach
Introduce dedicated tier roles, then use lifecycle policies to move data as it ages.
Problem
One index per day, per tiny application, producing thousands of very small shards.
Why It’s Harmful
Each shard consumes memory and cluster state space. The cluster slows down long before disks fill.
Correct Approach
Combine related small sources into shared data streams and roll over by size, so shards reach a healthy size.
Problem
Keeping everything hot “just in case”, because moving data feels risky.
Why It’s Harmful
Cost balloons, and hot nodes become crowded with data that nobody reads, which can slow the fresh data that everyone needs.
Correct Approach
Measure real search patterns, then move data to warm and cold as soon as usage supports it. Test with a small dataset first to build trust.
Problem
Using the frozen tier for data that dashboards query every minute.
Why It’s Harmful
Each query triggers network fetches and slow responses, frustrating users and stressing the repository.
Correct Approach
Match tier to access pattern. Only truly rare, investigative access belongs on frozen.
18Best Practices and Common Mistakes
A checklist of habits that separate calm clusters from stressful ones.
Use data streams
They make rollover and lifecycle wiring automatic and consistent.
Roll over by size and age
This keeps shards evenly sized and predictable.
Test policies on a small scale
Try a policy on one data stream before applying it to the entire estate.
Alert on ILM errors
Stuck indices are quiet problems that grow into loud ones.
Keep free headroom
Every tier needs spare room for incoming data and temporary operations.
Document retention reasons
Future teams should know why data is kept for a set time.
Editing a lifecycle policy and expecting existing indices to change immediately. Indices already in progress keep running the version of the policy they started with until they are explicitly moved to the new one, so plan how the change will reach older data.
Forgetting that a delete phase is permanent. Before enabling deletion on any data stream, confirm the retention requirement with the owners of that data and check that snapshots exist where they are needed.
Treat lifecycle policies like application code: keep them in version control, review changes with a colleague, and roll them out gradually. A small edit to a policy can affect terabytes of data.
19Real-World Scenarios
These are illustrative examples that show how different organizations might shape their tiers.
Application logging for an online shop
An online retailer sends web and application logs into Elasticsearch. Engineers debug with the last few days, so logs stay hot for three days, warm for two weeks, and are then deleted at thirty days. Cost stays low because most data never reaches the expensive tiers for long.
Security monitoring for a bank
A bank must keep security events for a long time. Events stay hot for a week for active monitoring, warm for a month, then move to cold and frozen tiers for a year or more. Analysts can still search old events during an investigation, at slower speed but a fraction of the cost.
Metrics for a large platform team
A platform team stores infrastructure metrics. Fine-grained data stays hot briefly, then downsampling keeps coarse summaries in warm and cold tiers for capacity planning across several years.
Managed cloud deployments
Elastic’s own hosted service offers hardware profiles and tier choices, so a team can choose hot, warm, cold and frozen capacity from a menu instead of managing servers. The architecture is the same, only the operations burden moves to the provider.
The exact numbers above are examples, not rules. Your own values should come from how your users actually search and from the retention required by your business and legal teams.
20Advantages and Trade-offs
No architecture is free. Here is an honest summary of what you gain and what you accept.
Advantages
- Large cost savings by matching hardware to data value
- Fast performance for the recent data that matters most
- Longer retention within the same budget
- Automatic movement through lifecycle policies
- Better stability, since hot nodes are not crowded with old data
- Clear, explainable structure for growth planning
Disadvantages / Trade-offs
- More moving parts to design, monitor and maintain
- Slower searches on older data
- Some features depend on subscription level
- Mistakes in policies can move or delete data unexpectedly
- Needs careful shard sizing and capacity planning
When you might not need it
If your cluster is small, your data is modest, or your data is not time-based, a single tier may be perfectly fine. A product search index, for example, holds data that does not age, and it belongs on the content tier. Tiering pays off when data is large, grows steadily, and has a clear pattern where old data is read much less often than new data.
If storage cost or hot-node pressure is a real pain and most of your data is older than what people usually search, tiering is very likely worth the effort. If neither is true, keep things simple.
21Frequently Asked Questions
No. It is a way of organizing normal Elasticsearch nodes using roles and lifecycle policies. Everything is part of the same cluster.
Not at all. Many teams start with hot and warm only. Add cold and frozen when your volume and retention needs justify them.
The older approach used custom node attributes and manual allocation rules. Data tiers replaced it with built-in roles and automatic handling, which is simpler and less error-prone.
Yes. The coordinating node queries shards wherever they live and merges the answers. The response is limited by the slowest tier involved.
Cold nodes keep a full local copy of the data, while frozen nodes keep the data in object storage and cache only the pieces that searches need. Frozen is cheaper and slower.
Common reasons are that the policy is not attached, rollover has not happened, no warm node has space, or an earlier step failed. Use the lifecycle explain feature to see the exact step and error.
It is where non-time-based data lives, such as catalogs and system indices. That data does not age, so it does not move along the conveyor belt.
No. Searches continue on the existing copy while the new copy is built, and the old one is removed only when the new one is ready.
Long enough to cover the time range most searches use. For many log workloads that is a few days to two weeks, but measure your own users.
Yes, you still want a protected repository and ideally a separate backup repository. The repository copy is your safety net, so it must itself be safe.
Yes, but existing indices keep the policy version they started with until you move them to the updated one, so plan how the change reaches older data.
No. It replaces detailed old metrics with summaries, so you keep the shape of the data at lower resolution and lower cost.
22Summary and Key Takeaways
Hot-Warm-Cold architecture is the practical answer to a simple truth: not all data deserves the same treatment. Fresh data is written and read constantly, so it sits on fast, expensive hot nodes. As it ages it moves to warm, cold and frozen tiers, each cheaper and slower than the last, until it is deleted. Lifecycle policies automate the journey, data streams and rollover keep shards well sized, and searchable snapshots let old data stay reachable at a small cost. Get the tier hardware, shard sizes and retention rules right, and you get a cluster that is fast where speed matters and thrifty everywhere else.
Key Takeaways
- Tiers match cost to value — hot, warm, cold and frozen nodes are groups of one cluster with different hardware, chosen by how often data is read.
- Shards are the unit that moves — Elasticsearch relocates whole shards between tiers, so shard size and count drive everything.
- ILM is the automation engine — phases, minimum ages and actions such as rollover, shrink, force merge and migrate move data without manual work.
- Roll over by size with an age cap — shards of around ten to fifty gigabytes stay quick to move, recover and search.
- Searchable snapshots cut storage — cold uses fully mounted copies, frozen uses partially mounted ones with a local cache, both backed by a repository.
- The slowest tier sets search speed — use narrow time ranges and keep daily dashboards on hot and warm data.
- Protect and monitor everything — encrypt data, guard the snapshot repository, watch disk watermarks and alert on stuck lifecycle steps.