blob: fc93e133b3eddbf3cb996236f2db940c9218eedd [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<title>Native Persistence | Apache Ignite</title>
<link rel="stylesheet" href="/js/vendor/hystmodal/hystmodal.min.css" />
<link rel="stylesheet" href="/js/vendor/swiper/swiper-bundle.min.css" />
<link rel="stylesheet" href="/css/utils.css" />
<link rel="stylesheet" href="/css/site.css" />
<link rel="stylesheet" href="../css/native-persistence.css" />
<link rel="stylesheet" href="../js/vendor/highlight/default.min.css" />
<link rel="stylesheet" href="../js/vendor/highlight/night-owl.css" />
<script src="../js/vendor/highlight/highlight.min.js"></script>
<link rel="stylesheet" href="/css/media.css" media="only screen and (max-width:1199px)" />
<link rel="icon" type="image/png" href="/img/favicon.png" />
</head>
<body>
<!-- MOBILE MENU START -->
<div class="hystmodal" id="jsMenuModal" aria-hidden="true">
<div class="hystmodal__wrap">
<div class="hystmodal__window mobmenu" role="dialog" aria-modal="true">
<button data-hystclose class="hystmodal__close">Close</button>
<div class="mobmenu__wrap">
<a href="/" class="mobmenu__logo"><img src="/img/logo.svg" alt="Логотип" /></a>
<div class="mobmenu__menu">
<div class="mobmenu__h1 berlin">Navigation</div>
<ul>
<li>
<a href="/">Get started</a>
</li>
<li>
<a href="/features/">Features</a>
</li>
<li>
<a href="/community.html">Community</a>
</li>
<li>
<a href="/use-cases/provenusecases.html">Powered by</a>
</li>
<li>
<a href="https://ignite.apache.org/docs/latest/">Docs</a>
</li>
</ul>
</div>
<!-- //mobmenu__menu -->
</div>
<!-- //mobmenu__wrap -->
</div>
<!-- //mobmenu -->
</div>
</div>
<!-- MOBILE MENU END -->
<header class="hdr hdr__blue">
<div class="hdr__wrap flexi">
<button class="hdr__burger" data-menumodal="#jsMenuModal"><img src="/img/menu.svg" alt="" /></button
><a class="hdr__logo" href="/"><img class="hdr__logoimg hdr__logo--white" src="/img/logo-white.svg" alt="" /><img class="hdr__logoimg hdr__logo--black" src="/img/logo.svg" alt="" /></a
><a class="button hdr__button" href="/download.html">Download Ignite 2.11 </a>
<nav class="hdrmenu">
<ul class="flexi">
<li><a class="hdrmenu--expanded" href="/" data-panel="getStarted">Get started</a></li>
<li><a class="hdrmenu__current hdrmenu--expanded" href="/features" data-panel="features">Features</a></li>
<li><a class="hdrmenu--expanded" href="/community.html" data-panel="community">Community</a></li>
<li><a href="/use-cases/provenusecases.html" data-panel="">Powered by</a></li>
<li><a href="///ignite.apache.org/docs/latest/" data-panel="">Docs</a></li>
</ul>
</nav>
<div class="dropmenu">
<div class="dropmenu__panel" data-menupanel="getStarted">
<div class="container dropmenu1__grid">
<div class="dropmenu__box dropmenu--left">
<ul class="dropmenu__menu">
<li>
<a class="dropmenu__iconitem" href="/resources.html"><img src="/img/menu/icon-resources.svg" alt="" /><span>Resources</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/faq.html"><img src="/img/menu/icon-question.svg" alt="" /><span>FAQ</span></a>
</li>
</ul>
</div>
<div class="dropmenu1__center">
<div class="dropmenu__box">
<p class="capstext">USE CASES</p>
<ul class="dropmenu__menu">
<li>
<a class="dropmenu__iconitem" href="/use-cases/in-memory-cache.html"><img src="/img/menu/icon-folder.svg" alt="" /><span>In-Memory Cache</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/use-cases/in-memory-data-grid.html"><img src="/img/menu/icon-folder.svg" alt="" /><span>In-Memory Data Grid</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/use-cases/in-memory-database.html"><img src="/img/menu/icon-folder.svg" alt="" /><span>In-Memory Database</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/use-cases/key-value-store.html"><img src="/img/menu/icon-folder.svg" alt="" /><span>Key-Value Store</span></a>
</li>
</ul>
</div>
<div class="dropmenu__box">
<ul class="dropmenu__menu">
<li>
<a class="dropmenu__iconitem" href="/use-cases/high-performance-computing.html"><img src="/img/menu/icon-folder.svg" alt="" /><span>High-Performance Computing</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/use-cases/digital-integration-hub.html"><img src="/img/menu/icon-folder.svg" alt="" /><span>Digital Integration Hub</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/use-cases/spark-acceleration.html"><img src="/img/menu/icon-folder.svg" alt="" /><span>Spark Acceleration</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/use-cases/hadoop-acceleration.html"><img src="/img/menu/icon-folder.svg" alt="" /><span>Hadoop Acceleration</span></a>
</li>
</ul>
</div>
</div>
<div class="dropmenu1__right">
<a class="dropmenu__redbutton" href="https://ignite.apache.org/docs/latest/"> <img src="/img/menu/icon-red-rocket.svg" alt="" /><span>Quick Start Guide</span></a>
</div>
</div>
<!-- /.dropmenu1__grid-->
</div>
<!-- /.dropmenu__panel-->
<div class="dropmenu__panel" data-menupanel="features">
<div class="container dropmenu2__grid">
<div class="dropmenu2__col dropmenu__box">
<div class="capstext">Distributed <br />Multi-Tiered Storage</div>
<ul class="dropmenu__menu">
<li>
<a class="dropmenu__iconitem" href="/arch/multi-tier-storage.html"><img src="/img/menu/icon-db.svg" alt="" /><span>Multi-Tier Storage</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/arch/native-persistence.html"><img src="/img/menu/icon-db.svg" alt="" /><span>Native Persistence</span></a>
</li>
</ul>
</div>
<div class="dropmenu2__col dropmenu__box">
<div class="capstext">Essentail Developer <br />APIs</div>
<ul class="dropmenu__menu">
<li>
<a class="dropmenu__iconitem" href="/features/sql.html"><img src="/img/menu/icon-cube.svg" alt="" /><span>Distributed SQL</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/features/distributed-key-value-store.html"><img src="/img/menu/icon-cube.svg" alt="" /><span>Key-Value APIs</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/features/acid-transactions.html"><img src="/img/menu/icon-cube.svg" alt="" /><span>ACID Transactions</span></a>
</li>
</ul>
</div>
<div class="dropmenu2__col dropmenu__box">
<div class="capstext">High-Performance <br />Computing APIs</div>
<ul class="dropmenu__menu">
<li>
<a class="dropmenu__iconitem" href="/features/compute-apis.html"><img src="/img/menu/icon-cube.svg" alt="" /><span>Compute APIs</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/features/servicegrid.html"><img src="/img/menu/icon-cube.svg" alt="" /><span>Services</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/features/machinelearning.html"><img src="/img/menu/icon-cube.svg" alt="" /><span>Machine Learning</span></a>
</li>
</ul>
</div>
<div class="dropmenu2__col dropmenu__box">
<div class="capstext">Real Streaming APIs</div>
<ul class="dropmenu__menu">
<li>
<a class="dropmenu__iconitem" href="/features/streaming.html"><img src="/img/menu/icon-cube.svg" alt="" /><span>Streaming</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="https://ignite.apache.org/docs/latest/messaging"><img src="/img/menu/icon-cube.svg" alt="" /><span>Messaging</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="https://ignite.apache.org/docs/latest/key-value-api/continuous-queries"><img src="/img/menu/icon-cube.svg" alt="" /><span>Continuous Queries</span></a>
</li>
</ul>
</div>
<div class="dropmenu1__right dropmenu2__col">
<a class="dropmenu__redbutton" href="https://ignite.apache.org/docs/latest/"> <img src="/img/menu/icon-red-rocket.svg" alt="" /><span>Quick Start Guide</span></a>
</div>
</div>
<!-- /.dropmenu2__grid-->
<div class="panelmorelinkwrap"><a class="panellink" href="/features/">View all</a></div>
</div>
<!-- /.dropmenu__panel-2-->
<div class="dropmenu__panel" data-menupanel="community">
<div class="container dropmenu1__grid dropmenu3__grid">
<div class="dropmenu__box dropmenu--left dropmenu3--left">
<ul class="dropmenu__menu">
<li>
<a class="dropmenu__iconitem" href="/"><img src="/img/menu/icon-clip.svg" alt="" /><span>Apache Ignite Story</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/community.html"><img src="/img/menu/icon-comment.svg" alt="" /><span>Meet The Community</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/community.html"><img src="/img/menu/icon-puzzle.svg" alt="" /><span>Start Contributing</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/faq.html"><img src="/img/menu/icon-question.svg" alt="" /><span>Ask A Question</span></a>
</li>
</ul>
</div>
<div class="dropmenu1__center">
<div class="dropmenu__box">
<p class="capstext">Events</p>
<ul class="dropmenu__menu">
<li>
<a class="dropmenu__iconitem" href="/events.html#summit"><img src="/img/menu/icon-calendar.svg" alt="" /><span>Apache Ignite Summit</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/events.html#meetups"><img src="/img/menu/icon-calendar.svg" alt="" /><span>Meetups</span></a>
</li>
</ul>
</div>
<div class="dropmenu__box">
<ul class="dropmenu__menu">
<li>
<a class="dropmenu__iconitem" href="/events.html#upcoming"><img src="/img/menu/icon-calendar.svg" alt="" /><span>Upcoming Events</span></a>
</li>
<li>
<a class="dropmenu__iconitem" href="/events.html#past"><img src="/img/menu/icon-calendar.svg" alt="" /><span>Past Events</span></a>
</li>
</ul>
</div>
</div>
<div class="dropmenu1__right">
<a class="dropmenu__redbutton" href="https://ignite.apache.org/docs/latest/"> <img src="/img/menu/icon-red-rocket.svg" alt="" /><span>Quick Start Guide</span></a>
</div>
</div>
<!-- /.dropmenu1__grid-->
</div>
<!-- /.dropmenu__panel-->
</div>
<!-- /.dropmeu-->
</div>
</header>
<div class="dropmenu__back"></div>
<section class="innerhero">
<div class="container innerhero__cont">
<div class="innerhero__main">
<div class="innerhero__pre pb-3">Apache Ignite</div>
<h1 class="h1 innerhero__h1">Native Persistence</h1>
<div class="innerhero__descr pt-2 h5">
Scale beyond available memory capacity <br />
and skip memory warm-ups on restarts
</div>
<div class="innerhero__action"><a class="button innerhero__button" href="https://ignite.apache.org/docs/latest/index">Start Coding</a></div>
</div>
<img class="innerhero__pic innerhero__pic--native" src="/img/features/native-header.svg" alt="Native Persistence" />
</div>
</section>
<!-- /.innerhero-->
<section class="native1 container flexi">
<div class="native1__block native1__block--bad">
<img class="native1__icon" src="/img/features/icon-check-err.svg" alt="" />
<div class="native1__title fz20 pt-1x">Usually, in-memory caches and databases provide limited persistence capabilities.</div>
<p class="pt-2">For instance, some solutions just do a backup copy of <br />the in-memory data purely for restart purposes.</p>
</div>
<div class="native1__block">
<img class="native1__icon" src="/img/features/icon-check-ok.svg" alt="" />
<div class="native1__title fz20 pt-1x">
Ignite persistence doesn’t have any limitations. <br />
Our native persistence behaves like a classic <br />disk-based database.
</div>
</div>
</section>
<section class="native2 container">
<div class="native2__grid">
<article class="native2item">
<h3 class="fz20 native2item__title">Scale beyond memory <br />capacity</h3>
<p class="pt-1x">100% of&nbsp;data is&nbsp;always stored on&nbsp;disk. You decide how much memory allocate to&nbsp;your data.</p>
</article>
<article class="native2item">
<h3 class="fz20 native2item__title">Seconds needed <br />for recovery</h3>
<p class="pt-1x">Ignite becomes operational from disk instantaneously. There is&nbsp;no&nbsp;need to&nbsp;wait for the data to&nbsp;get preloaded on&nbsp;restarts.</p>
</article>
<article class="native2item">
<h3 class="fz20 native2item__title">Query in-memory <br />and on-disk data</h3>
<p class="pt-1x">If&nbsp;any record is&nbsp;missing in&nbsp;memory, then Ignite reads it&nbsp;from disk. This is&nbsp;supported for all the APIs including SQL.</p>
</article>
</div>
</section>
<section class="native-howwork container">
<div class="native-howwork__wrap flexi">
<div class="native-howwork__left">
<h3 class="h5">How it works?</h3>
<div class="native-howwork__text pt-1">
<p>
The native persistence functions as&nbsp;a&nbsp;distributed, ACID, and SQL-compliant disk-based store. It&nbsp;integrates into the Ignite <a href="/features/multi-tier-storage.html">multi-tier storage</a> as&nbsp;a&nbsp;disk
tier.
</p>
<p class="pt-1">When the native persistence enabled, Ignite stores a&nbsp;superset of&nbsp;data on&nbsp;disk and caches as&nbsp;much as&nbsp;it&nbsp;can in&nbsp;memory.</p>
</div>
</div>
<div class="native-howwork__right">
<p>For example</p>
<p class="pt-1x">
If&nbsp;your application needs to&nbsp;store 200 records in&nbsp;an&nbsp;Ignite cluster and the memory capacity allows caching only 150&nbsp;records, then all 200 will be&nbsp;stored on&nbsp;disk, out of&nbsp;which 150 will
be&nbsp;served from memory while the rest 50&nbsp;from disk whenever the application requests them.
</p>
</div>
</div>
</section>
<section class="native-points container">
<h2 class="h4">Checkpointing And Write-Ahead Logging <br />Ensure Durability And Consistency Of&nbsp;Data</h2>
<div class="native-points__grid pt-5">
<div class="native-points__item fz20"><p>Committed transactions always survive failures</p></div>
<div class="native-points__item fz20"><p>The cluster can always be&nbsp;recovered to&nbsp;the latest successfully committed transaction</p></div>
</div>
</section>
<section class="native-steps">
<div class="container">
<h2 class="h4">Three-Step Process To&nbsp;Update Your Data <br />At&nbsp;In-Memory Speed But Not Losing A&nbsp;Bit</h2>
<img class="native-steps__pic" src="/img/features/native-stepspic.svg" alt="" />
<div class="native-steps__grid">
<article class="nativestepitem">
<i class="fz20 pb-1x">01</i>
<div class="nativestepitem__text">
<p>
As&nbsp;soon as&nbsp;the update comes from the application side, a&nbsp;record is&nbsp;updated in&nbsp;memory. Then, the change is&nbsp;added
<a href="https://ignite.apache.org/docs/latest/persistence/native-persistence.html#write-ahead-log">to&nbsp;the write-ahead log (WAL).</a>
</p>
<p>The purpose is&nbsp;to&nbsp;propagate updates to&nbsp;disk in&nbsp;the fastest way possible and provide a&nbsp;consistent recovery mechanism that remediates full cluster failures.</p>
</div>
</article>
<article class="nativestepitem">
<i class="fz20 pb-1x">02</i>
<div class="nativestepitem__text">
<p>As&nbsp;the WAL grows, it&nbsp;periodically gets checkpointed to&nbsp;the main storage.</p>
<p>
<a href="https://ignite.apache.org/docs/latest/persistence/native-persistence.html#checkpointing">Checkpointing</a> is&nbsp;the process of&nbsp;copying dirty pages from the memory tier to&nbsp;the partition files
on&nbsp;disk.
</p>
<p class="nativestepitem__small">A&nbsp;dirty page is&nbsp;a&nbsp;page that was updated in&nbsp;memory, was appended to&nbsp;the WAL, but was not written to&nbsp;the respective partition file on&nbsp;disk yet.</p>
</div>
</article>
<article class="nativestepitem">
<i class="fz20 pb-1x">03</i>
<div class="nativestepitem__text">
<p>After a&nbsp;while, the information about updates in&nbsp;WAL can be&nbsp;removed, compressed or&nbsp;moved to&nbsp;archive.</p>
<p>So&nbsp;you can reuse your disk space.</p>
</div>
</article>
</div>
</div>
</section>
<section class="nativecode container jsTabWrap">
<header class="blockheader blockheader--spl flexi">
<h2 class="h4 blockheader__left">You Decide Which Data To Persist</h2>
<div class="blockheader__right fz20">
<p>Toggle a&nbsp;single configuration setting to&nbsp;turn a&nbsp;cluster into a&nbsp;database <br />that scales across memory and disk</p>
</div>
</header>
<div class="nativecode__tabctrls flexi">
<a class="nativecode__link active" href="#" data-tablink="nativeTabXML">XML</a><a class="nativecode__link" href="#" data-tablink="nativeTabJava">Java</a><a class="nativecode__link" href="#" data-tablink="nativeTabNET">C#/.NET</a>
</div>
<div class="nativecode__tabs">
<div class="nativecode__tab active" data-tab="nativeTabXML">
<pre class="nativecode__codebox"> <code class="xml">&lt;bean class="org.apache.ignite.configuration.IgniteConfiguration"&gt;
&lt;property name="dataStorageConfiguration"&gt;
&lt;bean class="org.apache.ignite.configuration.DataStorageConfiguration"&gt;
&lt;property name="defaultDataRegionConfiguration"&gt;
&lt;bean class="org.apache.ignite.configuration.DataRegionConfiguration"&gt;
&lt;property name="persistenceEnabled" value="true"/&gt;
&lt;/bean&gt;
&lt;/property&gt;
&lt;/bean&gt;
&lt;/property&gt;
&lt;/bean&gt;</code></pre>
</div>
<div class="nativecode__tab" data-tab="nativeTabJava">
<pre class="nativecode__codebox"> <code class="java">IgniteConfiguration cfg = new IgniteConfiguration();
DataStorageConfiguration storageCfg = new DataStorageConfiguration();
// Enable Ignite Persistence
storageCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true);
// Using the new storage configuration
cfg.setDataStorageConfiguration(storageCfg);</code></pre>
</div>
<div class="nativecode__tab" data-tab="nativeTabNET">
<pre class="nativecode__codebox"> <code class="csharp">var cfg = new IgniteConfiguration
{
DataStorageConfiguration = new DataStorageConfiguration
{
DefaultDataRegionConfiguration = new DataRegionConfiguration
{
Name = "Default_Region",
PersistenceEnabled = true
}
}
};</code></pre>
</div>
</div>
</section>
<!-- /.nativecode-->
<section class="native-bottom container">
<div class="native-bottom__grid">
<article class="nativebotblock">
<h3 class="h4 nativebotblock__title"><img class="nativebotblock__icon" src="/img/features/native-rocket.svg" alt="" /><span>Ready to Start?</span></h3>
<p class="nativebotblock__text">Discover more details about native persistence <br />and configure it&nbsp;for your use-case</p>
<a class="nativebotblock__link arrowlink" href="https://ignite.apache.org/docs/latest/persistence/native-persistence" target="_blank">Native Persistence Usage and Configuration</a>
</article>
<article class="nativebotblock nativebotblock--learn">
<h3 class="h4 nativebotblock__title"><img class="nativebotblock__icon" src="/img/features/native-docs.svg" alt="" /><span>Want to&nbsp;Learn More?</span></h3>
<p class="nativebotblock__text">
Check out the details of&nbsp;native persistence <br />implementation, <a href="https://www.youtube.com/watch?v=6Yg5QW-XFVc&list=PLMc7NR20hA-I2EfyXeaSRHY5dRFtK_NF0&index=6" target="_blank">or&nbsp;watch a&nbsp;video</a>
</p>
<a class="nativebotblock__link arrowlink" href="https://cwiki.apache.org/confluence/display/IGNITE/Ignite+Persistent+Store+-+under+the+hood" target="_blank">Native Persistence Implementation Details</a>
</article>
</div>
</section>
<a class="scrollTop" href="#"
><svg class="feather feather-chevron-up" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="18 15 12 9 6 15"></polyline></svg
></a>
<script src="/js/vendor/hystmodal/hystmodal.min.js"></script>
<script src="/js/vendor/swiper/swiper-bundle.min.js"></script>
<script src="/js/vendor/waypoints.min.js"></script>
<script src="/js/main.js"></script>
</body>
</html>