Ngân hàng đề — Google Cloud Professional Cloud Database Engineer

Tìm thấy 169 câu.

Câu 131
Your company's mission-critical, globally available application is supported by a Cloud Spanner database. Experienced users of the application have read and write access to the database, but new users are assigned read-only access to the database. You need to assign the appropriate Cloud Spanner Identity and Access Management (IAM) role to new users being onboarded soon. What roles should you set up?
  1. A roles/spanner.databaseReader
  2. B roles/spanner.databaseUser
  3. C roles/spanner.viewer
  4. D roles/spanner.backupWriter
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi này tập trung vào Google Cloud Spanner (một dịch vụ cơ sở dữ liệu phân tán, có khả năng mở rộng toàn cầu với tính nhất quán mạnh mẽ), không phải AWS như mô tả ban đầu (có thể là nhầm lẫn). Ứng dụng quan trọng của công ty sử dụng Cloud Spanner làm backend, nơi:

  • Người dùng có kinh nghiệm: Có quyền đọc và ghi (read/write) vào database.
  • Người dùng mới: Chỉ cần quyền đọc-only (read-only) để truy cập database.

Nhiệm vụ là gán IAM role phù hợp cho người dùng mới sắp onboard, đảm bảo họ chỉ có quyền đọc dữ liệu trong database cụ thể, không thể ghi hoặc thay đổi gì. Điều này giúp tuân thủ nguyên tắc least privilege (quyền hạn tối thiểu) trong IAM của Google Cloud. ✅

✅ Đáp án đúng: roles/spanner.databaseReader

Lý do lựa chọn:

  • Role này chính xác cấp quyền đọc-only cho một database cụ thể trong Cloud Spanner. Người dùng mới có thể thực hiện các truy vấn SELECT để đọc dữ liệu, nhưng không thể INSERT, UPDATE, DELETE hoặc thực hiện bất kỳ thay đổi nào.
  • Đây là role được thiết kế dành riêng cho truy cập dữ liệu đọc-only ở mức database, phù hợp hoàn hảo với yêu cầu "read-only access to the database" cho người dùng mới.
  • Theo tài liệu chính thức Google Cloud (cập nhật đến 2024-2026), role này không ảnh hưởng đến metadata hoặc các tài nguyên khác, đảm bảo an toàn và cô lập. 🛡️

📋 Giải thích chi tiết tất cả các phương án (dựa trên IAM roles của Cloud Spanner mới nhất)

  • roles/spanner.databaseReader
    ✅ Đúng: Như đã giải thích, role này cung cấp quyền đọc dữ liệu (SELECT) trên database cụ thể, lý tưởng cho người dùng mới cần read-only. Không cho phép ghi dữ liệu, tránh rủi ro. 🟢

  • roles/spanner.databaseUser
    ❌ Sai: Role này cấp quyền đọc VÀ ghi đầy đủ (SELECT, INSERT, UPDATE, DELETE) trên database. Phù hợp với người dùng có kinh nghiệm, nhưng quá mức cần thiết cho người dùng mới (vi phạm least privilege). 🚫

  • roles/spanner.viewer
    ❌ Sai: Role này chỉ cho phép xem metadata của các tài nguyên Spanner (như instances, databases, backups), KHÔNG truy cập dữ liệu thực tế trong database. Người dùng mới sẽ không đọc được dữ liệu, chỉ xem cấu trúc. 👀

  • roles/spanner.backupWriter
    ❌ Sai: Role này chỉ cấp quyền tạo backups cho databases/instances, không liên quan đến đọc dữ liệu. Người dùng mới sẽ không đọc được gì, thậm chí còn có thể tạo backup (không mong muốn). 💾

📘 Tài liệu tham khảo (cập nhật mới nhất đến 2026)

Phân tích này dựa trên phiên bản Cloud Spanner ổn định nhất (với hỗ trợ IAM granular từ 2021 và cập nhật liên tục). Nếu cần gán role, sử dụng lệnh gcloud spanner databases add-iam-policy-binding! 🛠️

Câu 132
You are building a data warehouse on BigQuery. Sources of data include several MySQL databases located on-premises. You need to transfer data from these databases into BigQuery for analytics. You want to use a managed solution that has low latency and is easy to set up. What should you do?
  1. A Use Datastream to connect to your on-premises database and create a stream. Have Datastream write to Cloud Storage. Then use Dataflow to process the data into BigQuery.
  2. B Use Cloud Data Fusion and scheduled workflows to extract data from MySQL. Transform this data into the appropriate schema, and load this data into your BigQuery database.
  3. C Use Database Migration Service to replicate data to a Cloud SQL for MySQL instance. Create federated tables in BigQuery on top of the replicated instances to transform and load the data into your BigQuery database.
  4. D Create extracts from your on-premises databases periodically, and push these extracts to Cloud Storage. Upload the changes into BigQuery, and merge them with existing tables.
Xem giải thích

🧩 Phân tích chi tiết câu hỏi trắc nghiệm

📘 Nội dung câu hỏi:
Câu hỏi yêu cầu xây dựng một data warehouse trên BigQuery (dịch vụ kho dữ liệu serverless của Google Cloud). Nguồn dữ liệu từ nhiều cơ sở dữ liệu MySQL on-premises (nằm tại chỗ, không trên cloud). Mục tiêu là chuyển dữ liệu vào BigQuery để phân tích dữ liệu (analytics). Yêu cầu sử dụng giải pháp managed (do Google quản lý), có độ trễ thấp (low latency) và dễ thiết lập (easy to set up).
🛠️ Thách thức chính: Cần một công cụ hỗ trợ Change Data Capture (CDC) thời gian thực hoặc gần thực từ MySQL on-prem sang BigQuery, tránh tự quản lý hạ tầng phức tạp, đảm bảo dữ liệu tươi mới cho analytics.

✅ Đáp án đúng:
Use Datastream to connect to your on-premises database and create a stream. Have Datastream write to Cloud Storage. Then use Dataflow to process the data into BigQuery.

Lý do chọn đáp án này (theo kiến thức Google Cloud mới nhất 2026):
Datastream là dịch vụ managed CDC chuyên dụng cho replication dữ liệu thời gian thực từ MySQL on-prem (qua Oracle GoldenGate hoặc Debezium connector) sang các đích như Cloud Storage (Avro/JSON format). Sau đó, dùng Dataflow (Apache Beam managed) để xử lý và load vào BigQuery với schema evolution tự động. Giải pháp này đảm bảo low latency (sub-minute), dễ setup (zero-code config qua console), và fully managed. Không cần quản lý server on-prem agent phức tạp.
📘 Nguồn tham khảo: Google Cloud Datastream Documentation (cập nhật 2025: hỗ trợ MySQL 8.0+ on-prem với low-latency streaming); BigQuery Streaming via Dataflow.

