Demonstrating Transactional Correctness in Failure Situations
Guaranteeing correct ACID transactions in a distributed database is a primary goal of Fauna. This is especially true in cases of network partition, node, and/or data center loss. This short video demo will show how Fauna maintains its guarantee of strictly serializable transactions in the case of a lost data-center. This is a worst-case scenario and demonstrates several of the major classes of failure likely to occur.
This short video demo will show how Fauna maintains its guarantee of strictly serializable transactions in the case of a lost data-center.
The demo simulates a distributed Fauna cluster running in 3 data-centers. The workload is that of a simple ledger. Each transaction will read the balance of both the customer, who is the source, and the customer who will receive the transfer. A validation calculation will be made to ensure the source customer has sufficient funds. Finally, the transaction will be written and the balances of the source and destination customer will be updated. Each transaction thus comprises 5 operations: two reads, a write/create, and two updates. These have to execute as a single atomic transaction.
Each transaction thus comprises 5 operations: two reads, a write/create, and two updates. These have to execute as a single atomic transaction.
The simulation randomly writes transactions to one of the available data centers. After a constant number of transactions, a random node is chosen and an aggregate of all the customer balances is calculated. Since all reads are local in Fauna, this is a good way to demonstrate how all nodes are in a consistent state.
Finally, one of the datacenters is taken down for a period of time and then recovered. As you will see in the demo, the loss of the data center is gracefully handled by the cluster. More importantly, you will see that at no time does the state of the system mishandle a transaction or in any way cause the customer balances to enter into an inconsistent state.
As you will see in the demo, the loss of the data center is gracefully handled by the cluster.
If you have a workload that would benefit from Fauna’s distributed ACID transactions, you should take a test drive or contact us to get a better understanding of how Fauna delivers this game-changing functionality.
If you enjoyed our blog, and want to work on systems and challenges related to globally distributed systems, serverless databases, GraphQL, and Jamstack, Fauna is hiring!
Subscribe to Fauna blogs & newsletter
Get latest blog posts, development tips & tricks, and latest learning material delivered right to your inbox.