Performance Efficiency
Overview
The Performance Efficiency pillar is about using computing resources efficiently to meet system requirements and keeping that efficiency as demand and technology change. In practice that means choosing the right instance type, storage, database and network features, and then measuring to confirm the choice still works.
AWS offers several hundred instance types, multiple storage and database engines and a global network, so the challenge is selection. A web cache can remove 90% of database load, a faster EBS volume can remove an I/O bottleneck, and a CDN can shave hundreds of milliseconds off users on the other side of the world.
This lesson covers the design principles, the typical selection areas (compute, storage, database, network) and the services the SAA-C03 exam expects you to match to latency, throughput and scalability requirements.
Key Concepts
- Design principles: democratise advanced technologies, go global in minutes, use serverless architectures, experiment more often, consider mechanical sympathy.
- Four selection areas: compute, storage, database, network, plus review, monitoring and trade-offs.
- Caching at every layer: CloudFront (edge), API Gateway cache, ElastiCache (Redis/Memcached), DAX (DynamoDB), and read replicas.
- Right-size and choose the correct family: C compute, M general, R/X memory, I storage-optimised, G/P GPU, T burstable.
- EBS: gp3 (3,000 IOPS baseline, up to 16,000) for general use; io2 Block Express (up to 256,000 IOPS) for critical databases; st1/sc1 HDD for throughput/cold data.
- Placement groups (cluster, spread, partition), enhanced networking/ENA and EFA reduce latency and boost throughput.
- Global Accelerator and CloudFront improve global performance; Transfer Acceleration speeds uploads to S3.
- Monitor with CloudWatch, X-Ray and Compute Optimizer to drive data-based decisions.
Detailed Notes
Design principles
- Democratise advanced technologies: consume managed services (ML, media transcoding, NoSQL) instead of building and operating them.
- Go global in minutes: deploy in multiple Regions and use edge locations.
- Use serverless architectures: remove server management and scale automatically.
- Experiment more often: compare instance types and architectures quickly with infrastructure as code.
- Consider mechanical sympathy: use the technology approach that best fits the goal, for example a key-value store for key lookups.
Compute selection
| Need | Choice |
|---|---|
| Event-driven, short tasks (up to 15 minutes) | Lambda |
| Containers without managing servers | Fargate (ECS/EKS) |
| Full OS control, long-running | EC2 |
| HPC / tightly coupled | EC2 cluster placement group, EFA |
| Price-performance for Arm-compatible code | Graviton instances |
| Variable low baseline with bursts | T family (burstable credits) |
Storage selection
| Storage | Performance profile |
|---|---|
| EBS gp3 | 3,000 IOPS / 125 MiB/s baseline, scale to 16,000 IOPS / 1,000 MiB/s independent of size |
| EBS io2 / io2 Block Express | Sub-millisecond, up to 256,000 IOPS, Multi-Attach (io1/io2) |
| EBS st1 / sc1 | Throughput-oriented HDD (big sequential, logs, data warehouse) |
| Instance store | Highest IOPS, ephemeral, lost on stop/terminate |
| EFS | Shared POSIX file system, scales automatically, Max I/O or Elastic throughput modes |
| FSx for Lustre | HPC/ML, sub-millisecond, integrates with S3 |
| S3 | 3,500 PUT/POST/DELETE and 5,500 GET/HEAD requests per second per prefix |
Database selection
| Pattern | Service |
|---|---|
| Relational, high throughput, 5x MySQL / 3x PostgreSQL | Aurora (up to 15 read replicas) |
| Key-value, single-digit ms at any scale | DynamoDB (microseconds with DAX) |
| In-memory cache / session store | ElastiCache (Redis, Memcached) |
| Analytics / data warehouse | Redshift |
| Graph / time series | Neptune / Timestream |
Caching layers
User -> CloudFront (edge cache) -> API Gateway cache -> ALB -> app
-> ElastiCache (query/session cache) -> RDS / Aurora (read replicas)
-> DynamoDB -> DAX (in-memory, microsecond reads)
Lazy loading (cache on miss) is simple and only caches what is requested; write-through keeps the cache fresh but caches rarely read data.
Network performance
- Enhanced networking (ENA) gives high bandwidth and low latency; EFA adds OS-bypass for HPC.
- Cluster placement group packs instances in one AZ for lowest latency (10 Gbps+ flows); spread isolates instances on separate hardware; partition isolates groups for HDFS/Cassandra.
- CloudFront for static and dynamic content; Global Accelerator gives static anycast IPs and routes over the AWS backbone (TCP/UDP, non-HTTP too).
- S3 Transfer Acceleration and multipart upload speed large uploads; S3 byte-range fetches parallelise downloads.
- Gateway endpoints / PrivateLink keep traffic on the AWS network and avoid NAT bottlenecks.
# Create a cluster placement group for latency-sensitive HPC nodes
aws ec2 create-placement-group --group-name hpc-pg --strategy cluster
# gp3 volume with provisioned performance independent of size
aws ec2 create-volume --availability-zone eu-west-1a \
--volume-type gp3 --size 200 --iops 12000 --throughput 500
Review and monitor
Use CloudWatch metrics and dashboards, X-Ray tracing for latency hot spots, Compute Optimizer recommendations and load testing to validate changes. New instance generations and services appear constantly, so review choices regularly.
Real World Example
Scenario — a mobile game backend with global players and a slow leaderboard.
A game studio sees leaderboard API calls taking 800 ms for players in Asia, and the database CPU is pegged at peak. The architects profile the system with X-Ray and discover that 90% of requests are repeated reads of the same top-100 scores.
They place CloudFront in front of the API for cacheable responses, add an ElastiCache for Redis sorted-set leaderboard, and migrate the session store from MySQL to DynamoDB with DAX. The matchmaking servers that need microsecond packet latency move into a cluster placement group with enhanced networking in each Region, and Global Accelerator routes players to the closest Region over the AWS backbone.
p95 latency falls from 800 ms to 70 ms, database CPU drops by 75%, and the team can downsize the database, which also reduces cost.
Architecture Diagram
Each layer removes work from the one behind it, lowering latency and database load.
- 1CloudFront serves cacheable responses from the nearest edge location.
- 2Uncached traffic enters the AWS backbone through Global Accelerator and reaches the closest healthy Region.
- 3The app tier checks ElastiCache first; hot data returns in microseconds to milliseconds.
- 4Only cache misses reach Aurora read replicas or DynamoDB, which keeps databases small and fast.
Best Practices
- ✓Measure before optimising: use CloudWatch, X-Ray and load tests to find the real bottleneck.
- ✓Add caching at multiple layers (CloudFront, ElastiCache, DAX) to cut latency and database load.
- ✓Choose instance families by workload (compute, memory, storage, GPU) and try Graviton for price-performance.
- ✓Use gp3 by default and io2 only where sustained high IOPS is needed; avoid over-provisioning.
- ✓Use read replicas, partitioning and the right database engine for the access pattern.
- ✓Place latency-sensitive components in cluster placement groups and use enhanced networking.
- ✓Prefer serverless and managed services to scale automatically.
- ✓Re-evaluate choices as new instance types and features launch.
Common Interview Questions
Exam Tips
SAA-C03 focus
- "Microsecond reads from DynamoDB" -> DAX; "in-memory cache for RDS queries / session store" -> ElastiCache.
- "Static IPs / anycast / non-HTTP / fast failover" -> Global Accelerator; "cache content at the edge" -> CloudFront.
- "Highest IOPS with sub-millisecond latency" -> io2 Block Express (or instance store if ephemeral is acceptable).
- "Low latency between instances / HPC" -> cluster placement group (single AZ) and EFA.
- "Faster uploads from distant clients to S3" -> S3 Transfer Acceleration and multipart upload.
- "Scale reads" -> read replicas / caching; "scale writes" -> sharding or a database like DynamoDB.
- S3 supports 3,500 write and 5,500 read requests per second per prefix; spread keys across prefixes for more.
- Serverless answers (Lambda, Fargate, DynamoDB, Aurora Serverless) satisfy "scale automatically with minimal operations".
Finished this lesson?
0 of 64 lessons done · 0% of the course

