blob: 842b19d05924bdc724a6aea7227f54e8ddf0e64f [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>ACID transactions | 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/media.css" media="only screen and (max-width:1199px)" />
<link rel="icon" type="image/png" href="/img/favicon.png" />
<link rel="stylesheet" href="../css/native-persistence.css" />
<link rel="stylesheet" href="../css/acid-transactions.css" />
</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="cmtyhero__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" src="/img/logo-white.svg" alt="" /></a
><a class="button hdr__button" href="/download.html">Download Ignite 2.11 </a>
<nav class="hdrmenu">
<ul class="flexi">
<li><a href="/">Get started</a></li>
<li><a class="hdrmenu__current" 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="///ignite.apache.org/docs/latest/">Docs</a></li>
</ul>
</nav>
</div>
</header>
<header class="hdrfloat">
<div class="cmtyhero__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" 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 href="/">Get started</a></li>
<li><a class="hdrmenu__current" 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="/docs.html">Docs</a></li>
</ul>
</nav>
</div>
</header>
<section class="innerhero">
<div class="container innerhero__cont">
<div class="innerhero__main">
<h1 class="h1 innerhero__h1">Distributed ACID <br />Transactions</h1>
<div class="pt-2 h3">with Apache Ignite</div>
<div class="innerhero__descr pt-4 h5">Classical ACID transactions that let you update distributed data <br />consistently, durably and with in-memory speed</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--acid" src="/img/features/acid/hero.svg" alt="Distributed ACID transactions" />
</div>
</section>
<!-- /.innerhero-->
<section class="acid1 container">
<h2 class="acid1__h2 h4">Update multiple records from different tables that span across many cluster nodes</h2>
<div class="acid1__wrap flexi">
<div class="acid1__item">
<div class="acid1__title fz20">Consistency</div>
<div class="acid1__text pt-3"><p>Ignite transactional APIs are used by&nbsp;banks to&nbsp;implement payments services that transfer money between accounts in&nbsp;real-time.</p></div>
</div>
<div class="acid1__item">
<div class="acid1__title fz20">Durability</div>
<div class="acid1__text pt-3"><p>Multi-tier storage persists changes durably to&nbsp;disk. Committed transactions always survive failures, incomplete transactions are rolled back.</p></div>
</div>
<div class="acid1__item">
<div class="acid1__title fz20">Fault-Tolerance</div>
<div class="acid1__text pt-3"><p>The transactional engine avoids inconsistencies even if&nbsp;your transaction is&nbsp;failed in&nbsp;the middle of&nbsp;a&nbsp;commit.</p></div>
</div>
</div>
</section>
<!-- /.acid1-->
<section class="acid2 container">
<h2 class="acid2__h2">
To guarantee data consistency, durability and fault-tolerance<br />
<strong>Ignite implements the two-phase commit protocol</strong>
</h2>
<div class="acid2__wrap flexi pt-5">
<div class="acid2__main">
<p>In distributed systems, a transaction usually spans across multiple cluster nodes.</p>
<p>To handle possible distributed failures properly and avoid data inconsistencies cluster-wide, a two-phase commit protocol (2PC) is used.</p>
<h3 class="acid2__subtitle h5 pb-2">How ACID transactions work</h3>
<p>Whenever the records get updated within a&nbsp;transaction, Ignite keeps the transactional state in&nbsp;a&nbsp;local transaction map until the changes are committed.</p>
<p>At&nbsp;which point, the data is&nbsp;transferred to&nbsp;the participating remote nodes. Only the nodes that hold primary or&nbsp;backup copies of&nbsp;the data participate in&nbsp;the transaction.</p>
<p>If&nbsp;a&nbsp;transaction is&nbsp;mapped to&nbsp;a&nbsp;single node, then, Ignite optimizes the transaction execution by&nbsp;switching to&nbsp;the one-phase-commit (1PC) protocol.</p>
</div>
<aside class="acid2__right"><img class="acid2__funcimg" src="/img/features/acid/acid-func.svg" alt="" /></aside>
</div>
</section>
<!-- /.acid2-->
<section class="acid3 container pt-5">
<h2 class="h4 acid3__title">Records are updated consistently across <br />memory and disk tiers</h2>
<div class="acid3__wrap pt-5 flexi">
<div class="acid3__col">
<h3 class="h5 pb-2">Transactions with Ignite native persistence</h3>
<p class="fz20 acid3__collead">In case of any failure you can always recover to a consistent state</p>
<div class="acid3__small pt-4">
<p>
When native persistence mode is&nbsp;enabled and Apache Ignite is&nbsp;used as&nbsp;a&nbsp;database that scales beyond available memory capacity, the distributed transactions update data across memory and disk
in&nbsp;a&nbsp;consistent way.
</p>
<p>
All the changes stay durable, because they are written to&nbsp;the write-ahead log (WAL) files. It&nbsp;guarantees data consistency even if&nbsp;the cluster or&nbsp;individual nodes go&nbsp;down in&nbsp;the middle
of&nbsp;a&nbsp;transaction.
</p>
</div>
<a class="acid3__detlink" href="#" data-hideopen="acidbox"> WAL in details</a>
<div class="acid3__detwrap" data-hidebox="acidbox">
<div class="acid3__detmore">
<button class="acid3__close" data-hideopen="acidbox"><img src="/img/features/acid/icon-cross.svg" alt="" /></button>
<p>The purpose of&nbsp;the WAL is&nbsp;to&nbsp;propagate updates to&nbsp;the disk in&nbsp;the append-only mode, which is&nbsp;the fastest way to&nbsp;persist data to&nbsp;disk.</p>
<p class="pt-1">
The WAL provides a&nbsp;recovery mechanism for failure scenarios when a&nbsp;single node or&nbsp;the whole cluster goes down. A&nbsp;cluster can always be&nbsp;recovered to&nbsp;the latest successfully committed transaction.
</p>
</div>
</div>
</div>
<div class="acid3__col">
<h3 class="h5 pb-2">Transactions with external databases</h3>
<p class="fz20 acid3__collead">Your transactions will be updated both i&nbsp;external database and Apache Ignite</p>
<div class="acid3__small pt-4">
<p>
When Apache Ignite is&nbsp;used as&nbsp;a&nbsp;caching layer for an&nbsp;external database, such as&nbsp;RDBMS, transactions span the cached data in&nbsp;Ignite as&nbsp;well as&nbsp;the data persisted in&nbsp;a&nbsp;database
supporting transactional APIs.
</p>
<p>
For instance, if&nbsp;a&nbsp;relational database is&nbsp;configured as&nbsp;a&nbsp;disk tier, Ignite writes the transactional changes to&nbsp;the database before sending a&nbsp;commit message to&nbsp;participating cluster
nodes.
</p>
<p>This way, if&nbsp;a&nbsp;transaction fails at&nbsp;the database level, Ignite can still send the rollback message to&nbsp;the cluster nodes, keeping the data consistent across memory and disk tiers.</p>
</div>
</div>
</div>
</section>
<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">Create your transactional application <br />with Apache Ignite</p>
<a class="nativebotblock__link arrowlink" href="https://ignite.apache.org/docs/latest/key-value-api/transactions" target="_blank">Performing ACID Transactions</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">Ignite&nbsp;3.0 advances its replication and transactional components with the support of&nbsp;the <strong>Raft consensus algorithm</strong></p>
<a class="nativebotblock__link arrowlink" href="https://cwiki.apache.org/confluence/display/IGNITE/IEP-61%3A+Common+Replication+Infrastructure" target="_blank">Ignite 3.0 and Raft 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>