Design High-Performing Architectures
High-performing architectures select the right compute, storage, database, and networking to meet performance targets and scale elastically. This chapter covers caching, content delivery, elastic scaling, and choosing purpose-built services for each workload.
Elastic and Right-Sized Compute
Match compute to the workload and let it scale with demand. EC2 Auto Scaling adds and removes capacity automatically, while serverless options like Lambda and Fargate scale without managing servers. Choosing the correct instance family, whether compute-, memory-, or storage-optimized, ensures performance without overprovisioning. Elasticity keeps performance steady as load changes.
Caching for Low Latency
Caching reduces latency and offloads backends. Amazon ElastiCache for Redis or Memcached serves hot data from memory in sub-milliseconds, and DynamoDB Accelerator (DAX) brings microsecond reads to DynamoDB. CloudFront caches content at edge locations, and API Gateway can cache responses. Placing frequently accessed data close to the consumer is a core performance pattern.
Content Delivery and Global Reach
Serving users from nearby locations lowers latency worldwide. CloudFront delivers cacheable web content and media from edge locations near viewers, reducing origin load. AWS Global Accelerator improves TCP and UDP performance by routing over the AWS backbone to the nearest healthy endpoint using static anycast IPs. Choose CloudFront for cacheable HTTP content and Global Accelerator for non-cacheable or protocol-sensitive traffic.
Purpose-Built Data Stores
Selecting the right database for the access pattern drives performance. DynamoDB delivers consistent single-digit millisecond latency for key-value and document workloads at any scale, Aurora suits high-throughput relational workloads, and Redshift is optimized for analytics. Matching the store to read/write patterns and consistency needs avoids performance bottlenecks. Avoid forcing one engine to serve every use case.
High-Throughput Data Processing
Streaming and messaging services handle large volumes efficiently. Kinesis Data Streams ingests high-throughput, ordered records that multiple consumers process in near real time, while SQS decouples workloads for reliable batch processing. Choosing storage such as EBS Provisioned IOPS or instance store for I/O-intensive tasks further tunes throughput. Design the data path around the required ingest rate and latency.