blob: 0850dea0434fad751a21948b2e11f032ff540f2d [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>In-Memory Cache | 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="../css/in-memory-cache.css" />
<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--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 innerhero__main--long">
<h1 class="h1 innerhero__h1">Distributed <br />In-Memory Cache<br /><span class="with-apache">With Apache Ignite</span></h1>
<div class="innerhero__descr pt-2 h5">
Improve the performance and scalability of&nbsp;your applications, <br />
databases, and microservices with Apache Ignite
</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--inmemory" src="/img/usecases/in-memory-hero.svg" alt="Distributed In-Memory Cache" />
</div>
</section>
<!-- /.innerhero-->
<section class="inmememor1 container">
<header class="blockheader blockheader--spl flexi">
<h2 class="capstext pb-3">What Is In-Memory Cache</h2>
<div class="inmememor1__text">
<p>In-memory cache is&nbsp;a&nbsp;storage layer placed between applications and databases. The cache keeps your hot data in&nbsp;memory to&nbsp;offload existing databases and accelerate applications.</p>
</div>
</header>
</section>
<!-- /.inmememor1-->
<section class="inmememor-adv">
<div class="container">
<header class="blockheader blockheader--spl flexi">
<h2 class="h4">Advantages of Distributed In-Memory Cache</h2>
<div class="blockheader__right fz20">A distributed in-memory cache is <strong>the most straightforward and scalable</strong> way to accelerate your existing applications and databases, thanks to:</div>
</header>
<div class="inmememor-adv__wrap">
<div class="inmememor-adv__item">
<h3 class="h4">Speed</h3>
<div class="inmememor-adv__text">Memory as a storage layer provides the&nbsp;lowest latency and highest throughput. Laws of physics.</div>
</div>
<div class="inmememor-adv__item">
<h3 class="h4">Scale</h3>
<div class="inmememor-adv__text">Horizontal scalability lets you grow the&nbsp;cluster unlimitedly to accommodate <br />data size and throughput.</div>
</div>
</div>
</div>
</section>
<!-- /.inmememor-adv-->
<section class="inmememor-api container">
<header class="blockheader blockheader--spl flexi">
<h2 class="h4 blockheader__left blockheader__left--full">Unlike Standard In-Memory Caches, Apache Ignite <br />Supports Essential Developers APIs</h2>
</header>
<div class="inmememor-api__wrap flexi">
<div class="inmememor-api__item">
<img class="inmememor-api__icon" src="/img/features/in-memory/01-ACID-Transactions.svg" alt="" />
<p class="fz20 pt-3">ACID transactions <br />to&nbsp;ensure consistency <br />of&nbsp;data</p>
</div>
<div class="inmememor-api__item">
<img class="inmememor-api__icon" src="/img/features/in-memory/02-sql.svg" alt="" />
<p class="fz20 pt-3">SQL queries execution</p>
</div>
<div class="inmememor-api__item">
<img class="inmememor-api__icon" src="/img/features/in-memory/03-user.svg" alt="" />
<p class="fz20 pt-3">Custom computations, <br />e.g. on Java, available</p>
</div>
</div>
</section>
<!-- /.inmememor-api-->
<section class="inmememor2 container">
<h2 class="h4">Read-Through / Write-Through Caching</h2>
<p class="fz20 pt-5"><strong>How It Works</strong></p>
<div class="inmememor2__work flexi pt-2">
<div class="inmememor2__left">
<p>
<em>The read-through/write-through caching strategy can be <br />classified as&nbsp;an&nbsp;in-memory, data-grid type of&nbsp;deployment.</em>
</p>
</div>
<div class="inmememor2__right">
<p>When Apache Ignite is&nbsp;deployed as&nbsp;a&nbsp;data grid, the application layer begins to&nbsp;treat Ignite as&nbsp;the primary store.</p>
<p>As&nbsp;applications write to&nbsp;and read from the data grid, Ignite ensures that all underlying external databases stay updated and are consistent with the in-memory data.</p>
</div>
</div>
<div class="inmememor2__picwrap">
<picture
><source media="(min-width: 1024px)" srcset="/img/features/in-memory/write-through-caching.svg" sizes="" />
<img src="/img/features/in-memory/write-through-caching-mob.svg" alt=""
/></picture>
</div>
<p class="fz20"><strong>How It Works</strong></p>
<div class="inmememor2__work flexi pt-3">
<div class="inmememor2__left inmememor2__left--icon">
<p>This strategy is recommended for architectures that need to:</p>
<ul class="dashlist pt-1">
<li>accelerate disk-based databases;</li>
<li>create a shared caching layer across various data sources.</li>
</ul>
</div>
<div class="inmememor2__right">
<p>Ignite integrates with many databases out-of-the-box and, in&nbsp;write-through or&nbsp;write-behind mode, can synchronize all changes to&nbsp;the databases.</p>
<p>The strategy also applies to&nbsp;ACID&nbsp;transactions: Ignite will coordinate and commit a&nbsp;transaction across its in-memory cluster as&nbsp;well as&nbsp;to&nbsp;a&nbsp;relational database.</p>
<p>Read-through capability implies that, if&nbsp;a&nbsp;record is&nbsp;missing from memory, a&nbsp;cache can read the data from an&nbsp;external database. Ignite fully supports this capability for key-value APIs.</p>
<p>When you use Ignite SQL, you must preload the dataset into memory&mdash;because Ignite SQL can query on-disk data only if&nbsp;the data is&nbsp;stored in&nbsp;native persistence.</p>
</div>
</div>
</section>
<!-- /.inmememor2-->
<section class="inmememor3 container pt-5">
<h2 class="h4">Cache-Aside Deployment</h2>
<div class="inmememor2__picwrap">
<picture
><source media="(min-width: 1024px)" srcset="/img/features/in-memory/cache-aside-deployment.svg" sizes="" />
<img src="/img/features/in-memory/cache-aside-deployment-mob.svg" alt=""
/></picture>
</div>
<p class="fz20 pt-3"><strong>When It Works</strong></p>
<div class="inmememor2__work flexi pt-3">
<div class="inmememor2__left">
<p>This strategy works well in two cases:</p>
<ul class="pt-1">
<li>1. The cached data is relatively static, i.e. not updated frequently</li>
<li>2. A temporary data lag is allowed between the primary store and the cache</li>
</ul>
</div>
<div class="inmememor2__right">
<p>It&rsquo;s usually assumed that changes will be&nbsp;fully replicated eventually and, <br />thus, the cache and the primary store will become consistent.</p>
</div>
</div>
<div class="inmememor3__bottom">
<h3 class="fz20">Cach-Aside Deployment And Native Persistence</h3>
<div class="inmememor3__botwrap flexi pt-3">
<div class="inmememor2__left">
<p>
When Apache Ignite is&nbsp;deployed in&nbsp;a&nbsp;cache-aside configuration, its native persistence can be&nbsp;used as&nbsp;a&nbsp;disk store for Ignite datasets.
<a href="/arch/native-persistence.html">Native persistence</a> allows for elimination of&nbsp;the time-consuming cache warm-up step.
</p>
<p>
As&nbsp;native persistence maintains a&nbsp;full copy of&nbsp;data on&nbsp;disk, you can cache a&nbsp;subset of&nbsp;records in&nbsp;memory. If&nbsp;a&nbsp;required data record is&nbsp;missing from memory, then Ignite reads
the record from the disk automatically, regardless of&nbsp;which API you use&nbsp;&mdash; whether SQL, key-value, or&nbsp;scan queries.
</p>
</div>
<div class="inmememor2__right">
<ul class="inmememor3__checklist">
<li>Seconds needed for recovery</li>
<li>Full copy of cached records is duplicated on disk</li>
<li>Use any API: SQL, key-value, or scan queries</li>
</ul>
</div>
</div>
</div>
</section>
<!-- /.inmememor3-->
<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 our quick start guide and build your first application in 5-10 minutes</p>
<a class="nativebotblock__link arrowlink" href="https://ignite.apache.org/docs/latest/#quick-start-guides " target="_blank">Quick Start Guide </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 View More Use-Cases?</span></h3>
<p class="nativebotblock__text">Read In-Memory Data Grid article</p>
<a class="nativebotblock__link arrowlink" href="/use-cases/in-memory-data-grid.html" target="_blank">In-Memory Data Grid</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>