Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

TALK OVERVIEW 1.What is AlloyDB? 2.Why would I use AlloyDB? 3.How does AlloyDB work? 4.What is the AlloyDB Auth Proxy? 5.Demo - Integrating AlloyDB with GKE

Slide 3

Slide 3 text

WHAT IS ALLOYDB? 1

Slide 4

Slide 4 text

4 ANSWER • “Classic” PostgreSQL with modified kernel • Provides standard PostgreSQL API • Utilises Google’s infrastructure • Optimised for transactional and analytical workloads “AlloyDB is a fully-managed, PostgreSQL-compatible database for demanding transactional and analytical workloads.”1 1. https://cloud.google.com/alloydb/docs/overview

Slide 5

Slide 5 text

WHY WOULD I USE ALLOYDB? 2

Slide 6

Slide 6 text

6 KEY BENEFITS • More than 4x faster for transactional workloads • Up to 100x faster for analytical queries • Enables dynamic vertical & horizontal scaling • Automatic protection from zonal failures • Fast creation of read replicas • Fast restart recovery • Backups don’t impact db layer performance & resources • Managed service, 99.99% uptime SLA - including maintenance Over “vanilla” PostgreSQL

Slide 7

Slide 7 text

HOW DOES ALLOYDB WORK? 3

Slide 8

Slide 8 text

8 DESIGN OVERVIEW • Compute & storage disaggregated • Shared data store • DB layer only writes logs • Dynamic vertical scalability • Dynamic horizontal scalability of replicas • Fast read replica creation • DB layer not impacted by Backups Image Credits: Google1 1. https://cloud.google.com/blog/products/databases/alloydb-for-postgresql-intelligent-scalable-storage?hl=en

Slide 9

Slide 9 text

9 DESIGN OVERVIEW • Distributed storage layer • High transaction throughput through very fast WAL • Seamlessly scalable log processing service (LPS) • Asynchronous log record processing (once per zone) • Very fast system restarts • Sharded block storage • Zonal failure protection Image Credits: Google1 1. https://cloud.google.com/blog/products/databases/alloydb-for-postgresql-intelligent-scalable-storage?hl=en

Slide 10

Slide 10 text

10 DESIGN OVERVIEW • Intelligent caching • In-memory buffer cache for all instances and LPS • Additionally ultra-fast block cache for instances (hardware component) • WAL record streams to keep read replica caches up to date Image Credits: Google1 1. https://cloud.google.com/blog/products/databases/alloydb-for-postgresql-intelligent-scalable-storage?hl=en

Slide 11

Slide 11 text

11 A WRITE OPERATION • Statement issued by client • Cached data updated • WAL record prepared • WAL record saved synchronously on transaction commit • WAL record streamed to read replicas • WAL records applied asynchronously to referenced blocks Image Credits: Google1 1. https://cloud.google.com/blog/products/databases/alloydb-for-postgresql-intelligent-scalable-storage?hl=en

Slide 12

Slide 12 text

12 A READ OPERATION • Query sent to any instance • Standard PostgreSQL query- parsing, planning & processing • Required data blocks in cache? • No => Request from LPS • Data in LPS buffer cache? • No => Load from block storage • Data up to date? • No => stalled until redo- processing block completed (rare) Image Credits: Google1 1. https://cloud.google.com/blog/products/databases/alloydb-for-postgresql-intelligent-scalable-storage?hl=en

Slide 13

Slide 13 text

13 REPLICATION • Data partitioned into shards • Shard-replication across three zones • Shard handled by one LPS • LPS can handle multiple shards • Extremely fast re-assignment • Re-assignment invisible to db layer • Zonal failures completely handled by storage layer • Standby for primary instance possible (for high availability) Image Credits: Google1 1. https://cloud.google.com/blog/products/databases/alloydb-for-postgresql-intelligent-scalable-storage?hl=en

Slide 14

Slide 14 text

14 CROSS REGION REPLICATION & BACKUPS • Readonly cluster replica in another region [Pre-GA] • Enables disaster recovery • Enables geographic load balancing • Can help decrease latency • “Promotion” possible • On-demand backups • Automated backups according to defined schedule • Continuous backups (PITR) [Pre-GA] Image Credits: Google1 1. https://cloud.google.com/blog/products/databases/alloydb-for-postgresql-intelligent-scalable-storage?hl=en

Slide 15

Slide 15 text

15 SUPPORTED EXTENSIONS • Supports common extensions like • hypopg • pgaudit • pg_stat_statements • PostGIS • Provides product specific extensions like google_columnar_engine • Some extensions require setting certain database flags

Slide 16

Slide 16 text

16 THE COLUMNAR ENGINE EXTENSION • Installed per default in template1 • Requires explicit activation via database flag • Keeps certain data in columnar format in memory • Enables columnar and hybrid execution plans • Uses ML to determine data to keep in columnar format • Significantly increases performance of OLAP & HTAP Image Credits: Google1 1. https://cloud.google.com/blog/products/databases/alloydb-for-postgresql-columnar-engine?hl=en

Slide 17

Slide 17 text

17 THE COLUMNAR ENGINE EXTENSION • Creates and uses column specific metadata • Uses ML to determine metadata and data format • Utilizes metadata and vector processing instructions (SIMD) • Increases analytical query performance by up to 100x as measured by Google based on the SSB (scale 10, 16 vCPU AlloyDB instance) Image Credits: Google1 1. https://cloud.google.com/blog/products/databases/alloydb-for-postgresql-columnar-engine?hl=en

Slide 18

Slide 18 text

WHAT IS THE ALLOYDB AUTH PROXY? 4

Slide 19

Slide 19 text

19 THE AUTH PROXY • Lightweight Go application • Encrypts data traffic • Enables IAM based authorisation • Deploy on VM or as sidecar • Could become SPOF on VM • As sidecar availability needs to be assured • Application-authorisation through workload identity And what to mind using it in GKE

Slide 20

Slide 20 text

DEMO - INTEGRATING ALLOYDB WITH GKE 5

Slide 21

Slide 21 text

THANK YOU! POSEDIO GMBH +43 660 9154419 [email protected] Weyringergasse 1-3, 1040 Wien, 
 Millenium Park 4, 6980 Lustenau www.posedio.com