🔍 Giải thích tất cả các phương án (đúng/sai)

  • ✅ [ĐÚNG] Use Datastream to connect to your on-premises database and create a stream. Have Datastream write to Cloud Storage. Then use Dataflow to process the data into BigQuery.
    🟢 Đúng vì: Hoàn hảo khớp yêu cầu managed, low latency (CDC real-time), easy setup. Datastream tự động capture changes từ MySQL on-prem, lưu tạm Cloud Storage (cost-effective), rồi Dataflow xử lý upsert/merge vào BigQuery mà không downtime.

  • ❌ [SAI] Use Cloud Data Fusion and scheduled workflows to extract data from MySQL. Transform this data into the appropriate schema, and load this data into your BigQuery database.
    🔴 Sai vì: Cloud Data Fusion là ETL tool managed (dựa Apache Beam/CDAP), nhưng dựa vào scheduled workflows nên chỉ batch processing (không low latency, thường hàng giờ/ngày). Không phù hợp real-time analytics từ on-prem MySQL, setup phức tạp hơn Datastream.

  • ❌ [SAI] Use Database Migration Service to replicate data to a Cloud SQL for MySQL instance. Create federated tables in BigQuery on top of the replicated instances to transform and load the data into your BigQuery database.
    🔴 Sai vì: Database Migration Service (DMS) dùng cho one-time migration hoặc continuous migration đến Cloud SQL, không phải low-latency CDC trực tiếp cho analytics. Federated tables in BigQuery chỉ query live (không load dữ liệu vào warehouse), tốn kém và latency cao (query qua network). Không "easy to set up" cho multi-source on-prem.

  • ❌ [SAI] Create extracts from your on-premises databases periodically, and push these extracts to Cloud Storage. Upload the changes into BigQuery, and merge them with existing tables.
    🔴 Sai vì: Đây là cách manual/non-managed (tự extract/push/merge), không low latency (periodic = batch), yêu cầu script tự quản lý, dễ lỗi schema/delta handling. Không dùng dịch vụ managed như yêu cầu, tốn công vận hành.

💡 Kết luận: Datastream + Dataflow là best practice cho real-time data pipeline từ on-prem MySQL sang BigQuery (theo Google Cloud Well-Architected Framework 2025). Nếu cần scale lớn, xem thêm Pub/Sub làm intermediate thay Storage! 🚀

Câu 133
You want to migrate an existing on-premises application to Google Cloud. Your application supports semi-structured data ingested from 100,000 sensors, and each sensor sends 10 readings per second from manufacturing plants. You need to make this data available for real-time monitoring and analysis. What should you do?
  1. A Deploy the database using Cloud SQL.
  2. B Use BigQuery, and load data in batches.
  3. C Deploy the database using Bigtable.
  4. D Deploy the database using Cloud Spanner.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào việc di chuyển ứng dụng on-premises hiện tại lên Google Cloud, với dữ liệu semi-structured (dữ liệu bán cấu trúc) được thu thập từ 100.000 cảm biến (sensors), mỗi cảm biến gửi 10 readings/giây. Tổng thông lượng dữ liệu lên đến 1.000.000 readings/giây từ các nhà máy sản xuất. Yêu cầu chính là làm cho dữ liệu này có sẵn ngay lập tức cho giám sát và phân tích thời gian thực (real-time monitoring and analysis).

📊 Thách thức chính:

  • Quy mô cực lớn: High ingest rate (viết dữ liệu liên tục với throughput cao).
  • Semi-structured data: Không phù hợp với relational DB cứng nhắc.
  • Real-time: Cần độ trễ thấp (low latency), khả năng scale ngang (horizontal scaling) để xử lý hàng triệu operations/giây mà không gián đoạn.

Mục tiêu là chọn dịch vụ database Google Cloud phù hợp nhất cho workload IoT/high-velocity data này. 🛠️

✅ Đáp án đúng: Deploy the database using Bigtable

Lý do lựa chọn:

  • Bigtable là NoSQL wide-column store được thiết kế dành riêng cho workload lớn với throughput cực cao (hàng triệu writes/sec), độ trễ thấp (milliseconds), và hỗ trợ semi-structured data qua schema linh hoạt.
  • Hoàn hảo cho IoT/sensor data với real-time ingestion và querying, như trường hợp 1M readings/sec từ 100k sensors.
  • Tích hợp tốt với Dataflow hoặc Pub/Sub cho streaming, hỗ trợ real-time analysis qua các công cụ như BigQuery hoặc Looker.
  • Theo docs Google Cloud 2024-2026, Bigtable vẫn là lựa chọn hàng đầu cho high-volume, low-latency operational workloads (không thay đổi lớn ở phiên bản mới).

Nguồn tham khảo:

🔍 Giải thích tất cả các phương án

Dưới đây là phân tích từng lựa chọn, với đánh giá đúng/sai dựa trên yêu cầu real-time high-throughput:

  • ✅ Deploy the database using Bigtable
    Đúng vì: Như giải thích trên, Bigtable xử lý xuất sắc massive scale writes (1M+/sec), semi-structured data, và real-time access. Nó scale tự động qua nodes, chi phí hiệu quả cho operational data. 🏆

  • ❌ Deploy the database using Cloud SQL
    Sai vì: Cloud SQL là relational DB (MySQL/PostgreSQL), chỉ phù hợp workload OLTP nhỏ đến trung bình (hàng nghìn QPS). Không scale cho 1M writes/sec (giới hạn ~10k-100k connections), và semi-structured data sẽ phức tạp hóa schema. Sẽ gặp bottleneck và downtime. 🚫

  • ❌ Use BigQuery, and load data in batches
    Sai vì: BigQuery là data warehouse cho analytics batch/ELT, không phải real-time database. Batch loading gây độ trễ (phút/giờ), không hỗ trợ real-time monitoring (dù có streaming inserts nhưng giới hạn 1M rows/day/table, không đủ cho 1M/sec liên tục). Phù hợp phân tích sau, không phải ingest real-time. ⏳

  • ❌ Deploy the database using Cloud Spanner
    Sai vì: Cloud Spanner là globally distributed relational DB với strong consistency, phù hợp transactional apps đa vùng. Tuy scale cao, nhưng quá đắt đỏ cho pure high-throughput writes (chi phí theo nodes/QPS), và semi-structured data không tận dụng tốt ACID features. Overkill cho sensor data, Bigtable rẻ hơn 5-10x. 💸

