blob: 5278b73c54421261e3a16e3bd8fddd721188b495 [file] [log] [blame]
extend ../_components/base.pug
block pagetitle
| In-Memory Cache
block css
link(rel="stylesheet", href="../css/native-persistence.css?ver=" + config.version)
link(rel="stylesheet", href="../css/in-memory-cache.css?ver=" + config.version)
block main
- global.pageHref = "usecases"
- config.hdrClassName = "hdr__blue"
include ../_components/header.pug
section.innerhero
.container.innerhero__cont
.innerhero__main.innerhero__main--long
//- .innerhero__pre.pb-5 Apache Ignite
h1.h1.innerhero__h1 Distributed <br>In-Memory Cache<br>
span.with-apache With Apache Ignite
.innerhero__descr.pt-2.h5.
Improve the performance and scalability of&nbsp;your applications, <br>
databases, and microservices with Apache Ignite
.innerhero__action
a.button.innerhero__button(href="https://ignite.apache.org/docs/latest/index") Start Coding
img.innerhero__pic.innerhero__pic--inmemory(src="/img/usecases/in-memory-hero.svg", alt="Distributed In-Memory Cache")
// /.innerhero
section.inmememor1.container
header.blockheader.blockheader--spl.flexi
h2.capstext.pb-3 What Is In-Memory Cache
.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.
// /.inmememor1
section.inmememor-adv
.container
header.blockheader.blockheader--spl.flexi
h2.h4 Advantages of Distributed In-Memory Cache
.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:
.inmememor-adv__wrap
.inmememor-adv__item
h3.h4 Speed
.inmememor-adv__text Memory as a storage layer provides the&nbsp;lowest latency and highest throughput. Laws of physics.
.inmememor-adv__item
h3.h4 Scale
.inmememor-adv__text Horizontal scalability lets you grow the&nbsp;cluster unlimitedly to accommodate <br>data size and throughput.
// /.inmememor-adv
section.inmememor-api.container
header.blockheader.blockheader--spl.flexi
h2.h4.blockheader__left.blockheader__left--full Unlike Standard In-Memory Caches, Apache Ignite <br>Supports Essential Developers APIs
.inmememor-api__wrap.flexi
.inmememor-api__item
img.inmememor-api__icon(src="/img/features/in-memory/01-ACID-Transactions.svg", alt="")
p.fz20.pt-3 ACID transactions <br>to&nbsp;ensure consistency <br>of&nbsp;data
.inmememor-api__item
img.inmememor-api__icon(src="/img/features/in-memory/02-sql.svg", alt="")
p.fz20.pt-3 SQL queries execution
.inmememor-api__item
img.inmememor-api__icon(src="/img/features/in-memory/03-user.svg", alt="")
p.fz20.pt-3 Custom computations, <br>e.g. on Java, available
// /.inmememor-api
section.inmememor2.container
h2.h4 Read-Through / Write-Through Caching
p.fz20.pt-5
strong How It Works
.inmememor2__work.flexi.pt-2
.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.
.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 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.
.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="")
p.fz20
strong How It Works
.inmememor2__work.flexi.pt-3
.inmememor2__left.inmememor2__left--icon
p This strategy is recommended for architectures that need to:
ul.dashlist.pt-1
li accelerate disk-based databases;
li create a shared caching layer across various data sources.
.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 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 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 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.
// /.inmememor2
section.inmememor3.container.pt-5
h2.h4 Cache-Aside Deployment
.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="")
p.fz20.pt-3
strong When It Works
.inmememor2__work.flexi.pt-3
.inmememor2__left
p This strategy works well in two cases:
ul.pt-1
li 1. The cached data is relatively static, i.e. not updated frequently
li 2. A temporary data lag is allowed between the primary store and the cache
.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.
.inmememor3__bottom
h3.fz20 Cach-Aside Deployment And Native Persistence
.inmememor3__botwrap.flexi.pt-3
.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 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.
.inmememor2__right
ul.inmememor3__checklist
li Seconds needed for recovery
li Full copy of cached records is duplicated on disk
li Use any API: SQL, key-value, or scan queries
// /.inmememor3
section.native-bottom.container
.native-bottom__grid
article.nativebotblock
h3.h4.nativebotblock__title
img(src="/img/features/native-rocket.svg", alt="").nativebotblock__icon
span Ready to Start?
p.nativebotblock__text Discover our quick start guide and build your first application in 5-10 minutes
a.nativebotblock__link.arrowlink(href="https://ignite.apache.org/docs/latest/#quick-start-guides ", target="_blank") Quick Start Guide
article.nativebotblock.nativebotblock--learn
h3.h4.nativebotblock__title
img(src="/img/features/native-docs.svg", alt="").nativebotblock__icon
span Want to View More Use-Cases?
p.nativebotblock__text Read In-Memory Data Grid article
a.nativebotblock__link.arrowlink(href="/use-cases/in-memory-data-grid.html", target="_blank") In-Memory Data Grid