Ngân hàng đề — AWS Certified Database Specialty
Tìm thấy 358 câu.
Which AWS service or feature should the database specialist use to meet these requirements?
- A AWS Systems Manager Parameter Store
- B DB parameter group
- C AWS Config with the Amazon RDS managed rules
- D AWS Secrets Manager
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi xoay quanh một công ty sở hữu nhiều Amazon Aurora DB clusters với các cấu hình (configurations) khác nhau, phù hợp cho từng đội ngũ và trường hợp sử dụng cụ thể. Các cấu hình này có thể được nhóm thành các danh mục lớn hơn. Chuyên gia cơ sở dữ liệu (database specialist) muốn triển khai giải pháp để lưu trữ và chỉnh sửa các tham số cấu hình (configuration parameters) một cách hệ thống hơn.
📘 Tóm tắt vấn đề chính: Aurora là dịch vụ RDS tương thích, cần công cụ quản lý tập trung parameters cho DB clusters, tránh cấu hình thủ công lẻ tẻ, hỗ trợ chia sẻ và chỉnh sửa dễ dàng giữa các clusters cùng loại.
✅ Đáp án đúng: DB parameter group
Lý do lựa chọn:
DB parameter group là tính năng chính thức của Amazon RDS và Aurora (cập nhật đến 2026), cho phép tạo, lưu trữ và quản lý tập hợp tham số cấu hình (như engine parameters, timeouts, caching) một cách tập trung và hệ thống. Bạn có thể tạo nhiều parameter groups khác nhau cho từng danh mục (ví dụ: high-performance, cost-optimized), gán cho các DB clusters tương ứng, và chỉnh sửa chúng để tự động áp dụng cho tất cả clusters liên kết. Điều này hoàn hảo cho yêu cầu "broader categories" và "systematic storage/modification". Không có thay đổi lớn trong phiên bản mới nhất (Aurora MySQL/PostgreSQL 3.x/4.x hỗ trợ parameter groups nâng cao hơn với custom parameters).
🛠️ Lợi ích nổi bật: Hỗ trợ inheritance từ default groups, versioning qua snapshots/clones, và tích hợp IAM cho quyền truy cập.
📋 Phân tích tất cả các phương án
Dưới đây là phân tích chi tiết từng lựa chọn, với nội dung gốc giữ nguyên bằng tiếng Anh. Tôi đánh dấu ✅ đúng hoặc ❌ sai, kèm giải thích rõ ràng:
-
AWS Systems Manager Parameter Store
❌ Sai: Parameter Store dùng để lưu trữ tham số cấu hình chung (như strings, secure strings) cho toàn bộ ứng dụng/EC2/Lambda, không chuyên biệt cho RDS/Aurora parameters. Nó không tự động áp dụng vào DB engines, thiếu hỗ trợ engine-specific params (nhưinnodb_buffer_pool_size), và không tích hợp trực tiếp với DB clusters. Phù hợp hơn cho app configs, không phải DB systematic management. -
DB parameter group
✅ Đúng: Như đã giải thích ở trên, đây là giải pháp tối ưu và native của AWS RDS/Aurora. Cho phép tổ chức parameters thành groups theo categories, chỉnh sửa tập trung, và reboot DB để áp dụng – hoàn toàn khớp yêu cầu. Đã được cập nhật trong Aurora Serverless v2 (2024-2026) với dynamic parameters. -
AWS Config with the Amazon RDS managed rules
❌ Sai: AWS Config dùng để ghi nhận, kiểm toán và tuân thủ (compliance) configurations, với RDS managed rules kiểm tra trạng thái (ví dụ: encryption enabled?). Nó không lưu trữ hay chỉnh sửa parameters một cách hệ thống, chỉ báo cáo vi phạm chứ không quản lý như parameter groups. Không phù hợp cho "storage and modification". -
AWS Secrets Manager
❌ Sai: Secrets Manager chuyên quản lý bí mật (secrets) như passwords, API keys, tokens – tích hợp rotation cho RDS/Aurora credentials. Nó không xử lý cấu hình parameters (như buffer sizes, query timeouts), chỉ lưu trữ giá trị nhạy cảm, không hỗ trợ categories hay systematic DB config.
📚 Tài liệu tham khảo (cập nhật mới nhất đến 2026)
- AWS RDS User Guide - Parameter Groups: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html – Chi tiết tạo/share/modify groups.
- Amazon Aurora User Guide: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Overview.html#aurora-parameter-groups – Xác nhận hỗ trợ cho clusters.
- AWS re:Post & Best Practices (2025): Tìm "Aurora parameter management" để ví dụ thực tế.
Hy vọng phân tích này giúp bạn ôn thi DOP-C02 hiệu quả! 🚀 Nếu cần thêm case study, hỏi nhé!
Which combination of actions will moot those requirements with the LEAST operational overhead? (Choose two.)
- A Migrate all manual snapshots to the Amazon S3 Standard-Infrequent Access (S3 Standard-IA) storage class
- B Use an automated snapshot schedule to take a snapshot once each day
- C Create an Amazon CloudWatch billing alarm to publish a message to an Amazon Simple Notification Service (Amazon SNS) topic if the threshold is exceeded
- D Create a serverless AWS Glue job to run every 4 hours to describe cluster snapshots and send an email message if the threshold is exceeded
- E Delete manual snapshots that are not required anymore
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi tập trung vào việc giảm chi phí lưu trữ backup (backup storage) cho Amazon Redshift – một dịch vụ data warehouse của AWS. Công ty Accompany phát hiện hóa đơn hàng tháng có phí lưu trữ snapshot (bản sao lưu) của Redshift. Yêu cầu là:
- Giảm chi phí này trong tương lai (decrease the cost).
- Tạo giải pháp thông báo (notification) nếu phí vượt ngưỡng (threshold).
- Chọn kết hợp 2 hành động (combination of actions) với ít overhead vận hành nhất (LEAST operational overhead).
Bối cảnh kỹ thuật (cập nhật AWS 2026):
- Redshift tự động tạo automated snapshots (lưu 1-35 ngày tùy retention policy, AWS xóa tự động).
- Manual snapshots do user tạo, lưu vô thời hạn ở S3, phí storage theo GB/tháng cho đến khi xóa.
- Phí backup chủ yếu từ manual snapshots tích tụ lâu ngày.
- Giải pháp phải tối ưu chi phí (xóa thừa, không tăng snapshot mới) và thông báo tự động mà không cần can thiệp thủ công thường xuyên.
📘 Tài liệu tham khảo:
- AWS Redshift Docs: "Managing snapshots" (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html).
- AWS CloudWatch Billing Alarms: "Creating a billing alarm" (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html).
✅ Đáp án đúng (Chọn 2)
Hai lựa chọn đúng là:
- Create an Amazon CloudWatch billing alarm to publish a message to an Amazon Simple Notification Service (Amazon SNS) topic if the threshold is exceeded.
- Delete manual snapshots that are not required anymore.
Lý do chọn:
- Delete manual snapshots: Trực tiếp giảm chi phí ngay lập tức bằng cách xóa snapshot thừa (chủ yếu gây phí storage). Đây là hành động một lần (one-time), không overhead liên tục. Redshift manual snapshots lưu mãi ở S3 nên tích tụ phí cao – xóa là cách hiệu quả nhất.
- CloudWatch billing alarm + SNS: Thông báo tự động khi phí Redshift backup vượt ngưỡng (ví dụ: $X/tháng). Set up một lần, chạy serverless, zero overhead vận hành (không code, không schedule). AWS Billing metrics hỗ trợ chi tiết đến service-level (Redshift storage).
- Kết hợp đạt LEAST overhead: Không cần monitor thủ công, code custom hay schedule job – hoàn toàn managed service.
🛠️ Phân tích chi tiết từng phương án
-
❌ Migrate all manual snapshots to the Amazon S3 Standard-Infrequent Access (S3 Standard-IA) storage class
Sai vì: Redshift snapshots là managed objects trong S3 bucket của AWS (không public access), không hỗ trợ trực tiếp migrate storage class như S3 object thông thường. Bạn không thể dùng S3 Lifecycle hoặc copy để chuyển IA mà không mất tính toàn vẹn snapshot (restore fail). Overhead cao (cần script custom, risk data loss), không phải giải pháp chính thức AWS khuyến nghị cho Redshift (2026 docs vẫn vậy). Chỉ giảm phí nhẹ (~30%) nhưng không giải quyết gốc rễ (vẫn lưu mãi). -
❌ Use an automated snapshot schedule to take a snapshot once each day
Sai vì: Automated snapshots đã có sẵn (mặc định hàng ngày), chỉ tăng retention days (1-35) chứ không giảm phí manual snapshots. Nếu set daily mà retention cao, có thể tăng chi phí (AWS lưu thêm). Không giải quyết thông báo threshold, và overhead quản lý schedule không cần thiết vì automated đã optimal. -
✅ Create an Amazon CloudWatch billing alarm to publish a message to an Amazon Simple Notification Service (Amazon SNS) topic if the threshold is exceeded
Đúng vì: CloudWatch hỗ trợ Billing metrics chi tiết (e.g., "Redshift::BackupStorageBytes"), set alarm threshold (e.g., >$50), publish ngay đến SNS (email/SMS/Slack). Zero-code, serverless, set up 5 phút, monitor 24/7. Least overhead – AWS managed hoàn toàn, cập nhật 2026 vẫn là best practice cho cost alerting. -
❌ Create a serverless AWS Glue job to run every 4 hours to describe cluster snapshots and send an email message if the threshold is exceeded
Sai vì: Dùng Glue (ETL serverless) để gọi APIDescribeClusterSnapshots, tính toán size/threshold, gửi email – overhead cao: Viết script PySpark, schedule trigger (EventBridge), maintain IAM roles/logs/cost Glue runtime (~$0.44/DPU/giờ). Không efficient bằng CloudWatch native (chạy liên tục 6 lần/ngày, phí tích tụ). AWS recommend CloudWatch cho billing alert. -
✅ Delete manual snapshots that are not required anymore
Đúng vì: Giảm chi phí trực tiếp – manual snapshots là nguồn phí chính (lưu vô hạn, ~$0.02/GB/tháng ở us-east-1). Liệt kê qua Console/CLI (describe-cluster-snapshots), xóa không cần (~1 phút/cluster). Không tạo snapshot mới, an toàn (giữ automated cho DR). One-time action, zero ongoing overhead – phù hợp "future costs".
Kết luận 💡: Kết hợp xóa manual + alarm CloudWatch là optimal, scalable cho DevOps. Áp dụng ngay để tránh phí bất ngờ! 🚀
What should the database specialist implement to meet these requirements with MINIMAL operational overhead?
- A Configure an Amazon EC2 instance to run on a schedule to initiate database maintenance jobs
- B Configure AWS Batch with AWS Step Functions to schedule long-running database maintenance tasks
- C Create an Amazon EventBridae (Amazon CloudWatch Events) rule with AWS Lambda that runs on a schedule to initiate database maintenance jobs
- D Turn on the pg_cron extension in the Aurora PostgreSOL database and schedule the database maintenance tasks by using the cron.schedule function
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 một hiệu sách trực tuyến đã di chuyển cơ sở dữ liệu từ Oracle on-premises sang Amazon Aurora PostgreSQL 13. Trước đây, họ sử dụng các công việc lập lịch (scheduled jobs) để chạy các script SQL tùy chỉnh, thực hiện các nhiệm vụ bảo trì kéo dài hàng giờ như bảo trì phân vùng (partition maintenance) và thu thập thống kê (statistics gathering). Nhóm ứng dụng liên hệ với chuyên gia cơ sở dữ liệu để tìm giải pháp thay thế lý tưởng cho việc lập lịch các công việc này trên Aurora PostgreSQL, với yêu cầu chính là giảm thiểu tối đa gánh nặng vận hành (MINIMAL operational overhead).
🛠️ Yêu cầu cốt lõi: Giải pháp phải hỗ trợ chạy các script SQL dài hạn trực tiếp trong môi trường Aurora PostgreSQL, dễ quản lý, không cần quản lý hạ tầng bên ngoài, và tích hợp mượt mà với PostgreSQL để tránh phức tạp hóa quy trình DevOps. Điều này phù hợp với các best practices AWS năm 2026, nơi Aurora hỗ trợ các extension PostgreSQL nâng cao cho tự động hóa database-native.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Turn on the pg_cron extension in the Aurora PostgreSOL database and schedule the database maintenance tasks by using the cron.schedule function
Lý do chọn đáp án này (dựa trên kiến thức AWS cập nhật 2026):
✅ pg_cron là extension chính thức của PostgreSQL (tích hợp sẵn trong Aurora PostgreSQL từ phiên bản 13+), cho phép lập lịch chạy các lệnh SQL trực tiếp bên trong cơ sở dữ liệu mà không cần công cụ bên ngoài. Nó hỗ trợ các nhiệm vụ bảo trì dài hạn như partition maintenance và statistics gathering qua hàm cron.schedule.
✅ Minimal operational overhead: Không cần quản lý instance riêng, Lambda billing theo thời gian chạy ngắn, hay orchestration phức tạp – mọi thứ chạy native trong DB cluster, tự động scale với Aurora, và dễ bật/tắt qua parameter group.
✅ Phù hợp nhất cho workloads database-heavy, giảm độ trễ và tích hợp liền mạch so với Oracle DBMS Scheduler cũ.
📋 Phân tích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn một cách chi tiết, giữ nguyên văn bản gốc tiếng Anh:
-
Configure an Amazon EC2 instance to run on a schedule to initiate database maintenance jobs
❌ Phương án SAI: Yêu cầu triển khai và quản lý EC2 instance thủ công (provisioning, patching, scaling, monitoring), kết nối tới Aurora qua JDBC/ODBC để chạy SQL. Gây operational overhead cao (chi phí instance idle, bảo mật VPC/SSM, scheduling qua cron/EC2 Scheduler), không native với PostgreSQL, và không hiệu quả cho tasks dài hạn (có thể timeout). Không khuyến nghị cho minimal overhead theo AWS Well-Architected Framework 2026. -
Configure AWS Batch with AWS Step Functions to schedule long-running database maintenance tasks
❌ Phương án SAI: AWS Batch phù hợp cho batch computing containerized, Step Functions cho orchestration state machine. Tuy hỗ trợ long-running tasks, nhưng cần build Docker images chạy SQL scripts, quản lý queues/jobs, IAM roles phức tạp, và kết nối DB – dẫn đến overhead lớn về setup pipeline, monitoring Fargate/EC2, retry logic. Không phải giải pháp database-native, tăng chi phí và độ phức tạp so với pg_cron đơn giản. -
Create an Amazon EventBridae (Amazon CloudWatch Events) rule with AWS Lambda that runs on a schedule to initiate database maintenance jobs
❌ Phương án SAI: EventBridge + Lambda lý tưởng cho serverless scheduling ngắn hạn (dưới 15 phút runtime). Với tasks "hours-long", Lambda sẽ timeout (max 15 phút), buộc phải chain invocations hoặc dùng EFS – gây overhead vận hành cao (code Python/SQLAlchemy, error handling, Lambda limits, cold starts). Không tối ưu cho maintenance SQL nặng, và AWS khuyến nghị tránh cho workloads dài hạn thay vào extensions như pg_cron. -
Turn on the pg_cron extension in the Aurora PostgreSOL database and schedule the database maintenance tasks by using the cron.schedule function
✅ Phương án ĐÚNG (như đã giải thích ở trên): Giải pháp native, zero-infra với overhead tối thiểu, hỗ trợ chính thức từ Aurora PostgreSQL 13+ (cập nhật 2026 vẫn giữ nguyên).
📘 Tài liệu tham khảo (AWS Official Docs - cập nhật 2026)
- pg_cron trong Aurora PostgreSQL: Amazon Aurora PostgreSQL Extensions - pg_cron – Hướng dẫn bật extension qua DB parameter group và sử dụng
cron.schedule. - Aurora Best Practices cho Maintenance: Automating Database Tasks with pg_cron.
- Well-Architected Framework (Operations Pillar): Nhấn mạnh minimal overhead qua managed services/native extensions.
- Release Notes Aurora PostgreSQL 17.1 (2026): Vẫn hỗ trợ đầy đủ pg_cron với cải tiến logging và parallelism cho stats gathering.
🛠️ Lời khuyên DevOps: Trong thực tế DOP-C01 exam, ưu tiên solutions serverless/database-native để đạt score cao về reliability & operational excellence! Nếu implement, test pg_cron qua SELECT cron.schedule('maintenance-job', '0 2 * * *', 'SQL_script_here');.
Which set of steps should the database specialist take to obtain this information?
- A Navigate to RDS Performance Insights. Select the database that is associated with the application. Update the counter metrics to show top_sql. Update the time range to when the load test occurred. Review the top SQL statements.
- B Navigate to RDS Performance Insights. Select the database that is associated with the application. Update the time range to when the load test occurred. Change the slice to SQL. Review the top SQL statements.
- C Navigate to Amazon CloudWatch. Select the metrics for the appropriate DB instance. Review the top SQL statements metric for the time range when the load test occurred. Create a CloudWatch dashboard to watch during future load tests.
- D Navigate to Amazon CloudWatch. Find the log group for the application's database. Review the top-sql-statements log file for the time range when the load test occurred.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi tập trung vào tình huống thực tế trong AWS: Một công ty đang chuẩn bị phát hành ứng dụng mới, nhưng trong quá trình load test (kiểm tra tải), cơ sở dữ liệu Amazon RDS for MySQL phản hồi chậm hơn mong đợi, dẫn đến ứng dụng không đạt mục tiêu hiệu suất. Nhiệm vụ của database specialist là xác định những câu lệnh SQL nào đang tiêu tốn tải (load) nhiều nhất để tối ưu hóa.
🔍 Mục tiêu chính: Sử dụng công cụ AWS phù hợp để phân tích top SQL statements dựa trên dữ liệu load test. Điều này đòi hỏi kiến thức về RDS Performance Insights – tính năng mạnh mẽ của RDS giúp visualize và phân tích hiệu suất SQL theo thời gian thực, với dữ liệu cập nhật nhất đến năm 2026 (hỗ trợ MySQL, PostgreSQL, v.v., và tích hợp sâu với CloudWatch).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng:
Navigate to RDS Performance Insights. Select the database that is associated with the application. Update the time range to when the load test occurred. Change the slice to SQL. Review the top SQL statements.
Lý do chọn đáp án này 🛠️:
Đây là quy trình chuẩn xác và hiệu quả nhất theo tài liệu AWS mới nhất (2026). RDS Performance Insights cung cấp dashboard trực quan với load chart, nơi bạn chọn DB instance, điều chỉnh time range để khớp với thời điểm load test, sau đó dùng slice by SQL (không phải counter metrics) để lọc và xem top SQL statements tiêu tốn DB load nhiều nhất (dựa trên metrics như CPU, I/O, v.v.). Quy trình này nhanh chóng, không cần cấu hình thêm, và hỗ trợ drill-down chi tiết. ✅ Hoàn hảo cho troubleshooting!
📋 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 một cách chi tiết, giữ nguyên văn bản gốc bằng tiếng Anh. Tôi đánh dấu ✅ đúng hoặc ❌ sai, kèm lý do bằng tiếng Việt rõ ràng:
-
❌ Phương án SAI:
Navigate to RDS Performance Insights. Select the database that is associated with the application. Update the counter metrics to show top_sql. Update the time range to when the load test occurred. Review the top SQL statements.
Lý do sai 🚫: Performance Insights không có "counter metrics" để update thành top_sql. Thay vào đó, nó sử dụng slice dimension (như SQL, Host, User, Wait) để phân tích. Bước "update counter metrics" là sai sót kỹ thuật, dẫn đến không hiển thị đúng dữ liệu. Phương án này gần đúng nhưng thiếu chính xác, dễ gây nhầm lẫn. -
✅ Phương án ĐÚNG (như đã phân tích ở trên):
Navigate to RDS Performance Insights. Select the database that is associated with the application. Update the time range to when the load test occurred. Change the slice to SQL. Review the top SQL statements.
Lý do đúng 🏆: Quy trình chuẩn: Chọn DB → Set time range → Slice to SQL → Xem top statements. Đây là best practice cho RDS MySQL, hỗ trợ analyze load từ microsecond đến hàng tháng. -
❌ Phương án SAI:
Navigate to Amazon CloudWatch. Select the metrics for the appropriate DB instance. Review the top SQL statements metric for the time range when the load test occurred. Create a CloudWatch dashboard to watch during future load tests.
Lý do sai 🚫: CloudWatch metrics cho RDS không có metric trực tiếp tên "top SQL statements". CloudWatch chỉ cung cấp metrics tổng quát như CPUUtilization, DatabaseConnections, ReadIOPS (không drill-down vào SQL cụ thể). Tạo dashboard là ý hay cho monitoring tương lai, nhưng không giải quyết vấn đề xác định SQL ngay lập tức. Phải dùng Performance Insights! -
❌ Phương án SAI:
Navigate to Amazon CloudWatch. Find the log group for the application's database. Review the top-sql-statements log file for the time range when the load test occurred.
Lý do sai 🚫: CloudWatch Logs không có log file tên "top-sql-statements". RDS logs (như slow query log, general log) phải enable riêng (qua Parameter Group), và chúng ghi raw queries chứ không phải top aggregated statements. Không có file tổng hợp sẵn như vậy, việc tìm kiếm thủ công rất kém hiệu quả so với Performance Insights.
📘 Tài liệu tham khảo (cập nhật 2026)
- AWS RDS Performance Insights User Guide: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html – Chi tiết về slice by SQL và load analysis.
- RDS Performance Insights Overview: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.Overview.html – Giải thích DB load và top SQL.
- Best Practices for RDS Monitoring: AWS Well-Architected Framework (DevOps Pillar, 2026 edition).
Hy vọng phân tích này giúp bạn ôn thi DOP-C02 hiệu quả! 🚀 Nếu cần thêm ví dụ thực hành, hãy hỏi nhé!
How can the database specialist minimize the performance degradation after failover?
- A Enable cluster cache management for the Aurora DB cluster and set the promotion priority for the writer DB instance and replica to tier-0
- B Enable cluster cache management tor the Aurora DB cluster and set the promotion priority for the writer DB instance and replica to tier-1
- C Enable Query Plan Management for the Aurora DB cluster and perform a manual plan capture
- D Enable Query Plan Management for the Aurora DB cluster and force the query optimizer to use the desired plan
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 một công ty sử dụng Amazon Aurora PostgreSQL DB cluster làm backend cho ứng dụng di động chạy liên tục. Chuyên gia cơ sở dữ liệu hài lòng với high availability (HA) và failover nhanh, nhưng lo ngại về hiệu suất giảm sút (performance degradation) sau khi failover xảy ra.
📘 Vấn đề cốt lõi: Trong Aurora, failover (chuyển writer sang reader replica) rất nhanh (thường dưới 30 giây), nhưng có thể gây mất shared buffer cache của writer cũ, dẫn đến cache miss cao, tăng I/O từ storage, và hiệu suất chậm tạm thời (cold start). Mục tiêu là minimize degradation này bằng cách giữ nguyên cache càng nhiều càng tốt qua failover.
🛠️ Giải pháp chính: Sử dụng Cluster Cache Management (CCM) – tính năng mới của Aurora (hỗ trợ PostgreSQL từ version 13+), giúp ưu tiên promote instance có shared cache tương đồng cao nhất (dựa trên promotion tier). Điều này giảm thiểu rebuild cache sau failover. Kiến thức cập nhật đến 2026: CCM vẫn là best practice theo AWS RDS docs mới nhất.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Enable cluster cache management for the Aurora DB cluster and set the promotion priority for the writer DB instance and replica to tier-0
Lý do:
- Cluster Cache Management (CCM) kích hoạt cơ chế theo dõi và ưu tiên shared cache qua failover.
- Tier-0 là mức ưu tiên cao nhất (highest priority), dành cho writer hiện tại và replica chính (high promotion tier replicas). Khi failover, Aurora sẽ promote instance tier-0 đầu tiên, giữ nguyên ~90-95% cache, giảm degradation đáng kể (cache hit ratio cao ngay lập tức).
- Đây là cách tối ưu nhất theo AWS best practices, giảm thời gian recovery cache từ phút xuống giây.
📘 Nguồn tham khảo:
- AWS Docs: Aurora Cluster Cache Management (cập nhật 2024-2026).
- AWS Blog: Minimize Aurora Failover Impact with CCM.
📋 Giải thích tất cả các phương án (đúng/sai)
-
✅ Enable cluster cache management for the Aurora DB cluster and set the promotion priority for the writer DB instance and replica to tier-0
Đúng hoàn toàn: Như giải thích ở trên. Tier-0 đảm bảo instance được promote có cache giống writer cũ nhất (high cache similarity score), minimize performance degradation sau failover. Đây là cấu hình khuyến nghị chính thức của AWS cho HA clusters. -
❌ Enable cluster cache management tor the Aurora DB cluster and set the promotion priority for the writer DB instance and replica to tier-1
Sai: Có lỗi chính tả "tor" (nên là "for"), nhưng quan trọng hơn, tier-1 chỉ là mức ưu tiên thấp hơn tier-0 (medium priority). Nó vẫn dùng CCM nhưng không ưu tiên cao nhất, dẫn đến promote instance có cache kém tương đồng hơn, vẫn gây degradation (cache rebuild nhiều hơn). Không phải lựa chọn tối ưu. -
❌ Enable Query Plan Management for the Aurora DB cluster and perform a manual plan capture
Sai: Query Plan Management (QPM) dùng để quản lý query execution plans, tránh regression do optimizer thay đổi plan (ví dụ: capture baseline plans thủ công). Nó không liên quan đến cache hoặc failover performance, chỉ giúp ổn định query plans sau khi cluster restart hoặc upgrade, không minimize cache-related degradation. -
❌ Enable Query Plan Management for the Aurora DB cluster and force the query optimizer to use the desired plan
Sai: Tương tự, QPM cho phép force dùng plan cụ thể để tránh bad plans từ optimizer. Tuy hữu ích cho query stability, nhưng không giải quyết vấn đề cache loss sau failover. Degradation ở đây là do I/O cao từ cache miss, không phải query plan thay đổi.
🛠️ Lời khuyên thực hành: Để triển khai, dùng AWS Console/CLI: aws rds modify-db-cluster --db-cluster-identifier mycluster --enable-cluster-cache-management --db-cluster-parameter-group-name mypg rồi set promotion tier qua parameter group (aurora_promotion_tier). Test failover bằng aws rds failover-db-cluster để verify.
Which tools and approach should be used to meet these requirements?
- A Use AWS DMS to perform data migration and to automatically create all schemas with Aurora PostgreSQL
- B Use AWS DMS to perform data migration and use the AWS Schema Conversion Tool (AWS SCT) to automatically generate the converted code
- C Use the AWS Schema Conversion Tool (AWS SCT) to automatically convert all types of Oracle schemas to PostgreSQL and migrate the data to Aurora
- D Use the dump and pg_dump utilities for both data migration and schema conversion
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi xoay quanh việc di chuyển cơ sở dữ liệu Oracle on-premises sang Amazon Aurora PostgreSQL DB cluster với quy mô lớn: 500 GB dữ liệu, 900 stored procedures và functions, cùng application source code chứa embedded SQL statements. Công ty nhận thức rằng một số database code objects và custom features không thể tự động chuyển đổi hoàn toàn, cần can thiệp thủ công. Yêu cầu chính là hoàn thành nhanh nhất có thể với downtime tối thiểu (minimal downtime).
🛠️ Phân tích yêu cầu chính:
- Cần công cụ hỗ trợ chuyển schema/code (stored procedures, functions, embedded SQL) một cách tự động nhất có thể.
- Di chuyển dữ liệu lớn (500 GB) với khả năng ongoing replication để giảm downtime (sử dụng CDC - Change Data Capture).
- Kết hợp heterogeneous migration từ Oracle sang PostgreSQL (khác engine), nên cần tool chuyên biệt cho schema conversion và data migration riêng biệt.
✅ Đây là kịch bản điển hình cho Database Migration trên AWS, ưu tiên tốc độ và độ tin cậy cao.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use AWS DMS to perform data migration and use the AWS Schema Conversion Tool (AWS SCT) to automatically generate the converted code.
Lý do chi tiết 🏆:
- AWS SCT chuyên chuyển đổi schema tự động từ Oracle sang PostgreSQL, bao gồm stored procedures, functions (hỗ trợ >70-90% tự động cho Oracle-to-PG, tùy phiên bản), và generate code scripts cho embedded SQL. Nó đánh giá độ tương thích (conversion report) và hỗ trợ manual fix cho phần còn lại (như custom features).
- AWS DMS xử lý data migration hiệu quả với full load + CDC (ongoing replication), phù hợp 500 GB dữ liệu, đảm bảo minimal downtime bằng cách sync thay đổi real-time đến cutover. DMS hỗ trợ Aurora PostgreSQL làm target.
- Kết hợp lý tưởng: SCT trước (schema + code), DMS sau (data), nhanh chóng và đáng tin cậy nhất theo best practices AWS (cập nhật 2026: SCT hỗ trợ Aurora PG 15+, DMS v3.5+ với improved heterogeneous support). Không tool nào đơn lẻ làm hết cả hai.
📋 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), đánh dấu ✅ đúng hoặc ❌ sai, kèm lý do bằng tiếng Việt:
-
❌ Use AWS DMS to perform data migration and to automatically create all schemas with Aurora PostgreSQL
Sai vì: DMS giỏi data migration (full load + CDC) nhưng không tự động tạo schema đầy đủ cho heterogeneous migration như Oracle-to-PG, đặc biệt stored procedures/functions phức tạp (chỉ hỗ trợ basic schema, không convert code objects). Sẽ cần manual schema tạo trước, không đáp ứng "automatically generate converted code" và chậm hơn. -
✅ Use AWS DMS to perform data migration and use the AWS Schema Conversion Tool (AWS SCT) to automatically generate the converted code
Đúng vì: Như giải thích trên, SCT xử lý schema/code conversion (generate scripts tự động + report manual fixes), DMS lo data với minimal downtime. Phù hợp hoàn hảo yêu cầu tốc độ cao, quy mô lớn, và heterogeneous DB. -
❌ Use the AWS Schema Conversion Tool (AWS SCT) to automatically convert all types of Oracle schemas to PostgreSQL and migrate the data to Aurora
Sai vì: SCT xuất sắc schema conversion (bao gồm code) nhưng không migrate data lớn (500 GB) hiệu quả; chỉ hỗ trợ data migration nhỏ qua DMS integration hoặc scripts. Không có CDC cho minimal downtime, và không "automatically convert ALL types" (cần manual cho custom features). -
❌ Use the dump and pg_dump utilities for both data migration and schema conversion
Sai vì: Oracle dump (expdp) và pg_dump là native tools thủ công, không tự động convert schema/code giữa Oracle-PG (cần rewrite toàn bộ 900 procedures/functions thủ công). Với 500 GB, quá chậm, không hỗ trợ CDC/minimal downtime, và không scale cho production migration nhanh.
📘 Tài liệu tham khảo (cập nhật AWS 2026)
- AWS SCT & DMS Best Practices: AWS Database Migration Guide và SCT User Guide – Heterogeneous migrations Oracle to Aurora PostgreSQL.
- Aurora PostgreSQL Migration: AWS Blogs - Migrate Oracle to Aurora PG (2024+, hỗ trợ SCT v1.0+ với AI-assisted conversion).
- DMS Features: Full Load + CDC cho minimal downtime (DMS 3.5.1+, 2025 updates).
🛠️ Lời khuyên: Test với SCT assessment report trước để ước lượng manual effort (~10-30% cho Oracle PL/SQL to PG PL/pgSQL).
The company's security team now mandates encryption in transit and encryption at rest for all traffic. A database specialist is using the AWS CLI to comply with this mandate.
Which combination of steps should the database specialist take to meet these requirements? (Choose three.)
- A Create a manual backup of the existing Redis replication group by using the create-snapshot command. Restore from the backup by using the create-replication-group command
- B Use the --transit-encryption-enabled parameter on the new Redis replication group
- C Use the --at-rest-encryption-enabled parameter on the existing Redis replication group
- D Use the --transit-encryption-enabled parameter on the existing Redis replication group
- E Use the --at-rest-encryption-enabled parameter on the new Redis replication group
- F Create a manual backup of the existing Redis replication group by using the CreateBackupSelection command. Restore from the backup by using the StartRestoreJob command
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh một công ty phát triển ứng dụng di động trên AWS, sử dụng Amazon ElastiCache for Redis trong VPC để quản lý session affinity (sticky sessions) và cookies cho người dùng ẩn danh. Do phát triển nhanh chóng, họ chưa áp dụng best practices bảo mật. Bây giờ, đội ngũ bảo mật yêu cầu mã hóa dữ liệu trong quá trình truyền (encryption in transit) và mã hóa dữ liệu tại chỗ (encryption at rest) cho tất cả traffic liên quan đến ElastiCache Redis replication group.
Một database specialist sử dụng AWS CLI để tuân thủ. Câu hỏi yêu cầu chọn COMBINATION OF THREE STEPS (3 bước kết hợp) để đáp ứng yêu cầu này.
🛠️ Thách thức chính: Với ElastiCache Redis, bạn KHÔNG THỂ kích hoạt encryption in transit hoặc at-rest trực tiếp trên replication group hiện tại (existing cluster). Phải tạo snapshot thủ công từ cluster cũ, sau đó tạo replication group mới từ snapshot đó và kích hoạt các tùy chọn encryption trên cluster mới. Điều này đảm bảo tính liên tục dữ liệu mà không downtime lớn, phù hợp với kiến trúc production (dựa trên tài liệu AWS cập nhật đến 2024-2026, không thay đổi cơ bản).
📘 Tài liệu tham khảo:
- Encryption at Rest (ElastiCache Redis)
- Encryption in Transit (ElastiCache Redis)
- AWS CLI Reference: create-snapshot & create-replication-group
✅ Đáp án đúng và lý do lựa chọn
Các đáp án đúng (chọn 3) là:
- Create a manual backup of the existing Redis replication group by using the create-snapshot command. Restore from the backup by using the create-replication-group command
- Use the --transit-encryption-enabled parameter on the new Redis replication group
- Use the --at-rest-encryption-enabled parameter on the new Redis replication group
Lý do chọn:
- Đây là quy trình chuẩn theo AWS: Tạo snapshot từ cluster cũ → Tạo cluster mới từ snapshot với encryption enabled (cả transit và at-rest chỉ hỗ trợ trên new replication group). Không thể modify existing cluster. Quy trình này minimize downtime bằng cách promote replica hoặc switchover. Hoàn hảo cho production app đang popular!
🔍 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 phương án một cách rõ ràng:
✅ Create a manual backup of the existing Redis replication group by using the create-snapshot command. Restore from the backup by using the create-replication-group command
Đúng: Đây là bước đầu tiên bắt buộc. Lệnh aws elasticache create-snapshot tạo backup thủ công từ replication group hiện tại. Sau đó, aws elasticache create-replication-group --snapshot-arns <arn> --at-rest-encryption-enabled --transit-encryption-enabled khôi phục vào cluster mới với encryption. Đảm bảo dữ liệu không mất và migration mượt mà.
✅ Use the --transit-encryption-enabled parameter on the new Redis replication group
Đúng: Encryption in transit (TLS) chỉ kích hoạt được khi tạo replication group mới. Tham số --transit-encryption-enabled buộc client kết nối qua TLS (port 6380 thay vì 6379), bảo vệ traffic giữa client và ElastiCache nodes.
✅ Use the --at-rest-encryption-enabled parameter on the new Redis replication group
Đúng: Encryption at rest (sử dụng AWS KMS) chỉ hỗ trợ trên new replication group. Tham số --at-rest-encryption-enabled --kms-key-id <key> mã hóa dữ liệu trên disk (EBS volumes), snapshot và backup tự động.
❌ Use the --at-rest-encryption-enabled parameter on the existing Redis replication group
Sai: AWS KHÔNG HỖ TRỘ modify at-rest encryption trên existing replication group. Nếu cố dùng modify-replication-group, tham số này bị ignore hoặc lỗi. Phải tạo mới từ snapshot!
❌ Use the --transit-encryption-enabled parameter on the existing Redis replication group
Sai: Tương tự, transit encryption KHÔNG THỂ enable trên existing cluster qua modify-replication-group. Chỉ hỗ trợ lúc tạo mới, vì yêu cầu thay đổi auth token và port listener.
❌ Create a manual backup of the existing Redis replication group by using the CreateBackupSelection command. Restore from the backup by using the StartRestoreJob command
Sai: Các lệnh CreateBackupSelection và StartRestoreJob thuộc AWS Backup service (dùng cho Backup Vaults, EC2, RDS...), KHÔNG ÁP DỤNG cho ElastiCache snapshots. ElastiCache dùng native CLI như create-snapshot và create-replication-group. Sai hoàn toàn!
🛡️ Lời khuyên DevOps: Sau migration, test kết nối app với new endpoint, enable Multi-AZ cho HA, và monitor qua CloudWatch. Update IAM roles cho KMS nếu cần! 🚀
Which of the following can the database specialist use to investigate the query plan and analyze the query performance?
- A AWS X-Ray deep linking
- B Amazon CloudWatch Logs Insights
- C MongoDB explain() method
- D AWS CloudTrail with a custom filter
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 Amazon DocumentDB (với tính tương thích MongoDB) – một dịch vụ cơ sở dữ liệu NoSQL được AWS quản lý, hỗ trợ lưu trữ và truy vấn các tài liệu JSON phức tạp. Vấn đề là cluster DocumentDB mất nhiều thời gian để trả kết quả truy vấn (query results), dẫn đến hiệu suất kém. Nhiệm vụ của database specialist là điều tra query plan (kế hoạch thực thi truy vấn) và phân tích hiệu suất truy vấn (query performance) để khắc phục.
🛠️ Bối cảnh kỹ thuật (cập nhật đến 2026): DocumentDB hoàn toàn tương thích với MongoDB wire protocol (API 4.0+), nên các công cụ phân tích query của MongoDB như explain() có thể sử dụng trực tiếp qua mongo shell hoặc drivers. Đây là cách chuẩn để xem chi tiết execution plan, index usage, stages (COLLSCAN, IXSCAN), và bottlenecks như full table scan.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: MongoDB explain() method
📊 Lý do: Phương pháp explain() là công cụ chính thức và mạnh mẽ nhất trong MongoDB (và DocumentDB tương thích) để phân tích query plan chi tiết. Nó trả về thông tin như: winning plan (kế hoạch tối ưu), rejected plans, executionTimeMillis, totalDocsExamined, totalKeysExamined, và index usage. Database specialist có thể chạy db.collection.find(query).explain("executionStats") để xác định nguyên nhân chậm (ví dụ: thiếu index hoặc sort không tối ưu). Đây là cách AWS khuyến nghị đầu tiên cho troubleshooting query performance trong DocumentDB (theo best practices 2025-2026).
🔍 Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn một cách chi tiết. Tôi giữ nguyên văn bản gốc bằng tiếng Anh, chỉ giải thích bằng tiếng Việt với emoji đánh dấu:
-
❌ AWS X-Ray deep linking
Phương án này sai vì AWS X-Ray là dịch vụ tracing cho ứng dụng (application-level tracing), dùng để theo dõi latency giữa services như Lambda, API Gateway, nhưng không hỗ trợ query plan bên trong DocumentDB. Deep linking chỉ giúp nhảy vào logs/traces, không phân tích execution plan của MongoDB queries. Không áp dụng trực tiếp cho database internals. -
❌ Amazon CloudWatch Logs Insights
Phương án này sai vì CloudWatch Logs Insights giỏi phân tích logs (ví dụ: error rates, slow log queries nếu enable slow query logging), nhưng không cung cấp query plan chi tiết như stages hay index stats. Nó chỉ aggregate metrics/logs, không thay thếexplain()cho performance profiling sâu trong DocumentDB. -
✅ MongoDB explain() method
Phương án này đúng như đã giải thích ở trên. Đây là công cụ native, chi tiết nhất để investigate query plan và performance, hỗ trợ đầy đủ trong DocumentDB (compatibility với MongoDB 5.0+). Ví dụ: verbosity levels như "queryPlanner", "executionStats", "allPlansExecution" giúp so sánh plans và tối ưu index. -
❌ AWS CloudTrail with a custom filter
Phương án này sai vì CloudTrail ghi API calls và audit events (như CreateCluster, ModifyDBInstance), không capture query-level details bên trong DocumentDB. Custom filter chỉ lọc events như authorization, không liên quan đến query execution plan hay performance analysis.
📘 Tài liệu tham khảo (AWS cập nhật mới nhất 2026)
- AWS DocumentDB Developer Guide - Query Performance Profiling: https://docs.aws.amazon.com/documentdb/latest/developerguide/performance-profiling.html – Khuyến nghị sử dụng
explain()làm bước đầu tiên. - MongoDB Manual - explain(): https://www.mongodb.com/docs/manual/reference/method/cursor.explain/ – Tương thích 100% với DocumentDB.
- AWS re:Post & Best Practices: Enable Performance Insights cho DocumentDB (nếu cần bổ sung), nhưng
explain()vẫn là core tool cho query plan.
🛠️ Lời khuyên thực tế: Sau explain(), kiểm tra indexes qua db.collection.getIndexes(), và dùng CloudWatch metrics (CPUUtilization, ReadIOPS) để monitor tổng quát. Nếu cần scale, xem xét cluster resize hoặc shard!
Which steps should the database specialist perform to meet the production team's requirement? (Choose three.)
- A Enable automatic backups on the source database
- B Disable automatic backups on the source database
- C Enable binary logging. Set the binlog format parameter to ROW on the source database.
- D Enable binary logging. Set the binlog_format parameter to MIXED on the source database
- E Use the source primary database as the source endpoint for the DMS task. Configure the task as full load plus change data capture(CDC) to complete the migration
- F Use the source secondary database as the source endpoint for the DMS task. Configure the task as full load plus change data capture (CDC) to complete the migration
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 quy trình migrate (di chuyển) một cơ sở dữ liệu sản xuất Amazon RDS for MySQL (đã cấu hình Multi-AZ) sang Amazon Aurora MySQL bằng AWS Database Migration Service (AWS DMS). Chuyên viên cơ sở dữ liệu cần validate (xác thực) database đích trước khi chuyển ứng dụng sang sử dụng endpoint mới. Yêu cầu chọn BA bước để đáp ứng nhu cầu của đội ngũ sản xuất.
🛠️ Bối cảnh chính:
- Nguồn: RDS MySQL Multi-AZ (có primary và standby replica).
- Đích: Aurora MySQL.
- Phương pháp: DMS với full load + Change Data Capture (CDC) để copy dữ liệu ban đầu và theo dõi thay đổi liên tục, cho phép validate mà không downtime ngay lập tức.
- Thách thức với Multi-AZ RDS MySQL: Binary log (binlog) chỉ khả dụng gián tiếp qua automated backups trên primary, không trực tiếp trên standby.
Mục tiêu là thiết lập DMS task để migrate an toàn, hỗ trợ CDC chính xác và sử dụng primary endpoint. (Kiến thức dựa trên AWS DMS phiên bản mới nhất 2025-2026, hỗ trợ Aurora Serverless v2 và DMS Fleet Advisor nâng cao).
✅ Đáp án đúng (Chọn 3)
Các bước đúng là:
- Enable automatic backups on the source database ✅
- Enable binary logging. Set the binlog format parameter to ROW on the source database. ✅
- Use the source primary database as the source endpoint for the DMS task. Configure the task as full load plus change data capture(CDC) to complete the migration ✅
Lý do lựa chọn:
- Những bước này đảm bảo DMS có thể full load dữ liệu ban đầu và CDC theo dõi thay đổi realtime từ binlog, cho phép validate target trước cutover. Với Multi-AZ RDS MySQL, automated backups bắt buộc để DMS truy xuất binlog (vì standby không expose binlog trực tiếp). Binlog format ROW đảm bảo CDC chính xác (không mất dữ liệu transaction). Sử dụng primary endpoint vì chỉ primary cung cấp full binlog qua backups. Kết hợp full load + CDC cho phép ứng dụng tiếp tục ghi vào source trong lúc validate target.
📋 Phân tích tất cả các phương án
Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Tôi đánh dấu ✅ cho đúng và ❌ cho sai, kèm giải thích bằng tiếng Việt dựa trên docs AWS DMS mới nhất.
-
Enable automatic backups on the source database
✅ Đúng. Với RDS MySQL Multi-AZ, DMS bắt buộc automated backups để truy xuất binary log từ automated snapshots (standby không expose binlog). Không có backups, CDC thất bại vì DMS không đọc được changes. Bước này thiết lập retention (ít nhất 1 ngày) qua RDS console/CLI. -
Disable automatic backups on the source database
❌ Sai. Việc tắt backups sẽ chặn DMS CDC vì Multi-AZ RDS MySQL phụ thuộc backups để capture binlog. DMS docs cảnh báo rõ: "Enable automated backups for Multi-AZ MySQL sources". -
Enable binary logging. Set the binlog format parameter to ROW on the source database.
✅ Đúng. Binary logging bắt buộc cho CDC (DMS đọc binlog để track inserts/updates/deletes). Format ROW là yêu cầu chuẩn (theo DMS best practices 2026), đảm bảo capture chính xác dữ liệu row-level, tránh lỗi với non-deterministic functions (như UUID). Set qua parameter group:binlog_format=ROW,binlog_checksum=NONE. -
Enable binary logging. Set the binlog_format parameter to MIXED on the source database
❌ Sai. Mặc dù MIXED hỗ trợ cơ bản, nhưng không khuyến nghị cho CDC DMS vì có thể mất dữ liệu (statement-based rows lẫn lộn, lỗi với triggers/functions). Docs AWS DMS chỉ định ROW là bắt buộc cho MySQL-to-Aurora để độ chính xác 100%. -
Use the source primary database as the source endpoint for the DMS task. Configure the task as full load plus change data capture(CDC) to complete the migration
✅ Đúng. Primary endpoint là nguồn duy nhất hỗ trợ full binlog cho DMS (qua backups). Task full load + CDC copy initial data rồi sync changes, cho phép validate target (so sánh lag <1s) trước stop task và cutover ứng dụng sang Aurora endpoint. -
Use the source secondary database as the source endpoint for the DMS task. Configure the task as full load plus change data capture (CDC) to complete the migration
❌ Sai. Secondary (standby) là read-only, không hỗ trợ CDC vì Multi-AZ RDS MySQL không lưu binlog đầy đủ trên standby. DMS sẽ lỗi khi cố đọc changes. Docs khuyến cáo luôn dùng primary cho Multi-AZ sources.
📘 Tài liệu tham khảo
- AWS DMS User Guide (2026): Using a MySQL database as a source for AWS DMS – Chi tiết Multi-AZ requirements.
- RDS for MySQL Parameter Groups: Binary logging settings.
- DMS Best Practices for Aurora Migration: Migrating to Aurora MySQL.
- AWS Well-Architected Framework - Database Lens (2025): Khuyến nghị DMS full load + CDC cho zero-downtime migration.
Nếu cần demo CLI hoặc CloudFormation template, hãy cho tôi biết! 🚀
What is the recommended strategy for this use case?
- A Use ElastiCache for Memcached with write-through and long time to live (TTL)
- B Use ElastiCache for Redis with lazy loading and short time to live (TTL)
- C Use ElastiCache for Memcached with lazy loading and short time to live (TTL)
- D Use ElastiCache for Redis with write-through and long time to live (TTL)
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi mô tả một công ty truyền thông đang vận hành website tin tức có tính sẵn sàng cao (highly available) trên AWS, nhưng gặp vấn đề về thời gian tải trang chậm, đặc biệt trong các sự kiện tin tức "hot" thu hút lượng truy cập lớn. Các trang tin tức sau khi publish rất ít thay đổi (chỉ cập nhật nếu phát hiện lỗi). Công ty chọn sử dụng Amazon ElastiCache để caching nhằm cải thiện hiệu suất.
Mục tiêu chính: Tìm chiến lược caching tối ưu với ElastiCache, tập trung vào việc giảm tải database, tăng tốc độ tải trang cho nội dung ít biến động, đồng thời đảm bảo tính nhất quán dữ liệu và tính sẵn sàng cao.
(Kiến thức cập nhật: Theo tài liệu AWS ElastiCache 2024-2026, các pattern caching như write-through/lazy loading được khuyến nghị dựa trên đặc tính dữ liệu: ít thay đổi → ưu tiên cache lâu dài và consistency cao).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use ElastiCache for Redis with write-through and long time to live (TTL)
Lý do chi tiết 🛠️:
- Redis là lựa chọn lý tưởng cho website HA vì hỗ trợ replication đa AZ, persistence (RDB/AOF), và cluster mode để scale horizontally – phù hợp với traffic spike từ tin hot (theo AWS best practices 2026).
- Write-through: Khi publish tin tức mới, dữ liệu được ghi ngay lập tức vào cache và DB, đảm bảo tính nhất quán cao (no stale data), rất phù hợp với nội dung ít thay đổi (chỉ update nếu lỗi).
- Long TTL: Cache giữ dữ liệu lâu (ví dụ: vài giờ/ngày), tăng cache hit ratio cao, giảm tải DB và cải thiện page load time ngay cả với traffic lớn.
Kết hợp này mang lại hiệu suất cao, độ tin cậy, lý tưởng cho use case "static-like" content.
📋 Phân tích tất cả các phương án (đúng/sai)
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 đặc tính use case (ít thay đổi, traffic cao, HA):
-
❌ Use ElastiCache for Memcached with write-through and long time to live (TTL)
Sai vì: Memcached không hỗ trợ persistence hay replication built-in (chỉ in-memory đơn giản), kém HA cho traffic spike. Mặc dù write-through + long TTL tốt cho consistency và hit ratio, nhưng Memcached không scale tốt như Redis cho production HA (AWS khuyến nghị Redis cho multi-node). -
❌ Use ElastiCache for Redis with lazy loading and short time to live (TTL)
Sai vì: Lazy loading chỉ load cache khi miss (tăng latency lần đầu), kết hợp short TTL làm cache expire nhanh → hit ratio thấp, không cải thiện page load time cho traffic lớn. Không phù hợp nội dung ít thay đổi (nên dùng long TTL và write-through để preload). -
❌ Use ElastiCache for Memcached with lazy loading and short time to live (TTL)
Sai vì: Kết hợp Memcached (không HA tốt) + lazy loading (latency cao) + short TTL (hit thấp) là tồi tệ nhất: Cache miss thường xuyên, tải chậm hơn, không tận dụng được đặc tính ít thay đổi của nội dung.
📘 Tài liệu tham khảo
- AWS ElastiCache Documentation: Caching Strategies (cập nhật 2026: Redis ưu tiên cho write-through với static data).
- AWS Well-Architected Framework - Performance Pillar: Caching Patterns.
- Exam Guide DOP-C02 (2024-2026): Nhấn mạnh Redis cho HA caching với TTL dài cho read-heavy workloads.