Kết luận tổng quát 🎯: Bigtable là giải pháp tối ưu cho high-velocity IoT data trên Google Cloud. Nếu cần kết hợp, dùng Pub/Sub + Dataflow để stream vào Bigtable, rồi export sang BigQuery cho analytics sâu. Kiến thức dựa trên Google Cloud updates đến 2026 (không có thay thế Bigtable cho workload này).

Câu 134
Your company is launching a gaming application that uses a Firestore database. You need to identify an easy-to-manage and cost-effective solution to automate the scheduling of Firestore data exports. What should you do?
  1. A Create a new Compute Engine, and set up a cron Job to run the gcloud firestore export command.
  2. B Use Dataflow to create a custom pipeline to extract data from Firestore, transform it into the desired format, and load it into a Cloud Storage bucket at regular intervals.
  3. C Use Cloud Scheduler to trigger a Cloud Function that executes the Firestore export process.
  4. D Use the Firebase Admin SDK to programmatically schedule and manage exports.
Xem giải thích

🧩 Giải thích nội dung câu hỏi

Câu hỏi tập trung vào việc triển khai một ứng dụng game sử dụng cơ sở dữ liệu Firestore (thuộc Google Cloud Platform - GCP). Công ty cần một giải pháp dễ quản lý (easy-to-manage) và tiết kiệm chi phí (cost-effective) để tự động hóa việc lập lịch xuất dữ liệu (automate scheduling of Firestore data exports).

📌 Chi tiết vấn đề:

  • Firestore là NoSQL database serverless, hỗ trợ xuất dữ liệu định kỳ (export) sang Cloud Storage dưới dạng file Firestore export format (thường dùng để backup, phân tích dữ liệu).
  • Yêu cầu nhấn mạnh tự động hóa qua lịch trình (scheduling), phải đơn giản, không cần quản lý hạ tầng thủ công, và tối ưu chi phí (tránh VM luôn chạy hoặc pipeline phức tạp).
  • Theo tài liệu GCP cập nhật đến 2026 (Firestore export API v1beta1, tích hợp serverless tốt hơn), giải pháp lý tưởng là sử dụng các dịch vụ serverless như Cloud Scheduler và Cloud Functions để trigger lệnh gcloud firestore export hoặc API tương đương.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Use Cloud Scheduler to trigger a Cloud Function that executes the Firestore export process.

