Parse Google’s PostgreSQL-compatible cloud native database – the storage layer of AlloyDB

2022/05/15 – Analysis of Google’s PostgreSQL-compatible cloud native database AlloyDB

At the Google I/O 2022 conference, Google Cloud released AlloyDB (Note: Alloy means alloy), a cloud-native database compatible with the PostgreSQL standard, which claims to be twice as fast as Amazon’s similar products (Aurora?). , it shouldn’t be enough to make it migrate, but it does have some appeal for new users.

Since the author mainly does storage, the following is based on Google ‘s blog post introducing the AlloyDB storage layer, and analyzes the AlloyDB storage layer architecture to see how bright its design is.

Overall structure

On the whole, AlloyDB is divided into Database layer and storage layer . Among them, the DB layer is compatible with the PostgreSQL protocol, parses SQL statements, converts them into read and write requests, and sends them to the storage layer. For the storage layer, it can be subdivided into three layers:

  1. log storage layer : The DB layer converts writes into operational logs, or WAL writes to the storage layer. log storage is responsible for the efficient writing and storage of these log records.
  2. LPS layer : Log Processing Service, LPS, log processing service layer, consume WAL of log storage layer, and generate Block, which is essentially a materialized process.
  3. Block storage layer : corresponds to the block layer of stand-alone PostgreSQL, which is used for service queries, provides parallelism through sharding , and ensures cross-region fault tolerance through replication .

database-storage.png

This article is reprinted from https://www.qtmuniao.com/2022/05/15/google-alloydb-storage/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment