In distributed transaction processing, atomic commit protocol (ACP) is used to ensure database consistency. With the use of commodity compute nodes and networks, failures such as system crashes and network partitioning are common. It is therefore important for ACP to dynamically adapt to the operating condition for efficiency while ensuring the consistency of the database. Existing ACPs often assume stable operating conditions, hence, they are either non-generalizable to different environments or slow in practice. In this paper, we propose a novel and practical ACP, called Failure-Aware Atomic Commit (FLAC). In essence, FLAC includes three sub-protocols, which are specifically designed for three different environments: (i) no failure occurs, (ii) participant nodes might crash but there is no delayed connection, or (iii) both crashed nodes and delayed connection can occur. It models these environments as the failure-free, crash-failure, and network-failure robustness levels. During its operation, FLAC can monitor if any failure occurs and dynamically switch to operate the most suitable sub-protocol, using a robustness level state machine, whose parameters are fine-tuned by reinforcement learning. Consequently, it improves both the response time and throughput, and effectively handles nodes distributed across the Internet where crash and network failures might occur. We implement FLAC in a distributed transactional key-value storage system based on Google Percolator and evaluate its performance with both a micro benchmark and a macro benchmark of real workload. The results show that FLAC achieves up to 2.22x throughput improvement and 2.82x latency speedup, compared to existing ACPs for high-contention workloads.
翻译:在分布式事务处理中,原子提交协议(ACP)用于确保数据库一致性。由于使用了通用计算节点和网络,系统崩溃和网络分区等故障十分常见。因此,ACP需要在保证数据库一致性的前提下,动态适应运行环境以提高效率。现有ACP通常假设运行环境稳定,因此要么无法泛化到不同场景,要么在实际中性能缓慢。本文提出了一种新颖且实用的ACP——故障感知原子提交协议(FLAC)。本质上,FLAC包含三个子协议,分别针对三种不同环境设计:(i)无故障发生,(ii)参与节点可能崩溃但无连接延迟,或(iii)同时存在节点崩溃和连接延迟。它将这三种环境建模为无故障、崩溃故障和网络故障鲁棒性等级。在运行过程中,FLAC可通过监测故障发生,并利用强化学习微调参数的鲁棒性等级状态机,动态切换至最合适的子协议。因此,该方法提升了响应时间和吞吐量,并能有效处理跨越互联网且可能发生崩溃和网络故障的分布式节点。我们在基于Google Percolator的分布式事务键值存储系统中实现了FLAC,并通过微基准测试和真实工作负载宏基准测试评估其性能。结果表明,在高竞争工作负载下,与现有ACP相比,FLAC的吞吐量提升高达2.22倍,延迟加速比达2.82倍。