Designing High-Performance Architectures on AWS: Caching, Scaling, Right Sizing, Database Choice and Performance Tools

AWS Solutions Architect 45 min min read Updated: Nov 17, 2026 Advanced
Designing High-Performance Architectures on AWS: Caching, Scaling, Right Sizing, Database Choice and Performance Tools
Advanced Topic 3 of 3

Performance Vocabulary

TermMeaning
LatencyTime for one request to complete (milliseconds). Users feel this
ThroughputWork done per second (requests/s, MB/s)
IOPSDisk operations per second
ConcurrencyRequests handled at the same time
Percentiles (p50, p95, p99)p99 = slowest 1 percent. Averages hide slow requests, so watch p95/p99
BottleneckThe slowest part that limits the whole system

The Method

  1. Measure first: define goals (for example p95 under 300 ms at 2,000 requests/s)
  2. Find the bottleneck with metrics and tracing (CloudWatch, X-Ray, Performance Insights)
  3. Change one thing, test again
  4. Automate scaling and load tests
  5. Repeat as the system grows

Caching at Every Layer

text Browser cache ─► CloudFront (edge) ─► API Gateway cache ─► ALB ─► app in-memory cache ─► ElastiCache / DAX ─► database (query cache, read replicas) ─► storage
LayerServiceWhat it caches
Browser and CDNCloudFront + Cache-Control headersStatic files, images, even API GET responses
API layerAPI Gateway cache (REST)API responses per stage
ApplicationIn-process cache, ElastiCacheComputed results, sessions, hot objects
DatabaseDAX (DynamoDB), RDS/Aurora read replicas, ElastiCacheHot items, repeated queries
DNSRoute 53 TTLName lookups
  • Caching trades freshness for speed. Choose TTLs and invalidation deliberately
  • Cache static, popular and expensive-to-compute data first
  • Use versioned URLs (app.v123.js) to avoid manual invalidation

Scaling for Performance

ApproachMeaningUse
Vertical scaling (scale up)A bigger instanceQuick fix, limited, needs restart for EC2
Horizontal scaling (scale out)More instances behind a load balancerPreferred: better availability, cost-effective, near unlimited
Read scalingRead replicas, caches, CloudFrontRead-heavy apps
Partitioning / shardingSplit data by keyWrite-heavy at big scale (DynamoDB does it for you)
Asynchronous processingQueue the work, return fastImage processing, emails, reports

Compute Performance

ChoiceGuidance
Instance familyMatch the workload: compute (C), memory (R/X), storage I/O (I), GPU (G/P), general (M/T). Graviton often gives better price/performance
Right-size with AWS Compute OptimizerRecommendations from CloudWatch metrics (CPU, memory with agent, network)
Burstable T instancesCredits run out → CPU is throttled. Use unlimited mode or move to M/C for sustained load
Enhanced networking (ENA), EFAHigher bandwidth, low latency. EFA for HPC/ML with MPI
Placement group (cluster)Lowest latency between instances
Lambda memoryMore memory means more CPU. Test with Power Tuning
ContainersSet CPU and memory requests and limits correctly

Storage Performance

NeedChoice
Consistent, highest IOPS, low latencyEBS io2 Block Express (up to 256,000 IOPS)
General purpose with tunable IOPSgp3 (set IOPS and throughput separately)
Large sequential throughputst1 or FSx for Lustre
Fastest local scratchInstance store NVMe
Many instances sharing filesEFS (Elastic throughput) or FSx
S3 high request ratesSpread across prefixes, multipart, Transfer Acceleration, Express One Zone for lowest latency
EBS-optimized instanceMake sure the instance type supports enough EBS bandwidth

Database Performance

  • Pick the right engine for the access pattern (see the database lessons)
  • Add indexes and fix slow queries (use Performance Insights, EXPLAIN)
  • Read replicas and caching for reads, Aurora for fast replication
  • RDS Proxy for connection storms (Lambda)
  • DynamoDB: good partition keys, DAX, on-demand or auto scaling, avoid scans
  • Redshift: distribution and sort keys, columnar compression, workload management, Concurrency Scaling
  • Batch writes, use pagination, avoid N+1 queries

Network Performance

  • CloudFront for global content, Global Accelerator for non-cacheable and TCP/UDP traffic over the AWS backbone
  • Same AZ placement lowers latency and avoids cross-AZ data fees for chatty services (balance with availability)
  • VPC endpoints and PrivateLink keep traffic on the AWS network
  • Jumbo frames (MTU 9001) inside a VPC, Transit Gateway and Direct Connect for stable latency
  • Route 53 latency routing to the nearest Region
  • Use HTTP/2 or HTTP/3 and keep-alive connections

Data Ingestion Performance

ProblemFix
Uploading big files to S3 from far awayMultipart upload + Transfer Acceleration
Burst of eventsSQS/Kinesis as a buffer
Many small writes to S3Batch them with Firehose
Huge offline dataSnow Family
Streaming analyticsKinesis Data Streams with enough shards

Measure With AWS Tools

ToolUse
CloudWatch metrics and alarmsCPU, network, latency, queue depth, custom metrics
CloudWatch Logs Insights and Application SignalsSearch logs, service-level indicators
AWS X-RayDistributed tracing: find which service or call is slow
RDS/Aurora Performance InsightsDB load by SQL, wait, host
Compute OptimizerRight-sizing for EC2, EBS, Lambda, ECS on Fargate, ASG
Trusted AdvisorChecks including underused resources and service limits
Distributed load testing (a solution), JMeter, k6, LocustGenerate load and find limits before users do

A Tuning Checklist

  1. Do you have latency and error SLOs and dashboards?
  2. Is the web tier stateless and auto-scaled on the right metric?
  3. Is static content on CloudFront?
  4. Are there caches in front of slow or expensive reads?
  5. Is the database indexed, with replicas or a cache for reads?
  6. Are heavy or slow tasks asynchronous?
  7. Are instance types and storage right-sized (Compute Optimizer)?
  8. Do you load test before big events?

Practice Tasks

  1. Run a load test against a sample site and record p95 latency before and after adding CloudFront and an ElastiCache layer
  2. Use Compute Optimizer or CloudWatch to find an oversized instance
  3. Switch a gp2 volume to gp3 and set IOPS and throughput
  4. Enable X-Ray in a Lambda and API Gateway app and find the slowest segment
  5. Explain why p99 matters more than the average for a payment API

Conclusion

Improve performance by measuring first, then caching at every layer, scaling horizontally, choosing the right instance, storage and database for the workload, moving slow work to asynchronous queues, using the AWS network (CloudFront, Global Accelerator, endpoints), and verifying with CloudWatch, X-Ray, Performance Insights and Compute Optimizer.

Quick Summary: method; caching layers; scaling types; compute/storage/db/network choices; ingestion; measurement tools; tuning checklist.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators