此内容已过时。此版本的架构完善的框架现在可在以下位置找到: https://docs.aws.amazon.com/zh_cn/wellarchitected/2022-03-31/framework/reliability.html

REL 12: 如何测试可靠性?

在为您的工作负载采用弹性设计以应对生产压力以后,测试是确保其按设计预期运行,并且提供您所预期弹性的唯一方式。

资源

Well-Architected lab: Level 300: Testing for Resiliency of EC2 RDS and S3
Injecting Chaos to Amazon EC2 using AWS Systems Manager
Resilience Engineering: Learning to Embrace Failure
AWS re:Invent 2019: Improving resiliency with chaos engineering (DOP309-R1)
Continuous Delivery and Continuous Integration
Using Canaries (Amazon CloudWatch Synthetics)
Use CodePipeline with AWS CodeBuild to test code and run builds
Automate your operational playbooks with AWS Systems Manager
Principles of Chaos Engineering
Apache JMeter
Casey Rosenthal, Lorin Hochstein, Aaron Blohowiak, Nora Jones, Ali Basiri. “Chaos Engineering” (August 2017)
AWS Marketplace: products that can be used for continuous integration
APN Partner: partners that can help with implementation of a continuous integration pipeline

最佳实践:

改进计划

根据行动手册调查故障

  • 使用行动手册来发现问题: 管理手册是用于调查问题的书面程序。在行动手册中记录流程,实现对故障场景的一致而及时的响应。行动手册必须包含所需的信息和指导,让足够熟练的员工能够收集适用信息、确定故障的潜在来源、隔离故障,并确定成因(即,在意外事件发生后执行分析)。
  • 在意外事件发生后执行分析

  • 制定事后分析标准: 有效的事后分析让您有机会针对系统中其他地方使用的架构模式存在的问题提出常见的解决方案。
  • 通过流程来确定事件成因: 设置流程来确定和记录事件成因,以便制定缓解措施来限制或阻止事件再次发生,并且您还可以据此制定及时有效的应对措施。根据目标受众,适当传达成因。
    What is log analytics?
  • 测试功能要求

  • 测试功能要求: 这包括用于验证所需功能的单元测试和集成测试。
    Use CodePipeline with AWS CodeBuild to test code and run builds
    AWS CodePipeline Adds Support for Unit and Custom Integration Testing with AWS CodeBuild
    Continuous Delivery and Continuous Integration
    Using Canaries (Amazon CloudWatch Synthetics)
    Software test automation
  • 测试扩展和性能要求

  • 测试扩展和性能要求: 执行负载测试以验证工作负载是否满足扩展和性能要求。
    Distributed Load Testing on AWS: simulate thousands of connected users
    Apache JMeter
  • 使用混沌工程测试弹性

  • 使用混沌工程测试弹性: 运行定期将故障注入到预生产和生产环境的测试。假设您的工作负载将会如何对故障做出反应,然后比较您的假设和测试结果,若不相符,重复执行。确保生产测试不会影响用户。
    Principles of Chaos Engineering
    Well-Architected lab: Level 300: Testing for Resiliency of EC2 RDS and S3
    Injecting Chaos to Amazon EC2 using AWS Systems Manager
    AWS re:Invent 2019: Improving resiliency with chaos engineering (DOP309-R1)
  • 定期进行实际测试

  • 安排实际测试,以定期练习使用运行手册和行动手册。: 生产中断场景中涉及的所有人员均需参与实际测试:业务负责人、开发人员、运营人员和事件响应团队。