blob: 24042afeecbf034290107d60f8af2a804c14d300 [file] [log] [blame]
extend ../_components/base.pug
block pagetitle
| In-Memory Cache
block css
link(rel="stylesheet", href="../css/native-persistence.css")
link(rel="stylesheet", href="../css/in-memory-cache.css")
block main
- global.pageHref = "usecases"
- config.hdrClassName = "hdr__blue"
include ../_components/header.pug
//- .innerhero__pre.pb-5 Apache Ignite
h1.h1.innerhero__h1 Distributed <br>In-Memory Cache<br>
span.with-apache With Apache Ignite
Improve the performance and scalability of&nbsp;your applications, <br>
databases, and microservices with Apache Ignite
a.button.innerhero__button(href="") Start Coding
img.innerhero__pic.innerhero__pic--inmemory(src="/public/img/usecases/in-memory-hero.svg", alt="Distributed In-Memory Cache")
// /.innerhero
h2.capstext.pb-3 What Is In-Memory Cache
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
h2.h4 Advantages of Distributed In-Memory Cache
A distributed in-memory cache is <strong>the most straightforward and scalable</strong> way to accelerate your existing applications and databases, thanks to:
h3.h4 Speed
.inmememor-adv__text Memory as a storage layer provides the&nbsp;lowest latency and highest throughput. Laws of physics.
h3.h4 Scale
.inmememor-adv__text Horizontal scalability lets you grow the&nbsp;cluster unlimitedly to accommodate <br>data size and throughput.
// /.inmememor-adv
h2.h4.blockheader__left.blockheader__left--full Unlike Standard In-Memory Caches, Apache Ignite <br>Supports Essential Developers APIs
img.inmememor-api__icon(src="/public/img/features/in-memory/01-ACID-Transactions.svg", alt="") ACID transactions <br>to&nbsp;ensure consistency <br>of&nbsp;data
img.inmememor-api__icon(src="/public/img/features/in-memory/02-sql.svg", alt="") SQL queries execution
img.inmememor-api__icon(src="/public/img/features/in-memory/03-user.svg", alt="") Custom computations, <br>e.g. on Java, available
// /.inmememor-api
h2.h4 Read-Through / Write-Through Caching
strong How It Works
em The read-through/write-through caching strategy can be <br>classified as&nbsp;an&nbsp;in-memory, data-grid type of&nbsp;deployment.
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.
source(media="(min-width: 1024px)", srcset="/public/img/features/in-memory/write-through-caching.svg", sizes="")
img(src="/public/img/features/in-memory/write-through-caching-mob.svg", alt="")
strong How It Works
p This strategy is recommended for architectures that need to:
li accelerate disk-based databases;
li create a shared caching layer across various data sources.
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
h2.h4 Cache-Aside Deployment
source(media="(min-width: 1024px)", srcset="/public/img/features/in-memory/cache-aside-deployment.svg", sizes="")
img(src="/public/img/features/in-memory/cache-aside-deployment-mob.svg", alt="")
strong When It Works
p This strategy works well in two cases:
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
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.
h3.fz20 Cach-Aside Deployment And Native Persistence
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.
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
img(src="/public/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=" ", target="_blank") Quick Start Guide
img(src="/public/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