blob: a89af79da7de8b3484503c44ec51b5fa5c7e5c39 [file] [log] [blame]
<!--
▄▄▄ ██▓███ ▄▄▄ ▄████▄ ██░ ██ ▓█████ ██▓ ▄████ ███▄ █ ██▓▄▄▄█████▓▓█████
▒████▄ ▓██░ ██▒▒████▄ ▒██▀ ▀█ ▓██░ ██▒▓█ ▀ ▓██▒ ██▒ ▀█▒ ██ ▀█ █ ▓██▒▓ ██▒ ▓▒▓█ ▀
▒██ ▀█▄ ▓██░ ██▓▒▒██ ▀█▄ ▒▓█ ▄ ▒██▀▀██░▒███ ▒██▒▒██░▄▄▄░▓██ ▀█ ██▒▒██▒▒ ▓██░ ▒░▒███
░██▄▄▄▄██ ▒██▄█▓▒ ▒░██▄▄▄▄██ ▒▓▓▄ ▄██▒░▓█ ░██ ▒▓█ ▄ ░██░░▓█ ██▓▓██▒ ▐▌██▒░██░░ ▓██▓ ░ ▒▓█ ▄
▓█ ▓██▒▒██▒ ░ ░ ▓█ ▓██▒▒ ▓███▀ ░░▓█▒░██▓░▒████▒ ░██░░▒▓███▀▒▒██░ ▓██░░██░ ▒██▒ ░ ░▒████▒
▒▒ ▓▒█░▒▓▒░ ░ ░ ▒▒ ▓▒█░░ ░▒ ▒ ░ ▒ ░░▒░▒░░ ▒░ ░ ░▓ ░▒ ▒ ░ ▒░ ▒ ▒ ░▓ ▒ ░░ ░░ ▒░ ░
▒ ▒▒ ░░▒ ░ ▒ ▒▒ ░ ░ ▒ ▒ ░▒░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░░ ░ ▒░ ▒ ░ ░ ░ ░ ░
░ ▒ ░░ ░ ▒ ░ ░ ░░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ▒ ░ ░ ░
░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
-->
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="canonical" href="https://ignite.apache.org/arch/multi-tier-storage.html"/>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
<title>Multi-Tier Storage - Apache Ignite</title>
<meta name="description"
content="Apache Ignite multi-tier storage uses memory, disk, and Intel Optane as active storage tiers to
provide the speed of memory with the consistency of disk-based databases without the need for memory
warm-ups on restarts."/>
<!--#include virtual="/includes/styles.html" -->
<!--#include virtual="/includes/sh.html" -->
</head>
<body>
<!--#include virtual="/includes/header.html" -->
<article>
<header>
<div class="container">
<h1>Apache Ignite <strong>Multi-Tier Storage</strong></h1>
</div>
</header>
<div class="container">
<p>
Apache Ignite® is designed to work with memory, disk, and Intel Optane as active storage tiers.
The memory tier allows using DRAM and Intel® Optane™ operating in the Memory Mode for data storage
and processing needs. The disk tier is optional with the support of two options -- you can
persist data in an external database or keep it in the Ignite native persistence. SSD, Flash,
HDD, or Intel Optane operating in the AppDirect Mode can be used as a storage device.
</p>
<img class="img-responsive diagram-right" src="/images/svg-diagrams/ignite_cluster.svg" />
<p>
Ignite takes full control of its memory tier by allocating and managing off-heap regions. Each Ignite
server node allocates memory regions during bootstrap, splits the regions into pages, and keeps data
records with indexes in those pages. Java heap is used to keep temporary objects such as query result
sets, metrics samples, and objects generated by your application code. All these objects are garbage
collected eventually.
</p>
<p>
If you select native persistence as the disk tier, then most of the processing will still take place
in memory on cached data, but with a full copy stored on disk. If any record is missing in memory,
Ignite will read it from disk, allowing you to persist much larger data sets than you can cache in memory.
This also eliminates the need for time-consuming memory warm-ups on restarts. As soon as your cluster
reconnects after a restart, Ignite will serve most of the data from disk warming up the memory tier in
the background.
</p>
<h2>Multi-Tier Storage Usage Modes</h2>
<table class="table table-bordered table-striped" name="Deployment Options Features">
<thead>
<tr>
<th width="35%" class="left">Mode</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left">In-Memory</td>
<td>
<p>
The whole data set is available in memory only. In order to survive node failures, we
recommend keeping at least one backup copy of the data in the cluster. DRAM or
Intel® Optane™ operating in the Memory Mode can be used as a storage device.
</p>
<p>
<strong>Use cases</strong>: General in-memory caching, high-performance
computing, web-session caching, real-time processing of continuous data streams.
</p>
</td>
</tr>
<tr>
<td class="left">In-Memory + External Database</td>
<td>
<p>
Ignite is deployed as a distributed caching layer on top of an existing external database.
This mode is for accelerating disk-based databases and your services with APIs that
interact with them.
</p>
<p>
<strong>Use cases</strong>: Acceleration of services and APIs with write-through and
write-behind capability, to an external database.
</p>
</td>
</tr>
<tr>
<td class="left">In-Memory Cache + Native Persistence</td>
<td>
<p>
100% of data is persisted to disk, and the same or smaller amount is cached in memory. The
more data is cached, the faster is the performance. The disk serves as the primary storage
that survives any cluster failures and restarts. There is no need for memory warm-ups on
restarts since Ignite can serve data from disk. SSD, Flash, HDD or Intel® Optane™ operating
in the AppDirect Mode can be used as a storage device.
</p>
<p>
<strong>Use cases</strong>: Ignite as an in-memory database or digital integration hub
with the active persistence layer.
</p>
</td>
</tr>
</tbody>
</table>
<h2 id="partitioning">
Partitioning &amp; Replication
</h2>
<p>
Depending on the configuration, Ignite can both partition or replicate data across the cluster. In the
replicated mode, each cluster node keeps a full copy of the data, but the size of a replicated cache is
limited by the amount of memory available on the node. In the partitioned mode, Ignite spreads the data
across all the cluster nodes evenly, allowing you to store much more than what can fit in a single machine.
</p>
<h2 id="durability">
Durability and Consistency
</h2>
<p>
Ignite provides the following ACID guarantees across the cluster:
</p>
<ul >
<li>Committed transactions always survive failures.</li>
<li>
The cluster can always be recovered to the latest successfully committed transaction.
</li>
</ul>
<h2 id="write-ahead-log">
Write-Ahead Logging and Checkpointing
</h2>
<p>
If Ignite native persistence is selected as a disk tier, then every time a record is updated in memory,
the change is added to the write-ahead log (WAL). The purpose of the WAL is to propagate updates to disk
in the fastest way possible and provide a consistent recovery mechanism that supports full cluster failures.
</p>
<p>
As the WAL grows, it periodically gets checkpointed to the main storage. Checkpointing is the process of
copying dirty pages from the memory tier to the partition files on disk. A dirty page is a page that was
updated in memory, was appended to WAL, but was not written to the respective partition file on disk yet.
</p>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<div class="display-6 title">Learn More</div>
<hr class="my-4">
<div class="row">
<div class="col-sm-6">
<ul>
<li>
<p><a href="https://cwiki.apache.org/confluence/display/IGNITE/Ignite+Durable+Memory+-+under+the+hood" target="docs">Multi-Tier Storage Implementation Details <i class="fa fa-angle-double-right"></i></a></p>
</li>
<li>
<p><a href="/arch/persistence.html"> Native Persistence <i class="fa fa-angle-double-right"></i></a></p>
</li>
<li>
<p><a href="/use-cases/datagrid.html"> Ignite as an In-Memory Data Grid <i class="fa fa-angle-double-right"></i></a></p>
</li>
</ul>
</div>
<div class="col-sm-6">
<ul>
<li>
<p><a href="/use-cases/in-memory-database.html"> Ignite as an In-Memory Database <i class="fa fa-angle-double-right"></i></a></p>
</li>
<li>
<p><a href="/use-cases/digital-integration-hub.html"> Ignite as a Digital Integration Hub <i class="fa fa-angle-double-right"></i></a></p>
</li>
<li>
<p><a href="/use-cases/hpc.html"> Ignite for High Performance Computing <i class="fa fa-angle-double-right"></i></a></p>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</article>
<!--#include virtual="/includes/footer.html" -->
<!--#include virtual="/includes/scripts.html" -->
</body>
</html>