PG-RAC: PostgreSQL-based Database with Shared Cache for Multi-write Transaction
Single-master is the mainstream architecture of cloud-native databases. In the cluster, the slave node can share the read-only requests of the master node, and the master node processes the write requests. To meet the demands of large-scale transaction processing, on this basis, some of the cloud databases attempt to further extend multi-write transactions. One way to implement a multi-write extension is to implement a shared cache among compute nodes and support cross-node data access. In database systems based on shared cache, the cost of cross-node remote access is much larger than that of local access, so the design of the cache protocol is the key factor affecting the system's performance and scalability. In this study, two innovative improvements to the cache protocol are proposed, and PG-RAC, a shared cache database supporting multi-write transaction processing, is implemented based on PostgreSQL. On the one hand, PG-RAC proposes a new distributed chained routing strategy to distribute routing information among compute nodes. The average transaction latency is reduced by about 20% compared to the routing strategy of single-point directory management. On the other hand, the replica invalidation mechanism is improved, and the invalidation operation is separated from the transaction path, reducing the latency of the critical path in transaction processing. On this basis, PG-RAC utilizes the characteristics of multi-version concurrency control (MVCC) to further propose to delay replica invalidation, effectively improving the cache utilization. The results of the TPC-C experiment show that in a cluster with four compute nodes, the throughput rate is nearly twice that of PostgreSQL and 1.5 times that of the distributed database Citus.
Authors
- Xing Wei (ORCID: https://orcid.org/0000-0002-3543-4189)
- Huiqi Hu (ORCID: https://orcid.org/0000-0001-5220-3166)
- Yaofeng Tu (ORCID: https://orcid.org/0000-0002-2616-2273)
- Hao Shi (ORCID: https://orcid.org/0009-0002-4406-4930)
- Haiying Zhou (ORCID: https://orcid.org/0000-0002-6372-0828)
- Shengchi Liu (ORCID: https://orcid.org/0009-0007-9782-1882)
- Peng Cai (ORCID: https://orcid.org/0000-0002-4755-6511)
- Zeyu Fan (ORCID: https://orcid.org/0009-0004-2431-6285)
- Xuan Zhou (ORCID: https://orcid.org/0000-0003-2044-1818)
- Hong Chen (ORCID: https://orcid.org/0000-0003-1861-1929)
- Yujie Yin
Publication Details
- Journal
- International Journal of Software and Informatics
- Published
- 2025-01-01
- DOI
- https://doi.org/10.21655/ijsi.1673-7288.00345
- Primary Topic
- Distributed and Parallel Computing Systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Natural Science Foundation of Shanghai
- National Natural Science Foundation of China