PERF 8: How do you use tradeoffs to improve performance?
When architecting solutions, determining tradeoffs enables you to select
an optimal approach. Often you can improve performance by trading consistency, durability, and space for time and latency.
Introducing The Amazon Builders’ Library (DOP328)
Amazon Builders’ Library
Best Practices for Implementing Amazon ElastiCache
Understand the areas where performance is most critical: Understand and identify areas where increasing the performance of your workload will have a positive impact on efficiency or customer experience. For example, a
website that has a large amount of customer interaction can benefit from using edge
services to move content delivery closer to customers.
Learn about design patterns and services: Research and understand the various design patterns and services that
help improve workload performance. As part of the analysis, identify what you could trade to achieve higher performance. For example, using a cache service can help to reduce the load placed on database systems; however, it requires
some engineering to implement safe caching or possible introduction of eventual consistency in some areas.
Identify how tradeoffs impact customers and efficiency: When evaluating performance-related improvements, determine which choices will impact your customers and workload efficiency. For example, if using a key-value data store increases system performance, it is important to evaluate how the eventually consistent nature of it will impact
Measure the impact of performance improvements: As changes are made to improve performance, evaluate the collected metrics and data. Use this information to determine impact
that the performance improvement had on the workload, the workload’s components, and your customers. This measurement helps you understand the improvements that
result from the tradeoff, and helps you determine if any negative side-effects were
Use various performance-related strategies: Where applicable, utilize multiple strategies to improve performance. For example, using strategies like caching data to prevent excessive network or
database calls, using read-replicas for database engines to improve read rates, sharding
or compressing data where possible to reduce data volumes, and buffering and streaming
of results as they are available to avoid blocking.
Understand the areas where performance is most criticalIdentify constrained areas of the workload: Use load testing or monitoring to identify constrained areas
(memory, CPU, custom metrics and other key performance indicators).
Learn about design patterns and servicesUnderstand the available product options: Learn which performance configuration options are available and how they could impact the workload. Optimizing the performance of your workload depends on understanding how these options interact with your architecture, and the impact they have on measured performance and user-perceived performance.
Evaluate design patterns from the Amazon Builders’ Library: The Amazon Builders’ Library provides a detailed information
about how Amazon builds and operates technology. The free articles in the library
are written by Amazon’s senior engineers and cover topics across architecture, software delivery, and operations. For example, you can see how Amazon automates software delivery to achieve over
150 million deployments a year or how Amazon’s engineers implement principles such
as shuffle sharding to build resilient systems that are highly available and fault
Amazon Builders’ Library
Identify how tradeoffs impact customers and efficiencyIdentify tradeoffs: Use metrics and monitoring to identify areas of poor performance in your system. Determine how to make improvements, and how tradeoffs will impact
the system and the user experience. For example, implementing caching data can help
dramatically improve performance, but it requires a clear strategy for how and when to update or invalidate cached
data to prevent incorrect system behavior.
Measure the impact of performance improvementsUse a combination of strategies: A well-architected system uses a combination of performance related strategies. Determine which strategy will have the largest positive impact
on a given hotspot or bottleneck. For example, sharding data across multiple relational database systems could improve overall throughput while retaining support for transactions
and, within each shard, caching can help to reduce the load.
Use various performance-related strategiesUse a data-driven approach to evolve your architecture: As you make changes to the workload, collect and evaluate metrics to determine the impact of those changes. Measure the
impacts to the system and to the end-user to understand how your tradeoffs impact
your workload. Use a systematic approach, such as load testing, to explore whether the tradeoff