Edge Locations
Use edge locations or CDNs to deliver content to end users or build caching layers in front of your application servers or databases.
The AWS Well-Architected Framework has six pillars, and each pillar includes best practices and a set of questions that you should consider when you architect cloud solutions.
As you make connections between the AWS Well-Architected Framework pillars and caching, consider your role as a cloud architect caching content and the need to know the following information:
Key Steps:
Identify candidates for caching: Databases, APIs and network services that could benefit from caching. Services that have heavy read workloads, have a high read-to-write ratio, or are expensive to scale are candidates.
Identify appropriate caching strategy: Choose the caching strategy that best fits your access pattern.
Configure cache invalidation strategy: Such as a time-to-live (TTL) for all data that balances freshness of data and reducing pressure on backend datastore.
Monitor cache hit rate: Aim for 80% or higher. Lower values may indicate insufficient cache size or an access pattern that does not benefit from caching.
Storing data in a cache can improve read latency, read throughput, user experience, and overall efficiency, as well as reduce costs. Data caching can be one of the most effective strategies to improve your overall application performance and reduce burden on your underlying primary data sources.
CloudFront Implementation: CloudFront will typically serve cached content from an edge location until the content expires. You can control CloudFront caching behavior with a combination of:
ElastiCache Implementation: In-memory databases are used for applications that require real-time access to data, the lowest latency, and the highest throughput. ElastiCache is a fully managed in-memory data store that is compatible with Redis and Memcached.
Optimizing data and query performance results in more efficiency, lower cost, and improved user experience. Data optimization and query tuning are critical aspects of performance efficiency in a data store.
Unoptimized queries can result in greater resource usage and bottlenecks, which reduce the overall efficiency of a data store. One strategy to improve query performance is a distributed caching solution which will improve latency and reduce the number of database I/O operations.
It is critical to plan, build, and operationalize highly available network connectivity for your public endpoints. If your workload becomes unreachable due to a loss in connectivity, even if your workload is running and available, your customers will see your system as down.
CloudFront Solution: CloudFront provides an API for distributing content with low latency and high data transfer rates by serving requests through a network of edge locations around the world.
Benefits:
CloudFront securely delivers content across the globe and improves application resiliency from DDoS attacks. Caching content by using CloudFront increases the reliability of your customers’ access to your application.
Gather requirements and perform data transfer modeling of the workload and each of its components. This identifies the lowest cost point for its current data transfer requirements.
Understand where the data transfer occurs in your workload, the cost of the transfer, and its associated benefit. You can use this information to make an informed decision to modify or accept the architectural decision.
Architecting for data transfer helps you minimize data transfer costs. By using the data transfer modeling, focus on where the largest data transfer costs are or where they would be if the workload usage changes.
Look for alternative architectures or additional components that remove or reduce the need for data transfer or lower its cost. This may involve using CDNs to locate data closer to users.
Edge Locations
Use edge locations or CDNs to deliver content to end users or build caching layers in front of your application servers or databases.
CloudFront Benefits
CloudFront caches data at edge locations across the world, which reduces the load on your resources and administrative effort to deliver content globally.
Security Savings Bundle
Can help you save up to 30 percent on your CloudFront usage if you plan to grow your usage over time.
Cost Optimization with Caching: One way to optimize costs with caching is by controlling how long content is cached. You can control CloudFront caching behavior with a combination of CloudFront minimum TTL specifications, maximum TTL specifications, content versioning, cache-control HTTP headers, and CloudFront invalidation requests.
Applying the AWS Well-Architected Framework principles to caching ensures that your caching strategy aligns with best practices for performance, reliability, security, cost optimization, operational excellence, and sustainability.