| <!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/native-persistence.css" /> |
| <link rel="stylesheet" href="../css/acid-transactions.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__current 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"> |
| <div class="innerhero__pre pb-5">Apache Ignite</div> |
| <h1 class="h1 innerhero__h1">Distributed ACID <br />Transactions</h1> |
| <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 banks to implement payments services that transfer money between accounts in 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 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 your transaction is failed in the middle of a 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 transaction, Ignite keeps the transactional state in a local transaction map until the changes are committed.</p> |
| <p>At which point, the data is transferred to the participating remote nodes. Only the nodes that hold primary or backup copies of the data participate in the transaction.</p> |
| <p>If a transaction is mapped to a single node, then, Ignite optimizes the transaction execution by switching to 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 enabled and Apache Ignite is used as a database that scales beyond available memory capacity, the distributed transactions update data across memory and disk |
| in a consistent way. |
| </p> |
| <p> |
| All the changes stay durable, because they are written to the write-ahead log (WAL) files. It guarantees data consistency even if the cluster or individual nodes go down in the middle |
| of a 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 the WAL is to propagate updates to the disk in the append-only mode, which is the fastest way to persist data to disk.</p> |
| <p class="pt-1"> |
| The WAL provides a recovery mechanism for failure scenarios when a single node or the whole cluster goes down. A cluster can always be recovered to 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 external database and Apache Ignite</p> |
| <div class="acid3__small pt-4"> |
| <p> |
| When Apache Ignite is used as a caching layer for an external database, such as RDBMS, transactions span the cached data in Ignite as well as the data persisted in a database |
| supporting transactional APIs. |
| </p> |
| <p> |
| For instance, if a relational database is configured as a disk tier, Ignite writes the transactional changes to the database before sending a commit message to participating cluster |
| nodes. |
| </p> |
| <p>This way, if a transaction fails at the database level, Ignite can still send the rollback message to 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 Learn More?</span></h3> |
| <p class="nativebotblock__text">Ignite 3.0 advances its replication and transactional components with the support of 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> |