Compute fit and measurement
Choose compute from workload characteristics such as CPU, memory, concurrency, duration, and startup requirements. Measure latency distributions and throughput under representative load. Average latency can hide slow tail requests, while scaling may expose database or dependency bottlenecks rather than fix them. For example, a memory-heavy workload may benefit from memory-optimized instances, but evidence from profiling is stronger than guessing from one slow request.
A memory-heavy workload may benefit from memory-optimized instances, but evidence from profiling is stronger than guessing from one slow request.
A service's average response time is acceptable, but one in twenty requests takes several seconds. Measure the latency distribution and identify whether time is spent on CPU, memory pressure, storage, network, or a dependency. Increasing instance size may help CPU-bound work while doing little for an unindexed database query. Compare representative workloads before and after a change.
Throughput is completed work per unit time. Latency is the duration of one operation. A percentile such as p95 describes a point below which approximately ninety-five percent of observed durations fall. Tail behavior matters to users and dependent services. Profiling attributes resource consumption or waiting to specific operations. Choose compute from measured requirements and scaling characteristics, not price alone. A benchmark with warm caches and tiny data may misrepresent production. Record inputs, concurrency, dataset, and errors so an apparent improvement cannot be explained merely by doing less work or rejecting more requests.
A memory-heavy workload may benefit from memory-optimized instances, but evidence from profiling is stronger than guessing from one slow request.
Do not overlook this operational distinction: Average latency can hide slow tail requests, while scaling may expose database or dependency bottlenecks rather than fix them.