Quay lại bộ đề
Question #276 Topic 1
You need to migrate a Redis database from an on-premises data center to a Memorystore for Redis instance. You want to follow Google-recommended practices and perform the migration for minimal cost, time and effort. What should you do?
Bạn cần di chuyển cơ sở dữ liệu Redis từ trung tâm dữ liệu nội bộ (on-premises) sang một phiên bản Memorystore cho Redis. Bạn muốn tuân theo các thực hành khuyến nghị của Google và thực hiện việc di chuyển với chi phí, thời gian và công sức tối thiểu. Bạn nên làm gì?
A
Make an RDB backup of the Redis database, use the gsutil utility to copy the RDB file into a Cloud Storage bucket, and then import the RDB file into the Memorystore for Redis instance.
Tạo một bản sao lưu RDB của cơ sở dữ liệu Redis, sử dụng tiện ích gsutil để sao chép tệp RDB vào một bucket Cloud Storage, và sau đó nhập tệp RDB vào phiên bản Memorystore cho Redis.
B
Make a secondary instance of the Redis database on a Compute Engine instance and then perform a live cutover.
Tạo một phiên bản phụ (secondary instance) của cơ sở dữ liệu Redis trên một phiên bản Compute Engine và sau đó thực hiện chuyển đổi trực tiếp (live cutover).
C
Create a Dataflow job to read the Redis database from the on-premises data center and write the data to a Memorystore for Redis instance.
Tạo một job Dataflow để đọc cơ sở dữ liệu Redis từ trung tâm dữ liệu nội bộ và ghi dữ liệu vào một phiên bản Memorystore cho Redis.
D
Write a shell script to migrate the Redis data and create a new Memorystore for Redis instance.
Viết một shell script để di chuyển dữ liệu Redis và tạo một phiên bản Memorystore cho Redis mới.
Giải thích & Tài liệu tham khảo
Để di chuyển cơ sở dữ liệu Redis từ on-premises sang Memorystore cho Redis với chi phí và công sức tối thiểu:
- A (Tạo bản sao lưu RDB, copy qua Cloud Storage bằng gsutil và import vào Memorystore) là phương án tối ưu nhất. Memorystore hỗ trợ import trực tiếp từ tệp sao lưu
.rdbđược lưu trữ trên Cloud Storage, đây là phương pháp chuẩn, nhanh chóng và không tốn nhiều công sức lập trình hay vận hành. - B sai: Phương pháp này phức tạp, tốn thời gian và chi phí vận hành Compute Engine.
- C sai: Dataflow không hỗ trợ sẵn trình kết nối (connector) tối ưu cho việc migrate Redis trực tiếp từ on-premises lên Memorystore một cách đơn giản như phương án dùng tệp RDB, đồng thời tốn thêm chi phí chạy Dataflow.
- D sai: Tự viết script thủ công tốn nhiều công sức phát triển và dễ xảy ra lỗi so với việc sử dụng cơ chế import RDB tích hợp sẵn.
(Đáp án được gợi ý bởi AI)