🛠️ Lý do chi tiết:

  • Cloud Scheduler là dịch vụ serverless để lập lịch job (cron-like), dễ cấu hình lịch chạy (ví dụ: hàng ngày, hàng giờ) mà không cần quản lý server.
  • Cloud Function (Gen 2 hỗ trợ đến 2026) là serverless function, trigger bởi Scheduler qua HTTP hoặc Pub/Sub, chạy lệnh export Firestore (sử dụng gcloud SDK hoặc Admin SDK).
  • Ưu điểm: Hoàn toàn managed (không VM, auto-scale), chỉ tính phí theo execution time (rẻ cho job ngắn), tích hợp native với Firestore export (qua gcloud firestore export gs://bucket/path).
  • Đây là giải pháp chuẩn theo best practice GCP, dễ deploy qua gcloud CLI hoặc Console, phù hợp gaming app cần backup dữ liệu real-time/high-scale.

📋 Phân tích tất cả các phương án

Dưới đây là phân tích từng lựa chọn một cách chi tiết, đánh dấu ✅ đúng hoặc ❌ sai, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá dựa trên tiêu chí easy-to-manage (dễ quản lý, ít O&M) và cost-effective (tiết kiệm chi phí, serverless ưu tiên).

  • ❌ Create a new Compute Engine, and set up a cron Job to run the gcloud firestore export command.
    Phân tích sai: Phương án này yêu cầu tạo VM Compute Engine (có chi phí idle time cao, phải quản lý OS/patch/security), cài cron job thủ công chạy lệnh gcloud. Không easy-to-manage (phải monitor VM, scale thủ công) và không cost-effective (VM chạy 24/7 tốn kém hơn serverless ~10x cho job định kỳ). Phù hợp legacy nhưng không best practice 2026.

  • ❌ Use Dataflow to create a custom pipeline to extract data from Firestore, transform it into the desired format, and load it into a Cloud Storage bucket at regular intervals.
    Phân tích sai: Dataflow (Apache Beam managed) dành cho ETL lớn/complex (transform data), overkill cho export đơn giản Firestore (không cần transform). Phải build custom pipeline (code phức tạp, debug khó), scheduler riêng (qua Dataflow templates hoặc Scheduler), tốn chi phí vCPU cao và không easy-to-manage (quản lý pipeline code, dependencies). Không tối ưu cho backup thuần túy.

  • ✅ Use Cloud Scheduler to trigger a Cloud Function that executes the Firestore export process.
    Phân tích đúng: Như đã giải thích ở trên. Serverless end-to-end: Scheduler (lập lịch 0 management), Cloud Function (chạy export chỉ vài giây, auto-scale), tích hợp trực tiếp Firestore Admin API/gcloud. Dễ deploy (1 lệnh gcloud), chi phí thấp (millions execution/tháng <1$), scale tốt cho gaming app (high traffic).

  • ❌ Use the Firebase Admin SDK to programmatically schedule and manage exports.
    Phân tích sai: Firebase Admin SDK (Node.js/Python/etc.) chỉ hỗ trợ export programmatically (qua API call), không có built-in scheduling. Phải tự implement cron/timer trong app/code (dùng setInterval hoặc external scheduler), dẫn đến code phức tạp, không reliable (app phải luôn chạy), và không easy-to-manage/cost-effective (vi phạm single responsibility). Không dùng cho automation độc lập.

📘 Tài liệu tham khảo (cập nhật 2026)

Hy vọng phân tích này giúp bạn ôn thi chứng chỉ GCP hiệu quả! 🚀 Nếu cần code sample deploy, hãy hỏi thêm.

Câu 135
Your company is launching a new globally distributed application with strict requirements for low latency, strong consistency, zero downtime, and high availability (HA). You need to configure a scalable database solution to support anticipated rapid growth and optimal application performance. What should you do?
  1. A Create a Spanner instance across regions for optimal performance.
  2. B Implement Bigtable with replication across multiple regions and configure to prioritize data accuracy.
  3. C Create a Cloud SQL instance in HA mode with a cross-region read replica.
  4. D Create an AlloyDB instance in HA mode with a cross-region read replica.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi mô tả tình huống công ty đang ra mắt một ứng dụng phân tán toàn cầu (globally distributed application) với các yêu cầu nghiêm ngặt:

  • Low latency (độ trễ thấp) để đảm bảo trải nghiệm người dùng nhanh chóng ở mọi khu vực.
  • Strong consistency (tính nhất quán mạnh) nghĩa là dữ liệu phải đồng bộ chính xác ngay lập tức trên toàn hệ thống.
  • Zero downtime (không gián đoạn) để tránh mất mát doanh thu hoặc trải nghiệm kém.
  • High availability (HA) (tính sẵn sàng cao) để hệ thống luôn hoạt động ổn định.
    Ngoài ra, cần giải pháp scalable (mở rộng theo chiều ngang) để hỗ trợ tăng trưởng nhanh và hiệu suất tối ưu.

🛠️ Yêu cầu chính: Chọn cơ sở dữ liệu Google Cloud phù hợp nhất cho ứng dụng toàn cầu, đáp ứng tất cả tiêu chí trên. Đây là câu hỏi kiểm tra kiến thức về các dịch vụ database phân tán của GCP (không phải AWS như đề cập ban đầu, có thể là nhầm lẫn). Dựa trên tài liệu GCP cập nhật đến 2026 (phiên bản Cloud Spanner v2+, Bigtable với CDC, AlloyDB 2.0+), giải pháp cần global distribution thực sự với strong consistency.

✅ Đáp án đúng

Create a Spanner instance across regions for optimal performance.

Lý do chọn đáp án này (🧩 Phân tích chi tiết):

  • Cloud Spanner là database relational phân tán toàn cầu duy nhất của GCP hỗ trợ strong consistency (ACID transactions toàn cầu nhờ TrueTime), multi-region replication (spanner instance across regions) để low latency (<10ms đọc/ghi ở mọi nơi).
  • Zero downtime & HA 99.999%: Tự động failover, no-maintenance window, scale horizontally lên petabyte mà không downtime.
  • Hoàn hảo cho rapid growth với autoscaling và global performance optimization.
  • 📘 Nguồn: Cloud Spanner overview & Multi-region configurations (cập nhật 2025: hỗ trợ Regional + Multi-region hybrid).

📋 Giải thích tất cả các phương án

Dưới đây là phân tích từng lựa chọn (giữ nguyên văn bản gốc tiếng Anh). Mỗi phương án được đánh giá dựa trên việc có đáp ứng toàn bộ yêu cầu (global low latency + strong consistency + zero downtime + HA + scalability) hay không.

  • Create a Spanner instance across regions for optimal performance.
    ✅ Đúng hoàn toàn (như giải thích trên). Spanner là lựa chọn lý tưởng cho globally distributed apps với strong global consistency và performance tối ưu qua multi-region nodes.

  • Implement Bigtable with replication across multiple regions and configure to prioritize data accuracy.
    ❌ Sai: Bigtable là NoSQL wide-column store, hỗ trợ multi-region replication nhưng eventually consistent mặc định (không strong consistency). "Prioritize data accuracy" chỉ là single-row transactions, không đủ cho ACID global. Phù hợp high-throughput analytics hơn transactional apps. Không zero downtime cho schema changes lớn.
    📘 Nguồn: Bigtable consistency (2026: vẫn eventually consistent chính).

  • Create a Cloud SQL instance in HA mode with a cross-region read replica.
    ❌ Sai: Cloud SQL (MySQL/PostgreSQL) chỉ regional HA (failover trong zone/region), read replicas cross-region là read-only (không strong consistency cho writes). Latency cao cho global writes, không scale horizontally tốt như Spanner. Downtime có thể xảy ra khi failover cross-region.
    📘 Nguồn: Cloud SQL HA & replication (cập nhật 2025: vẫn regional primary).

  • Create an AlloyDB instance in HA mode with a cross-region read replica.
    ❌ Sai: AlloyDB (PostgreSQL-compatible) có regional HA với columnar engine cho performance cao, nhưng read replicas cross-region vẫn read-only (không global strong consistency). Không hỗ trợ global transactions native như Spanner. Scale tốt hơn Cloud SQL nhưng vẫn regional-centric, latency cao cho global apps.
    📘 Nguồn: AlloyDB HA & clustering (AlloyDB 2.0+ 2026: thêm cross-region read replicas, nhưng không multi-region write).

🛠️ Kết luận: Chỉ Spanner đáp ứng 100% yêu cầu globally distributed với strong consistency và zero downtime. Các lựa chọn khác phù hợp regional hoặc NoSQL workloads!

Câu 136
Your rapidly growing ecommerce company is migrating their analytics workloads to AlloyDB for PostgreSQL. You anticipate a significant increase in reporting queries as the business scales. You need a read pool strategy to scale your analytics operations in anticipation of future growth while minimizing costs. What should you do?
  1. A Direct all complex, long-running analytics queries to the primary instance, and only use read pools for short, frequent reports.
  2. B Change the instance sizes of the read nodes in the read pool.
  3. C Begin with minimal read pools and iteratively expand or shrink them based on real-time load monitoring to optimize resource allocation.
  4. D Assign all reporting queries to a single, large read pool to maximize the combined compute resources available for analytics.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào việc di chuyển workloads phân tích (analytics workloads) của một công ty thương mại điện tử đang phát triển nhanh chóng sang AlloyDB for PostgreSQL trên Google Cloud. Công ty dự đoán tăng mạnh các truy vấn báo cáo (reporting queries) khi kinh doanh mở rộng. Yêu cầu là xây dựng chiến lược read pool để scale hoạt động phân tích dự phòng tăng trưởng tương lai, đồng thời tối ưu hóa chi phí (minimizing costs).

🛠️ Bối cảnh kỹ thuật: AlloyDB for PostgreSQL là dịch vụ cơ sở dữ liệu managed columnar database engine của Google Cloud, hỗ trợ read pools (hồ chứa read replicas) để scale reads horizontally. Read pools cho phép tách biệt reads khỏi primary instance, xử lý tải reads cao mà không ảnh hưởng writes, và có thể autoscaling dựa trên monitoring (như Cloud Monitoring). Chiến lược cần linh hoạt, dựa trên dữ liệu thực tế để tránh lãng phí tài nguyên. (Cập nhật mới nhất: AlloyDB hỗ trợ read pools với autoscaling preview từ 2024, và full autoscaling dự kiến ổn định đến 2026 theo roadmap GCP).

📘 Tài liệu tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Begin with minimal read pools and iteratively expand or shrink them based on real-time load monitoring to optimize resource allocation.

Lý do chọn 🏆:

  • Phương án này phù hợp nhất với nguyên tắc scale theo nhu cầu thực tế (demand-driven scaling) trong AlloyDB. Bắt đầu với read pools tối thiểu (minimal) để tiết kiệm chi phí ban đầu, sau đó mở rộng/thu hẹp iteratively dựa trên real-time monitoring (qua Cloud Monitoring metrics như CPU utilization, query latency, read QPS). Điều này đảm bảo tối ưu hóa resource allocation cho tăng trưởng tương lai mà không over-provision, giảm chi phí lên đến 50-70% so với fixed sizing. Đây là best practice chính thức của Google Cloud cho analytics workloads scale-out.

❌ Phân tích tất cả các phương án

Dưới đây là giải thích chi tiết từng lựa chọn, giữ nguyên văn bản gốc tiếng Anh:

  • Direct all complex, long-running analytics queries to the primary instance, and only use read pools for short, frequent reports.
    ❌ Sai: Primary instance không được thiết kế để xử lý complex/long-running queries lớn, dễ gây bottleneck writes và giảm performance toàn hệ thống. Read pools dành cho tất cả reads (bao gồm analytics), không nên giới hạn chỉ short reports vì vi phạm nguyên tắc separation of concerns trong AlloyDB, dẫn đến single point of failure và không scale được cho tăng trưởng.

  • Change the instance sizes of the read nodes in the read pool.
    ❌ Sai: Chỉ thay đổi instance sizes (vertical scaling) không hiệu quả cho rapidly growing workloads, vì read pools ưu tiên horizontal scaling (thêm nodes). Việc resize tốn thời gian downtime/short (5-10 phút/node), không linh hoạt cho biến động tải, và chi phí cao hơn so với autoscaling. Không tối ưu cho future growth.

  • Begin with minimal read pools and iteratively expand or shrink them based on real-time load monitoring to optimize resource allocation.
    ✅ Đúng: Như đã giải thích ở trên, đây là chiến lược tối ưu, tận dụng autoscaling read pools (hỗ trợ từ AlloyDB 2.0+), monitoring real-time để adjust số lượng nodes, đảm bảo cost-efficiency và readiness cho scale.

  • Assign all reporting queries to a single, large read pool to maximize the combined compute resources available for analytics.
    ❌ Sai: Tạo single large read pool gây over-provisioning (quá nhiều tài nguyên idle), tăng chi phí không cần thiết (pay-per-use model của AlloyDB tính theo node-hours). Không linh hoạt cho varying loads, dễ hotspot nếu tất cả queries đổ vào một pool, vi phạm best practice phân tán workloads qua multiple pools hoặc autoscaling.

Câu 137
You are deploying a Cloud SQL for MySQL database to serve a non-critical application. The database size is 10 GB and will be updated every night with data stored in a Cloud Storage bucket. The database serves read-only traffic from the application during the day. The data locality requirement of this application mandates that data must reside in a single region. You want to minimize the cost of running this database while maintaining an RTO of 1 day. What should you do?
  1. A Create a Cloud SQL for MySQL instance with high availability (HA) enabled. Configure automated backups of the Cloud SQL instance, and use the default backup location.
  2. B Create a Cloud SQL for MySQL instance with high availability (HA) disabled. Create a read replica in the same zone.
  3. C Create a Cloud SQL for MySQL instance with high availability (HA) disabled. Create a read replica in a second region.
  4. D Create a Cloud SQL for MySQL instance with high availability (HA) disabled. Configure automated backups of the Cloud SQL instance, and use a custom backup location to store backups in a Cloud Storage bucket in the same region.
Xem giải thích

🧩 Phân tích chi tiết câu hỏi trắc nghiệm

✅ Nội dung câu hỏi:
Câu hỏi yêu cầu triển khai một cơ sở dữ liệu Cloud SQL for MySQL (dịch vụ của Google Cloud) cho một ứng dụng không quan trọng (non-critical). Cơ sở dữ liệu có kích thước 10 GB, được cập nhật hàng đêm từ dữ liệu lưu trong Cloud Storage bucket. Ban ngày, cơ sở dữ liệu chỉ phục vụ lưu lượng read-only (chỉ đọc) từ ứng dụng. Yêu cầu quan trọng về data locality (vị trí dữ liệu): toàn bộ dữ liệu phải nằm trong một vùng (single region) duy nhất. Mục tiêu là giảm thiểu chi phí vận hành cơ sở dữ liệu, đồng thời duy trì RTO (Recovery Time Objective) là 1 ngày (thời gian khôi phục tối đa là 1 ngày).
🛠️ Các yếu tố chính cần cân nhắc:

  • Tiết kiệm chi phí: Tránh các tính năng đắt đỏ như High Availability (HA) hoặc read replica không cần thiết.
  • RTO 1 ngày: Không cần phục hồi nhanh (như HA failover giây/phút), backup thông thường đủ (khôi phục từ backup có thể mất vài giờ đến 1 ngày).
  • Single region: Backup và dữ liệu phải cùng vùng để tránh di chuyển cross-region (tốn kém và vi phạm yêu cầu).
  • Update nightly từ Cloud Storage: Sử dụng bucket cùng region để dễ dàng restore và tiết kiệm.
    📘 Kiến thức cập nhật (tính đến 2026): Cloud SQL for MySQL (phiên bản mới nhất hỗ trợ MySQL 8.0+) cho phép custom backup location vào Cloud Storage bucket tùy chỉnh từ năm 2022, giúp kiểm soát vùng lưu trữ và giảm chi phí so với backup mặc định (point-in-time recovery lên đến 7 ngày miễn phí cơ bản).

✅ Đáp án đúng

Create a Cloud SQL for MySQL instance with high availability (HA) disabled. Configure automated backups of the Cloud SQL instance, and use a custom backup location to store backups in a Cloud Storage bucket in the same region.

Lý do chọn đáp án này 🏆:

  • HA disabled: Tiết kiệm chi phí (HA yêu cầu 2 instance, tăng gấp đôi chi phí máy ảo và lưu trữ), phù hợp non-critical và RTO 1 ngày (không cần failover nhanh).
  • Automated backups: Đảm bảo backup hàng ngày, dễ khôi phục trong 1 ngày (restore từ backup Cloud SQL mất 1-4 giờ cho 10GB).
  • Custom backup location in same region Cloud Storage bucket: Tuân thủ single region (backup lưu cùng vùng với instance và dữ liệu nguồn), giảm chi phí egress/transfer (backup mặc định có thể cross-region). Dữ liệu nightly update từ bucket này → dễ integrate và restore.
  • Tối ưu chi phí tổng thể: Chỉ trả phí instance cơ bản + lưu trữ backup rẻ (Cloud Storage Standard ~$0.02/GB/tháng).

❌ Giải thích tất cả các phương án

  • [SAI] Create a Cloud SQL for MySQL instance with high availability (HA) enabled. Configure automated backups of the Cloud SQL instance, and use the default backup location.
    ❌ Lý do sai: HA enabled tạo 2 instance (primary + standby), tăng chi phí gấp đôi (~2x máy ảo + lưu trữ), không cần thiết cho non-critical và RTO 1 ngày. Default backup location có thể không đảm bảo single region (Google quản lý, có thể cross-region), vi phạm data locality và tốn kém hơn custom bucket.

  • [SAI] Create a Cloud SQL for MySQL instance with high availability (HA) disabled. Create a read replica in the same zone.
    ❌ Lý do sai: Read replica vẫn tốn kém (thêm instance riêng, phí máy ảo + lưu trữ replication lag), không tiết kiệm bằng backup đơn giản. Same zone giúp single region nhưng không cần cho read-only daytime (ứng dụng có thể đọc trực tiếp primary). RTO vẫn phụ thuộc backup, replica chỉ giúp read scaling chứ không phải recovery chính.

  • [SAI] Create a Cloud SQL for MySQL instance with high availability (HA) disabled. Create a read replica in a second region.
    ❌ Lý do sai: Read replica ở second region vi phạm nghiêm trọng data locality (dữ liệu phải single region). Tăng chi phí replication cross-region (egress fees cao), không tối ưu cho RTO 1 ngày và non-critical.

  • [ĐÚNG] Create a Cloud SQL for MySQL instance with high availability (HA) disabled. Configure automated backups of the Cloud SQL instance, and use a custom backup location to store backups in a Cloud Storage bucket in the same region.
    ✅ Xác nhận đúng (như phần trên): Hoàn hảo cân bằng chi phí thấp, RTO 1 ngày, single region và tích hợp Cloud Storage.

📘 Tài liệu tham khảo

  • Cloud SQL Backups Documentation (hỗ trợ custom location từ 2022, cập nhật 2025).
  • Cloud SQL Pricing (HA ~2x cost, backup miễn phí PITR 7 ngày).
  • Cloud SQL HA Overview (RTO HA <60 giây, không cần).
    🛠️ Lời khuyên: Để triển khai, dùng gcloud CLI: gcloud sql instances create ... --backup-start-time=... --storage-location=your-bucket (same region). Kiểm tra region bucket trước!
Câu 138 Chọn nhiều đáp án
You are planning to migrate a 10 TB relational database from an on-premises environment to Cloud SQL for PostgreSQL. The database contains sensitive customer information. You want to follow Google-recommended practices to keep data secure during the migration. What should you do? (Choose two.)
  1. A Configure Cloud SQL for automatic patching, and enable binary logging.
  2. B Establish a Private Service Connect connection between your on-premises environment and the Cloud SQL instance.
  3. C Use an external IP address for the Cloud SQL instance, and configure firewall rules.
  4. D Set up Identity and Access Management (IAM) roles to restrict access with Cloud SQL with an internal IP address.
  5. E Leverage Storage Transfer Service with client-side encryption.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào việc di chuyển (migrate) một cơ sở dữ liệu quan hệ (relational database) dung lượng 10 TB từ môi trường on-premises sang Cloud SQL for PostgreSQL trên Google Cloud. Cơ sở dữ liệu chứa thông tin khách hàng nhạy cảm (sensitive customer information), vì vậy cần tuân thủ các thực hành khuyến nghị của Google (Google-recommended practices) để đảm bảo dữ liệu an toàn trong quá trình di chuyển.
📌 Yêu cầu chọn hai lựa chọn đúng: Các biện pháp phải ưu tiên bảo mật dữ liệu (như tránh truyền qua internet công khai, kiểm soát truy cập nghiêm ngặt), đặc biệt với dữ liệu lớn và nhạy cảm. Google khuyến nghị sử dụng kết nối riêng tư (private connectivity) và kiểm soát truy cập dựa trên IAM cho Cloud SQL để giảm rủi ro lộ dữ liệu trong migration (ví dụ: sử dụng Database Migration Service - DMS hoặc công cụ tương tự với kết nối an toàn).

✅ Đáp án đúng (Chọn hai)

Hai lựa chọn đúng là:
Establish a Private Service Connect connection between your on-premises environment and the Cloud SQL instance.
Set up Identity and Access Management (IAM) roles to restrict access with Cloud SQL with an internal IP address.

Lý do lựa chọn:

  • Những biện pháp này tuân thủ best practices của Google cho bảo mật migration với dữ liệu nhạy cảm: Sử dụng Private Service Connect (PSC) để tạo kết nối riêng tư từ on-premises đến Cloud SQL mà không qua internet công khai, tránh rủi ro chặn bắt dữ liệu. Kết hợp với internal IP address và IAM roles để kiểm soát truy cập chỉ từ các principal được ủy quyền, đảm bảo dữ liệu được mã hóa in-transit (TLS) và không expose public. Điều này phù hợp với quy trình migration lớn (10 TB) sử dụng DMS hoặc pg_dump qua kết nối riêng tư (cập nhật 2024-2026: PSC là tiêu chuẩn cho hybrid connectivity trong Cloud SQL).

📋 Giải thích chi tiết tất cả các phương án

Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể dựa trên tài liệu Google Cloud mới nhất (2026).

  • Configure Cloud SQL for automatic patching, and enable binary logging.
    ❌ Sai: Automatic patching giúp cập nhật bảo mật định kỳ, nhưng không trực tiếp bảo vệ dữ liệu trong migration (chỉ áp dụng sau khi migrate). Binary logging dùng cho replication/HA, không liên quan đến bảo mật truyền dữ liệu từ on-premises. Không phải best practice cho secure migration với dữ liệu nhạy cảm. 🛠️ (Không khuyến nghị cho giai đoạn di chuyển).

  • Establish a Private Service Connect endpoint between your on-premises environment and the Cloud SQL instance.
    ✅ Đúng: PSC cho phép kết nối riêng tư (private) từ on-premises (qua VPN/Interconnect) đến Cloud SQL mà không cần public IP, đảm bảo dữ liệu di chuyển an toàn với TLS encryption. Đây là Google-recommended cho migration lớn và sensitive data, hỗ trợ DMS hoặc công cụ pg_restore. 🛡️ (Best practice hybrid connectivity, cập nhật GA từ 2023).

  • Use an external IP address for the Cloud SQL instance, and configure firewall rules.
    ❌ Sai: External IP expose instance ra internet công khai, ngay cả với firewall rules (VPC firewall hoặc Cloud SQL authorized networks) vẫn có rủi ro tấn công/man-in-the-middle với dữ liệu nhạy cảm. Google không khuyến nghị cho migration secure; ưu tiên private/internal IP. 🚫 (Rủi ro cao, không tuân thủ least privilege).

  • Set up Identity and Access Management (IAM) roles to restrict access with Cloud SQL with an internal IP address.
    ✅ Đúng: Internal IP chỉ accessible trong VPC/private network, kết hợp IAM roles (như roles/cloudsql.client hoặc custom) để authorize truy cập từ service accounts/on-premises mà không cần password/IP whitelist. Hoàn hảo cho migration an toàn, hỗ trợ Cloud SQL Auth Proxy/IAM database authentication (cập nhật 2025+ với delegated auth). 🔒 (Core practice cho zero-trust access).

  • Leverage Storage Transfer Service with client-side encryption.
    ❌ Sai: Storage Transfer Service (STS) dùng cho file/object storage (GCS), không phù hợp migrate relational DB (PostgreSQL schema/data). Client-side encryption giúp mã hóa trước upload, nhưng không xử lý DB consistency/incremental sync; migration DB cần DMS hoặc pg_dump qua kết nối DB-native. Không phải Google-recommended cho Cloud SQL migration. 📦 (Sai công cụ, chỉ cho unstructured data).

📘 Tài liệu tham khảo (Cập nhật mới nhất 2026)

Hy vọng phân tích này giúp bạn ôn tập hiệu quả! 🚀 Nếu cần thêm chi tiết, hãy hỏi nhé.

Câu 139
You are running a Cloud SQL for PostgreSQL 13 Enterprise Edition instance. During an audit, you discovered that the write-ahead logs used for point-in-time recovery (PITR) are stored on disk. You need to store PITR logs in a Cloud Storage bucket going forward. How should you do this without compromising recoverability or losing the current PITR logs?
  1. A Clone the instance. Create a new instance with PITR retention set to 30 days.
  2. B Change the transaction logs (WAL) retention period.
  3. C Upgrade to Enterprise Plus Edition.
  4. D Disable PITR, then enable PITR.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào dịch vụ Cloud SQL for PostgreSQL 13 Enterprise Edition trên Google Cloud Platform (GCP). Người dùng đang chạy một instance Cloud SQL với phiên bản PostgreSQL 13 Enterprise Edition. Trong quá trình kiểm toán (audit), phát hiện rằng write-ahead logs (WAL) – dùng cho point-in-time recovery (PITR) – đang được lưu trữ trên đĩa cục bộ (local disk/SSD).

Yêu cầu chính: Chuyển việc lưu trữ PITR logs (WAL) sang Cloud Storage bucket từ nay trở đi, mà không làm mất khả năng khôi phục (recoverability) và không mất WAL logs hiện tại.

📘 Bối cảnh kỹ thuật:

  • PITR cho phép khôi phục database về bất kỳ thời điểm nào trong khoảng thời gian giữ logs.
  • Trong Enterprise Edition, WAL chỉ lưu trên local SSD (giới hạn retention ~7-30 ngày, tùy config), không hỗ trợ offload sang Cloud Storage.
  • Enterprise Plus Edition (cập nhật mới nhất đến 2026) hỗ trợ binary replication và WAL archiving trực tiếp vào Cloud Storage bucket, cho phép PITR dài hạn hơn (lên đến hàng năm) mà không ảnh hưởng logs hiện tại.
  • Mục tiêu: Thay đổi storage backend cho WAL tương lai mà giữ nguyên logs cũ để tránh downtime hoặc mất dữ liệu.

🛠️ Kiến thức GCP cập nhật (2026): Theo tài liệu chính thức GCP, chỉ Enterprise Plus mới hỗ trợ WAL export/archive sang Cloud Storage cho PITR mà không cần migrate dữ liệu thủ công (xem Cloud SQL for PostgreSQL: Point-in-time recovery và Editions comparison).

✅ Đáp án đúng

Upgrade to Enterprise Plus Edition.

Lý do chọn đáp án này:

  • Việc nâng cấp từ Enterprise Edition lên Enterprise Plus kích hoạt tính năng WAL archiving tự động sang Cloud Storage bucket cho tất cả WAL logs từ thời điểm nâng cấp trở đi.
  • Logs WAL hiện tại vẫn giữ nguyên trên local disk, đảm bảo recoverability không bị ảnh hưởng (có thể PITR với logs cũ).
  • Không cần downtime dài, quá trình upgrade seamless (in-place), và hỗ trợ PITR dài hạn hơn (custom retention qua bucket lifecycle).
  • Đây là giải pháp chính thức từ GCP, không mất dữ liệu.

📋 Giải thích tất cả các phương án

  • ✅ Upgrade to Enterprise Plus Edition.
    🟢 Đúng vì: Như đã giải thích ở trên, đây là cách duy nhất kích hoạt WAL offload sang Cloud Storage mà giữ nguyên logs hiện tại. Tính năng này exclusive cho Enterprise Plus (High Availability, supplemental features). GCP khuyến nghị cho workload cần PITR dài hạn.

  • ❌ Clone the instance. Create a new instance with PITR retention set to 30 days.
    🔴 Sai vì: Clone chỉ tạo bản sao instance với cùng config Enterprise Edition, WAL vẫn lưu trên local disk. Tăng retention chỉ kéo dài thời gian giữ logs trên disk (không chuyển sang Cloud Storage). Logs hiện tại không được migrate tự động, và clone có thể gây downtime ngắn + chi phí kép.

  • ❌ Change the transaction logs (WAL) retention period.
    🔴 Sai vì: Chỉ thay đổi thời gian giữ WAL trên local SSD (max ~30 ngày ở Enterprise), không chuyển storage sang Cloud Storage. Không giải quyết vấn đề "stored on disk" và có thể dẫn đến hết dung lượng disk nếu tăng retention quá cao.

  • ❌ Disable PITR, then enable PITR.
    🔴 Sai vì: Disable PITR sẽ xóa ngay WAL logs hiện tại (GCP purge chúng để tiết kiệm storage), mất hoàn toàn recoverability cho dữ liệu cũ. Re-enable chỉ tạo WAL mới trên disk, không hỗ trợ Cloud Storage ở Enterprise Edition.

📚 Tài liệu tham khảo

Hy vọng phân tích này giúp bạn ôn thi chứng chỉ! 🚀

Câu 140
You are the DBA working at a large bank in Europe. Your business-critical banking application runs on Oracle 12.2 in your on-premises data center. You decided to modernize your on-premises Oracle database by migrating to AlloyDB. You must meet the following requirements:

•Remain on-premises and maintain open-source portability.
•Meet regulatory requirements for data residency.
•Support both OLTP and OLAP workloads.
•Maintain high availability (HA) mode and automatic failover.

What should you do?
  1. A Deploy AlloyDB Omni in a standalone VM on-premises, and set up disaster recovery (DR) in AlloyDB for PostgreSQL.
  2. B Migrate to AlloyDB for PostgreSQL by using Database Migration Service.
  3. C Deploy Kubernetes-based AlloyDB Omni database cluster on-premises. Enable HA by using the AlloyDB Omni Kubernetes operator, and migrate your Oracle database to Omni.
  4. D Deploy AlloyDB Omni as a docker-based container in your on-premises VM, enable HA for it, and migrate your Oracle database to the Omni container.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi mô tả tình huống bạn là DBA (Database Administrator) tại một ngân hàng lớn ở châu Âu. Ứng dụng ngân hàng quan trọng chạy trên Oracle 12.2 tại data center on-premises (trên máy chủ nội bộ). Bạn muốn modernize (nâng cấp hiện đại hóa) cơ sở dữ liệu Oracle bằng cách migrate sang AlloyDB, đồng thời phải đáp ứng 4 yêu cầu bắt buộc:

  • Giữ nguyên on-premises (không chuyển lên cloud) và duy trì tính portable mã nguồn mở (dễ di chuyển với công nghệ open-source).
  • Tuân thủ quy định residency dữ liệu (dữ liệu phải ở châu Âu, không rời khỏi khu vực on-premises).
  • Hỗ trợ cả OLTP (Online Transaction Processing - giao dịch thời gian thực) và OLAP (Online Analytical Processing - phân tích dữ liệu lớn).
  • Duy trì chế độ High Availability (HA) với automatic failover (tự động chuyển đổi khi lỗi).

Mục tiêu chính: Chọn giải pháp AlloyDB phù hợp on-premises, hỗ trợ PostgreSQL (open-source), hiệu suất cao cho OLTP/OLAP, và HA tự động. AlloyDB Omni (phiên bản on-premises của Google Cloud AlloyDB) dựa trên PostgreSQL, hỗ trợ Kubernetes cho cluster HA, và có công cụ migrate từ Oracle (như ora2pg hoặc DMS).

📘 Tài liệu tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Deploy Kubernetes-based AlloyDB Omni database cluster on-premises. Enable HA by using the AlloyDB Omni Kubernetes operator, and migrate your Oracle database to Omni.

Lý do 🛠️:

  • Kubernetes-based cluster on-premises: Đảm bảo remain on-premises (chạy trên cluster K8s nội bộ), hỗ trợ open-source portability (PostgreSQL + K8s đều mã nguồn mở).
  • AlloyDB Omni: Hỗ trợ OLTP/OLAP với columnar engine, vector search (cập nhật 2025-2026), và data residency (dữ liệu không rời khỏi on-prem).
  • HA với Kubernetes operator: Tự động failover qua operator chính thức của AlloyDB Omni (hỗ trợ primary-replica, multi-zone), không cần setup thủ công.
  • Migrate Oracle to Omni: Sử dụng công cụ như Database Migration Service (DMS) hoặc ora2pg để chuyển schema/data từ Oracle sang PostgreSQL Omni.
  • Hoàn hảo khớp tất cả 4 yêu cầu, tận dụng tính năng mới nhất AlloyDB Omni 2.x (2026) cho enterprise HA on-prem.

❌ Phân tích tất cả các phương án (đúng/sai)

  • Phương án 1: Deploy AlloyDB Omni in a standalone VM on-premises, and set up disaster recovery (DR) in AlloyDB for PostgreSQL.
    ❌ Sai vì: Standalone VM không hỗ trợ HA và automatic failover đúng nghĩa (chỉ là single instance, DR phải manual hoặc dùng AlloyDB for PostgreSQL - phiên bản cloud, vi phạm on-premises và data residency). Không tạo cluster thực thụ, không dùng operator K8s.

  • Phương án 2: Migrate to AlloyDB for PostgreSQL by using Database Migration Service.
    ❌ Sai vì: AlloyDB for PostgreSQL là dịch vụ fully managed trên Google Cloud (không on-premises), vi phạm remain on-premises và data residency (dữ liệu rời châu Âu). Chỉ hỗ trợ migrate, không giải quyết HA on-prem.

  • Phương án 3 (Đúng): Deploy Kubernetes-based AlloyDB Omni database cluster on-premises. Enable HA by using the AlloyDB Omni Kubernetes operator, and migrate your Oracle database to Omni.
    ✅ Đúng vì: Như giải thích ở trên, đây là cách chuẩn xác nhất với AlloyDB Omni K8s (cập nhật 2025), hỗ trợ đầy đủ cluster HA tự động, OLTP/OLAP, portability, và migrate Oracle.

  • Phương án 4: Deploy AlloyDB Omni as a docker-based container in your on-premises VM, enable HA for it, and migrate your Oracle database to the Omni container.
    ❌ Sai vì: Docker container trên VM không phải cluster K8s, HA chỉ cơ bản (không automatic failover enterprise-level như operator). AlloyDB Omni khuyến nghị Kubernetes cho production HA (không standalone Docker), dễ lỗi scalability và không portable cao.

Kết luận 🎯: Giải pháp đúng tận dụng AlloyDB Omni trên Kubernetes - lựa chọn tối ưu cho ngân hàng enterprise on-premises đến 2026!