SAP-C02 练习题

SAP-C02 题目讲解:预知高峰:扩应用也要扩缓存

SAP-C02 练习题讲解。答案 A。更新日期已知,可提前 scheduled scaling,避免等待 CPU 告警后再扩容。

SAP-C02 免费试练题 · 考证匠讲解

题目

A company owns a chain of travel agencies and is running an application in the AWS Cloud. Company employees use the application to search for information about travel destinations. Destination content is updated four times each year. Two fixed Amazon EC2 instances serve the application. The company uses an Amazon Route 53 public hosted zone with a multivalue record of travel.example.com that returns the Elastic IP addresses for the EC2 instances. The application uses Amazon DynamoDB as its primary data store. The company uses a self-hosted Redis instance as a caching solution. During content updates, the load on the EC2 instances and the caching solution increases drastically. This increased load has led to downtime on several occasions. A solutions architect must update the application so that the application is highly available and can handle the load that is generated by the content updates. Which solution will meet these requirements?

A. Set up DynamoDB Accelerator (DAX) as in-memory cache. Update the application to use DAX. Create an Auto Scaling group for the EC2 instances. Create an Application Load Balancer (ALB). Set the Auto Scaling group as a target for the ALB. Update the Route 53 record to use a simple routing policy that targets the ALB's DNS alias. Configure scheduled scaling for the EC2 instances before the content updates.
B. Set up Amazon ElastiCache for Redis. Update the application to use ElastiCache. Create an Auto Scaling group for the EC2 instances. Create an Amazon CloudFront distribution, and set the Auto Scaling group as an origin for the distribution. Update the Route 53 record to use a simple routing policy that targets the CloudFront distribution’s DNS alias. Manually scale up EC2 instances before the content updates.
C. Set up Amazon ElastiCache for Memcached. Update the application to use ElastiCache. Create an Auto Scaling group for the EC2 instances. Create an Application Load Balancer (ALB). Set the Auto Scaling group as a target for the ALB. Update the Route 53 record to use a simple routing policy that targets the ALB's DNS alias. Configure scheduled scaling for the application before the content updates.
D. Set up DynamoDB Accelerator (DAX) as in-memory cache. Update the application to use DAX. Create an Auto Scaling group for the EC2 instances. Create an Amazon CloudFront distribution, and set the Auto Scaling group as an origin for the distribution. Update the Route 53 record to use a simple routing policy that targets the CloudFront distribution's DNS alias. Manually scale up EC2 instances before the content updates.

答案

答案 A。更新日期已知,可提前 scheduled scaling,避免等待 CPU 告警后再扩容。

拆题

  • 更新日期已知,可提前 scheduled scaling,避免等待 CPU 告警后再扩容。
  • 两台固定 EC2 与单机 Redis 形成瓶颈;ASG、ALB 和托管缓存分别解决容量与故障。
  • DAX 适合 DynamoDB 读取加速,但缓存 TTL、写入路径与强一致读取需求需要核对。

每个选项为什么对、为什么错

  • A(正确):DAX 接近现有 DynamoDB 访问模型,ALB 配 ASG 并提前扩容,覆盖缓存与应用两层。
  • B:CloudFront 不能直接把 ASG 当 origin,手动扩容也增加漏操作风险。
  • C:Memcached 加 ALB/ASG 可以构建有效方案,但需要自管缓存填充、失效逻辑;本题原生 DynamoDB 加速的 DAX 路径更直接,不能说 C 完全不可用。
  • D:DAX 正确,但 ASG 不是可直接访问的 CloudFront origin,且手工扩容没有利用已知更新计划。

放到具体场景里

教学例子:发布目的地内容前半小时把应用容量从 2 提到 8,并做缓存预热。客户端使用 DAX 支持的访问方式,更新后按业务新鲜度控制缓存;要求立即最新的读取走正确一致性路径。ALB 分配健康实例,Route 53 alias 指向 ALB 而不是固定实例 EIP。

检查对象本例条件或动作结果与边界
应用层ASG 2→8 提前扩容估算容量需压测
缓存层DAX 与 TTL 策略核对新鲜度
入口层ALB + alias不绑定单台 EIP

遇到同类题的判断顺序

  1. 预测峰值:按四次年度更新安排容量。
  2. 准备缓存:明确刷新和一致性策略。
  3. 弹性服务:ALB 分发到 ASG 健康实例。
  4. 观测收缩:高峰结束后按测量回收容量。
结论:缓存速度不能代替一致性设计,扩容计划必须覆盖应用与数据访问两层。

参考资料

继续练这门考试

同一门考试的免费试练题都附这样的完整讲解,做完再看讲解。