blob: bac10cd2c8d5358177bd224da6b535a16124573c [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>
<head>
<link rel="canonical" href="https://ignite.apache.org/arch/memorycentric.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>Memory Centric - Apache Ignite</title>
<link media="all" rel="stylesheet" href="/css/all.css?v=1514336028">
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>
<!--#include virtual="/includes/sh.html" -->
</head>
<body>
<div id="wrapper">
<!--#include virtual="/includes/header.html" -->
<main id="main" role="main" class="container">
<section id="memory-centric" class="page-section">
<h1 class="first">Memory-Centric Storage</h1>
<div class="col-sm-12 col-md-12 col-xs-12" style="padding:0 0 20px 0;">
<div class="col-sm-6 col-md-6 col-xs-12" style="padding-left:0; padding-right:0">
<p>
Apache Ignite is based on distributed <i>memory-centric architecture</i> that combines the
performance and scale of in-memory computing together with the disk durability and strong
consistency in one system.
</p>
<p>
The main difference between the memory-centric approach and the traditional disk-centric approach is that
the memory is treated as a fully functional storage, not just as a caching layer, like most databases do.
For example, Apache Ignite can function in a pure in-memory mode, in which case it can be treated as an
In-Memory Database (IMDB) and In-Memory Data Grid (IMDG) in one.
</p>
</div>
<div class="col-sm-6 col-md-6 col-xs-12" style="padding-right:0">
<img class="img-responsive" src="/images/memory-centric.png" width="440px" style="float: right; margin-top: -25px;"/>
</div>
</div>
<p>
On the other hand, when persistence is turned on, Ignite begins to function as a memory-centric system
where most of the processing happens in memory, but the data and indexes get persisted to disk. The main
difference here from the traditional disk-centric RDBMS or NoSQL system is that Ignite is strongly consistent,
horizontally scalable, and supports both SQL and key-value processing APIs.
</p>
<div class="page-heading">Collocated vs Client-Server Processing</div>
<p>
The disk-centric systems, like RDBMS or NoSQL, generally utilize the classic client-server approach, where
the data is brought from the server to the client side where it gets processed and then is usually discarded.
This approach does not scale well as moving the data over the network is the most expensive operation in a distributed system.
</p>
<p>
A much more scalable approach is <b>collocated processing</b> that reverses the flow by bringing the computations to the
servers where the data actually resides. This approach allows you to execute advanced logic or distributed SQL with JOINs
exactly where the data is stored avoiding expensive serialization and network trips.
</p>
<div class="page-heading">Partitioning & Replication</div>
<p>
Depending on the configuration, Ignite can either partition or replicate data across its memory-centric
storage. Unlike <code>REPLICATED</code> mode, where data is fully replicated across all nodes
in the cluster, in <code>PARTITIONED</code> mode Ignite will equally split the data across
multiple cluster nodes, allowing for staring TBs of data both in memory and on disk.
</p>
<div class="page-heading">Redundancy</div>
<p>
Ignite also allows to configure multiple <b>backup copies</b> to guarantee data resiliency
in case of failures.
</p>
<div class="page-heading">Consistency</div>
<p>
Regardless of which replication scheme is used, Ignite guarantees data consistency across
all cluster members.
</p>
<div class="page-heading">Ignite as In-Memory Store</div>
<p>
The persistence is totally optional in Ignite that allows using the cluster in the memory-only mode
where all the data and indexes are stored solely in RAM. In this scenario, you can achieve the maximum
performance possible because the data is never written to disk. To prevent possible data loss when a
single cluster node fails, it is recommended to configure a number of backup copies (aka. replication
factor) appropriately.
</p>
<div class="page-heading">Ignite Persistence</div>
<p>
There are two ways to enable persistence in Ignite. The first approach is to use its own distributed,
ACID, and <nobr>SQL-compliant</nobr> persistence that transparently and efficiently integrates with
overall memory architecture.
</p>
<p>
With the the native persistence enabled, Ignite always stores a superset of data on disk,
and as much as possible in RAM. For example, if there are
100 entries and RAM has the capacity to store only 20, then all 100 will be stored on disk
and only 20 will be cached in RAM for better performance.
</p>
<div class="page-heading">Ignite and 3rd Party Database</div>
<p>
The second approach to have the persistence enabled, is to deploy Ignite above an existing 3rd party database
such as RDBMS, Apache Cassandra or MongoDB. This mode is usually used to accelerate the underlying
database by storing a copy of the data in memory in Ignite. Ignite supports both read-through and
write-through modes that ensure data consistency and keeps Ignite and the database in sync. Refer to
<a href="/arch/persistence.html" target="doc">Ignite persistence</a> page to compare Ignite persistence
vs 3rd Party Persistence modes.
</p>
<div class="page-heading">More on Memory-Centric Storage</div>
<table class="formatted" name="Deployment Options Features">
<thead>
<tr>
<th width="35%" class="left">Feature</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left">Durable Memory</td>
<td>
<p>
Apache Ignite is based on the <nobr>Durable Memory</nobr>
architecture that allows storing and processing data and indexes both in memory and on disk:
</p>
<div class="page-links">
<a href="/arch/durablememory.html">Docs for this feature <i class="fa fa-angle-double-right"></i></a>
</div>
</td>
</tr>
<tr>
<td class="left">Persistence</td>
<td>
<p>
Ignite native persistence is a distributed, ACID, and <nobr>SQL-compliant</nobr> disk store
that transparently integrates with Ignite's durable memory:
</p>
<div class="page-links">
<a href="/arch/persistence.html">Docs for this feature <i class="fa fa-angle-double-right"></i></a>
</div>
</td>
</tr>
<tr>
<td class="left">Partitioning & Replication</td>
<td>
<p>
Depending on the configuration, Ignite can either <i>partition</i> or <i>replicate</i>
data. Unlike <code>REPLICATED</code> mode, where data is fully replicated across
all nodes in the cluster, in <code>PARTITIONED</code> mode Ignite will equally split the data
across multiple cluster nodes.
</p>
<div class="page-links">
<a href="http://apacheignite.readme.io/docs/cache-modes" target="docs">Docs for this Feature <i class="fa fa-angle-double-right"></i></a>
</div>
</td>
</tr>
<tr>
<td class="left">Distributed Database</td>
<td>
<p>
Apache Ignite can be used as all-in-one distributed database that supports SQL, key-value,
compute, machine learning and other data processing APIs:
</p>
<div class="page-links">
<a href="/use-cases/database/distributed-database.html">Docs for this feature <i class="fa fa-angle-double-right"></i></a>
</div>
</td>
</tr>
<tr>
<td class="left">In-Memory Database</td>
<td>
<p>
Apache Ignite can be used as a distributed and horizontally scalable in-memory database (IMDB):
</p>
<div class="page-links">
<a href="/use-cases/database/in-memory-database.html">Docs for this feature <i class="fa fa-angle-double-right"></i></a>
</div>
</td>
</tr>
<tr>
<td class="left">Data Grid</td>
<td>
<p>
Ignite can act as a data grid that is a distributed, transactional key-value store. Unlike
other in-memory data grids (IMDG), Ignite enables storing data both, in memory and on disk,
and therefore is able to store more data than can fit in physical memory:
</p>
<div class="page-links">
<a href="/features/datagrid.html">Docs for this Feature <i class="fa fa-angle-double-right"></i></a>
</div>
</td>
</tr>
<tr>
<td class="left">Database Caching</td>
<td>
<p>
Ignite is used as a caching layer (aka. data grid) above 3rd party databases such as RDBMS,
Apache Cassandra, MongoDB:
</p>
<div class="page-links">
<a href="/use-cases/caching/database-caching.html">Docs for this Feature <i class="fa fa-angle-double-right"></i></a>
</div>
</td>
</tr>
</tbody>
</table>
</section>
</main>
<!--#include virtual="/includes/footer.html" -->
</div>
<!--#include virtual="/includes/scripts.html" -->
</body>
</html>