Data replication is a critical aspect of data center design, as it ensures high availability, scalability, and fault tolerance. However, replicas need to be coordinated to maintain convergence and database integrity constraints under transactional workloads. Commutative Replicated Data Types (RDTs) provide convergence for conflict-free objects using relaxed consistency, and Well-coordinated Replicated Data Types (WRDTs) provide convergence and integrity for general objects using a hybrid model, relaxed when possible and strong when necessary. While state-of-the-art hardware acceleration of RDT uses Remote Direct Memory Access (RDMA), we observe that trends towards lower latency and higher throughput have driven recent data center architectures to leverage FPGAs as application accelerators. In contrast to deploying an FPGA-based Smart NIC, this paper connects an FPGA accelerator card directly to the network, which allows a complete redesign of the NIC to match the needs of the FPGA-hosted application. We co-design a network-attached FPGA replication engine with an FPGA-resident network interface, enabling near-network execution of replicated transactions and direct invocation of FPGA-resident operators. Following this approach, we introduce SafarDB, FPGA-accelerated Conflict-Free Replicated Data Types (CRDTs) and WRDTs. SafarDB accelerates both relaxed and strongly ordered replication paths; when strong ordering is required, SafarDB accelerates the underlying consensus control path. SafarDB improves CRDT latency and throughput by 7.0X and 5.3X, and WRDT latency and throughput by 12X and 6.8X compared to a state-of-the-art RDMA-based implementation. Further, experiments demonstrate that SafarDB is more resilient to crash-failures than existing CPU/RDMA-based CRDT and WRDT implementations, and SafarDB can detect leader failures and elect new leaders much faster than previously possible.
翻译:数据复制是数据中心设计的关键环节,它能确保高可用性、可扩展性和容错性。然而,在事务型工作负载下,需要协调副本以维持收敛性和数据库完整性约束。可交换复制数据类型(RDT)通过宽松一致性为无冲突对象提供收敛性,而协调良好的复制数据类型(WRDT)则采用混合模型为通用对象提供收敛性和完整性——在可能时采用宽松一致性,必要时采用强一致性。虽然当前最先进的RDT硬件加速方案采用远程直接内存访问(RDMA),但我们观察到,追求更低延迟和更高吞吐量的趋势已推动近期数据中心架构采用FPGA作为应用加速器。与部署基于FPGA的智能网卡不同,本文将FPGA加速卡直接连接至网络,使得能够完全重新设计网卡以满足FPGA托管应用的需求。我们协同设计了搭载FPGA驻留网络接口的网络连接FPGA复制引擎,实现了复制事务的近网络执行和FPGA驻留算子的直接调用。基于此方法,我们提出了SafarDB——基于FPGA加速的无冲突复制数据类型(CRDT)和WRDT。SafarDB同时加速宽松排序和强排序的复制路径;当需要强排序时,SafarDB会加速底层的共识控制路径。与当前最先进的基于RDMA的实现方案相比,SafarDB将CRDT的延迟和吞吐量分别提升了7.0倍和5.3倍,将WRDT的延迟和吞吐量分别提升了12倍和6.8倍。此外,实验表明SafarDB比现有的基于CPU/RDMA的CRDT和WRDT实现方案具有更强的崩溃故障恢复能力,并且能够以远超以往的速度检测领导者故障并选举新领导者。