Does moving from Graviton2 to Graviton5 lower an AWS bill? Not at the same instance size. In US West (Oregon) a c9g.4xlarge costs 28% more per hour at On-Demand prices than a c6g.4xlarge, and a db.r9g.8xlarge Aurora instance 7% more than a db.r6g.8xlarge. With the same number of instances running the same hours, the instance part of the bill falls only if the load fits on smaller instances. I measured whether it does.
It does, for the workload of this post. With half the vCPUs in its web, API and database tiers, a Graviton5 stack carried the same 11,800 requests per second as its Graviton2 baseline, and its instances together cost 44% less at On-Demand prices.
Graviton2 and Graviton5 are Arm-based processors that AWS designs for its own instances. Graviton2 reached Amazon EC2 in 2020, with the C6g, M6g and R6g instance families, and Amazon Aurora in 2021, as the db.r6g classes. Graviton5 came three generations later, in 2026, with C9g, M9g and R9g on Amazon EC2 and db.r9g on Aurora.
I built a three-tier shop on Graviton2: React pages rendered on Node.js and a Java API, both on Amazon EKS, with Amazon Aurora MySQL as the database. Its Graviton5 replacement has half the vCPUs in each of the three tiers. I tested that replacement at the request rate of the run that rated the Graviton2 stack. It passes if it takes the whole load, if none of its tiers is above 80% CPU utilization there, and if its errors and response times stay within limits set against the baseline’s. As a method for your own stack, that makes four steps:
- Rate the baseline. Raise the request rate until the busiest tier is at 80% CPU utilization. That rate is the load to carry, unless you know your peak to be lower.
- Upgrade at the same size, and measure the CPU time each request costs on Graviton5.
- Work backwards from the rated load to the CPU each tier needs, and from there to an instance size.
- Run both stacks at the rated load, and compare response time, errors, CPU utilization, headroom and cost.
I did not work in that order. The half-size configuration was fixed in my protocol before any run on Graviton5, and the 80% rule came later. Step 3 checks the sizes; it did not choose them. The section on the rule gives the order of the decisions. A migration guide at the end has the steps for your own stack and the tools I used, among them the AI coding agent that did the hands-on work under my direction.

The short version, for this workload, in one AWS Region:
- The baseline’s rated load. The Graviton2 stack reaches 80% CPU utilization at about 11,900 requests per second. I compared the stacks at 11,800 requests per second, the rate of the run that gave that rating.
- Same size, new generation. On Graviton5 at the same instance size, each tier spends 55% to 64% less CPU time per request. At 12,000 requests per second the busiest tier of the same-size Graviton5 stack was at 33% CPU utilization. Its instances cost 10% more.
- Half the size. The right-sized Graviton5 stack carried 11,800 requests per second with its busiest tier at 66% CPU utilization and a p99 response time of 15.6 ms. The baseline’s busiest tier was at 79% CPU utilization and its p99 response time was 33.3 ms. The right-sized stack’s instances cost 44% less: $4,105 against $7,307 per month at On-Demand prices.
- Where the saving is, and what commitments do to it. Of the $3,202 per month, $2,823 is the two Aurora instances; the Amazon EKS nodes alone cost 30% less. With fresh one-year commitments where AWS returned a rate, the right-sized stack’s instances cost 20% less, not 44%: no Reserved Instance rate came back for the new
db.r9gclass. - Headroom. By its ceiling run in the first session, the right-sized stack reaches 80% CPU utilization at about 14,900 requests per second, 25% above the baseline’s rating of about 11,900. Its runs in the second session point to about 14,400 requests per second.
- One web node out of service. With one of its two web nodes taken out of service before the run, the right-sized stack carried 8,000 requests per second without a failed request. The remaining node ran at 89% CPU utilization, and the p99 response time was 38.7 ms where it had been 11.8 ms on two nodes. At 11,800 requests per second one web node would need 131% of its vCPUs on the right-sized stack and 146% on the baseline. That is arithmetic; I did not run it.
- The cost of changing. The upgrade and the right-sizing took about 35 and 40 minutes, observed at 4,000 requests per second. No probe request failed while the nodes were replaced. The failed probe requests, 1,936 in the upgrade and 2,525 in the right-sizing, came in clusters at the two database failovers of each change, with up to 24 seconds without a successful response.
| A: Graviton2 baseline | B: Graviton5, same size | C: Graviton5, right-sized | |
|---|---|---|---|
| Web nodes API nodes Aurora MySQL instances | 2 x c6g.4xlarge3 x m6g.xlarge2 x db.r6g.8xlarge | 2 x c9g.4xlarge3 x m9g.xlarge2 x db.r9g.8xlarge | 2 x c9g.2xlarge3 x m9g.large2 x db.r9g.4xlarge |
| CPU utilization of the busiest tier at the comparison load of 11,800 requests per second; the API tier’s is a share of its pods’ CPU limits | 79%, database writer (API tier: 79%) | 33%, web tier, at 12,000 requests per second ¹ | 66%, web tier |
| p99 response time at the comparison load of 11,800 requests per second | 33.3 ms | 11.1 ms, at 12,000 requests per second ¹ | 15.6 ms |
| Rated load: the request rate at 80% CPU utilization, from each configuration’s ceiling run | about 11,900 requests per second | about 28,400 requests per second | about 14,900 requests per second |
| EC2 and Aurora instances, On-Demand | $7,307 per month | $8,067 per month (+10% against A) | $4,105 per month (-44% against A) |
| Modelled bill of the stack, On-Demand, at an average of 4,000 requests per second: the items listed in the cost section | $12,354 per month | $13,145 per month (+6% against A) | $9,206 per month (-25% against A) |
¹ Configuration B was not run at 11,800 requests per second. Its figures are from one 110-second step of its capacity run, at 12,000 requests per second, and are shown for reference.
The measurements below rest on recordings: the commands I ran, their output as printed, and graphs that AWS rendered. The bills are models built from list prices.
What is the 80% CPU rule?
The 80% CPU rule is a sizing convention: a tier counts as full when it uses 80% of the CPU it may use. The request rate at which a stack’s busiest tier reaches that mark is its rated load. The remaining 20% of the CPU is a reserve for bursts, a slow node and the time to add capacity.
Three definitions make the rule usable:
- CPU utilization is the CPU a tier uses, as a share of the CPU it may use. For the web tier that is the CPU its nodes use, as a share of their vCPUs. For the API tier it is the CPU its nodes use, system daemons included, as a share of the sum of its pods’ CPU limits, 1.75 vCPUs each. For the database it is the CPU utilization of the Aurora writer.
- The rated load of a stack is the request rate at which the busiest of its three tiers is at 80% CPU utilization.
- Headroom is a stack’s rated load minus the load it has to carry, in requests per second.
I measure a rating in two passes. A staircase of rising request rates shows roughly where the busiest tier crosses 80% CPU utilization. A ceiling run then holds that rate for 10 minutes, of which 590 seconds are measured.
The run counts if its busiest tier is between 75% and 85% CPU utilization, it achieves at least 99% of its request rate, and it stays within the limits on errors and response time given below. The rated load is the run’s rate scaled to exactly 80% CPU utilization: the rate times 80, divided by the busiest tier’s percentage, rounded to 100 requests per second. It is an estimate next to a measured point, not a rate that was itself run.
Why not compare the stacks at a load I pick? Because the answer then depends on the pick. A baseline that idles at the chosen load leaves unused CPU on any processor. Rating the baseline first ties the comparison to what the baseline can carry.
The AWS Graviton Technical Guide warns against testing at low load: “Testing at low levels of load can lead to misleading results. The most realistic test results are usually achieved when testing close to breaking latency.” Its transition guide notes that every Graviton vCPU is a physical core, so a share of the vCPUs is a share of real cores. A rating at 80% CPU utilization is still below breaking latency: the baseline’s highest passing staircase step is 21% above its rated load.
Two conditions sit under the rule. CPU must be what limits a tier, and a request must cost about the same CPU time at every load. Both held approximately here.
The data set fits in memory, and at the steps where a staircase failed, one tier was at 94% CPU utilization or above. That is consistent with CPU as the limit; I did not test other limits, such as locks or the network. Across the passing steps of each staircase a tier’s CPU time per request varied by 2% to 11%. The largest change is the baseline’s database writer, which spent 10% less CPU time per request at its last passing step than at its first.
The rule also takes the baseline’s rated load as the load to carry, which assumes the baseline was sized for its peak. If your peak is lower than your stack’s rating, work backwards from the peak.
The rule rates a stack. It does not make 80% CPU utilization a safe place to run. A tier’s average hides its busiest node, and a tier of two nodes that loses one puts the whole load on the other. Both come back below: the busiest node as measured, the loss of a node measured at 8,000 requests per second and computed for the comparison load.
In what order did I decide this?
Not in the order of the four steps. The half-size configuration came first, then the rule, then the comparison at the rated load.
My protocol fixed the three configurations after I had calibrated the baseline and before any run on Graviton5: configuration C was to have half the baseline’s vCPUs in each of the three tiers. My first plan compared the stacks at 8,000 requests per second, a rate I had picked by eye. I added the rating at 80% CPU utilization during the first session, on 23 November, with the baseline’s first results in hand and before I had analysed a run on Graviton5.
Making the baseline’s rated load the load of the comparison came after that session, when its results were known. On 24 November, before any load of the second session ran, I wrote down its runs, its decision rule and the result I expected. The second session is therefore a repeat whose likely outcome I knew, not a blind test.
The runs at 8,000 requests per second stay in this post as a second, lighter load. The order of these decisions rests on my word: the published repository holds a single commit.
What is the stack under test?
A synthetic storefront that I built for this benchmark, in three tiers on AWS:
- Web tier: React 19 pages rendered on the server by Node.js 24 (Fastify), on a compute-optimized node group. Node.js runs JavaScript on one thread, so I sized the tier at one pod per vCPU.
- API tier: Java 21 and Spring Boot 4 on Amazon Corretto, with plain JDBC, on a general-purpose node group. Each pod has a CPU limit of 1.75 vCPUs, which the JVM rounds up to two processors on every node size.
- Database: Amazon Aurora MySQL 3.10 on memory-optimized instances: a writer, and a reader that stands by for failover and serves no benchmark traffic. The data set is nominally 1 million products, 2 million customers, 8 million orders and 5 million reviews. Its tables and indexes take about 5.7 GB, which fits in memory on every instance class used.
Both application tiers run on Amazon EKS behind one Application Load Balancer. Every operation of the benchmark queries the database writer; only the category list is cached.

I compared three configurations of this stack:
| A: Graviton2 baseline | B: Graviton5, same size | C: Graviton5, right-sized | |
|---|---|---|---|
| Web nodes | 2 x c6g.4xlarge, 32 vCPUs in all | 2 x c9g.4xlarge, 32 vCPUs in all | 2 x c9g.2xlarge, 16 vCPUs in all |
| Web pods (0.95 vCPU requested each) | 32 pods | 32 pods | 16 pods |
| API nodes | 3 x m6g.xlarge, 12 vCPUs in all | 3 x m9g.xlarge, 12 vCPUs in all | 3 x m9g.large, 6 vCPUs in all |
| API pods (CPU limit 1.75 vCPUs each) | 6 pods, 10.5 vCPUs of CPU limits | 6 pods, 10.5 vCPUs of CPU limits | 3 pods, 5.25 vCPUs of CPU limits |
| Aurora MySQL writer and reader | 2 x db.r6g.8xlarge, 32 vCPUs and 256 GiB each | 2 x db.r9g.8xlarge, 32 vCPUs and 256 GiB each | 2 x db.r9g.4xlarge, 16 vCPUs and 128 GiB each |
| System nodes | 2 x m6g.large, 4 vCPUs in all | 2 x m9g.large, 4 vCPUs in all | 2 x m9g.large, 4 vCPUs in all |
| vCPUs of the web, API and database tiers, counting the reader | 108 vCPUs | 108 vCPUs | 54 vCPUs |
- A is the Graviton2 baseline.
- B is the upgrade: the same instance family letter (C, M, R) and size, Graviton2 to Graviton5.
- C is the right-sized stack: Graviton5 with half the baseline’s vCPUs in the web, API and database tiers. The two small system nodes keep their size.
Configuration C’s sizes were fixed in my protocol after I had calibrated the baseline and before any run on Graviton5: one instance size down in each of the three tiers. Step 3 below checks that choice against the CPU time per request that I measured on configuration B.
Between the configurations the instance types and sizes change, and the pod counts with the sizes. One application setting follows the pod count: the API’s connection pool is 24 connections per pod with six pods and 48 with three, 144 connections in total either way. The container images, the Aurora engine version, the Kubernetes version, the load balancer and the database volume stay the same.
The request mix is fitted to the baseline. During calibration I changed it twice, until the baseline’s web tier and database writer were about equally busy at the same request rate, and then froze it. The API tier turned out oversized on two m6g.2xlarge nodes, so I reduced it to three m6g.xlarge before the first official run.
How was each run measured?
Every run offers the stack an open-loop load at a fixed arrival rate, generated by Distributed Load Testing on AWS with k6 on AWS Fargate. k6 measures the outcome and the response time of every request. CPU comes from the kubelet on each node and, for the database, from Amazon CloudWatch.
Requests start on schedule whether or not earlier ones have finished, so a slow stack builds a queue instead of slowing the test down. A fixed number of concurrent users would hide that: the slower the stack, the less load it would be given. This is the scenario in loadtest/workload.js:
scenarios: {
load: {
executor: 'ramping-arrival-rate',
startRate: CONFIG.startRate,
timeUnit: CONFIG.timeUnit,
stages: CONFIG.stages,
preAllocatedVUs: CONFIG.preAllocatedVUs,
maxVUs: CONFIG.maxVUs,
gracefulStop: '10s',
},
},
Each load generator task has at most 600 virtual users. If all of them are waiting for responses, further arrivals are dropped, and the achieved rate falls below the target. The achieved rate counts every request sent, failed ones included. The error rate is the share of sent requests that failed.
Each request is drawn at random from a fixed mix of twelve HTTP operations (loadtest/mix.json): 31% are server-rendered pages, 69% are direct API calls, and 13.5% are writes, which update a cart or place an order. The choices are not seeded, so two runs draw from the same distributions but do not send the same sequence. These are weights of requests sent by the load generator, not browser sessions; no images, scripts or stylesheets are fetched.
Response time is k6’s http_req_duration: from sending a request to receiving its response, without connection setup. A request fails if it times out after 5 seconds, cannot connect, or gets an HTTP status of 400 or above. Failed requests stay in the percentiles with the time they took.
There are four kinds of run:
- Warm-up: three minutes at 4,000 requests per second after every deployment, discarded.
- Capacity run, the staircase: rising request rates, 120 seconds per step, of which the first 10 are discarded. The steps go from 8,000 to 17,600 requests per second for A and C and from 8,000 to 32,000 for B. A step passes if it achieves at least 99% of its target rate, at most 0.1% of its requests fail, its p95 response time is at most 50 ms and its p99 at most 100 ms.
- 10-minute run at one rate: 60 seconds of ramp, 10 seconds to settle, 590 seconds measured. The ceiling runs, the runs at the comparison load and the runs at 8,000 requests per second are of this kind.
- Observation of a change: one hour of background load at 4,000 requests per second plus a probe of 100 requests per second, while the pipeline applies the change.
What is measured, and where it comes from:
| Measure | Source |
|---|---|
| Request rate and errors | k6 counters of all load generator tasks, added together |
| Response time percentiles | k6 response time histograms of all tasks, merged. Their buckets are about 1% wide, so a percentile is within about 0.5% of the true value, and two runs can show the same percentile to the last digit |
| Web and API CPU | The kubelet’s cumulative CPU counters on every node, sampled every 15 seconds. They include the nodes’ system daemons. A staircase step is covered by the samples that fall inside it, roughly 80 to 100 of its 110 seconds. Node and container counters are not read at the same instant, so over a single step the two can differ by a few percent |
| Database CPU | Amazon CloudWatch CPUUtilization of the Aurora writer, per minute, each datapoint assigned to the 60 seconds it covers. A staircase step holds one such datapoint, which may reach up to six seconds beyond the step |
| Load balancer errors | Amazon CloudWatch, 5xx counts from targets and from the load balancer |
The database row contains a correction that the analysis itself turned up. A CPU datapoint of the Aurora writer does not describe the minute that its timestamp names. In the baseline’s first deployment it describes the 60 seconds that begin about 43 seconds before the timestamp. I estimate this offset from the end of each run at a single rate, warm-ups included, where the load stops at a known second. It ranged from about 1 second to 57 seconds across the deployments, and I did not establish why.
For a 10-minute average the correction matters little: counting whole minutes by their timestamps instead would move a run by at most 0.2 percentage points. For a staircase step it matters. Read by their timestamps, the datapoints would put the baseline’s writer at 80% CPU utilization at about 12,300 requests per second, not at 11,860. Every deployment is analysed the same way.
The measurements come from two sessions on the same cluster and the same database, on 23 and 24 November 2026. All times are UTC.
- First session. Configuration A from 15:23, the upgrade to B at 17:07, B’s runs from 18:14, the right-sizing to C at 20:08, C’s runs from 21:18 to 23:02. Then A once more, from 01:52 to 03:02, for its ceiling run and two checks.
- Second session. A’s warm-up at 08:38 and its runs at the comparison load from 08:49 to 09:16, the change to C from 09:20 to 10:00, C’s warm-up at 10:09 and its runs from 10:19 to 11:43. Between the sessions the stack was parked for four hours: the node groups at zero nodes and the database cluster stopped.
The first session as the load balancer counted it, drawn by Amazon CloudWatch from its own metric:

Orders written by a run are deleted before the next one. Cart contents stay as the last run left them, and nothing restarts the pods or the database between the runs of an unchanged deployment, so caches and JIT state carry over from run to run. The one planned exception is the run with a web node out of service, before which eight web pods were removed.
A container that restarts begins its CPU counter at zero. In the samples taken every 15 seconds in every run, summed per node, the number of such falls and of changes in the number of containers within each group of runs on an unchanged deployment is 0. The check is on sampled sums, so it is evidence, not proof.
A run is repeated if a load generator task uses more than 60% of its CPU in any minute, or if a task fails to report. The highest figure in any of the 31 benchmark runs, warm-ups included, was 28% of a task’s reserved CPU, and every task reported.
Step 1: What load does the Graviton2 baseline carry at 80% CPU utilization?
About 11,900 requests per second. Two tiers reach 80% CPU utilization almost together: in a 10-minute run at 11,800 requests per second the baseline’s API tier was at 79.4% CPU utilization and its database writer at 78.8%. Which of the two is ahead changes from run to run; the rating does not.
The staircase comes first. Each line is one 110-second step:
$ uv run -q analysis/summarize.py results/a-graviton2-baseline/a-cap | grep -vE '^( {6}|$)'
... (4 lines of output not shown)
window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
s01 8000 7999.7 0.000 6.1 17.4 27.0 50.9 52.3 56.9 2.036 0.686 2.275
s02 9600 9600.0 0.000 6.5 18.6 28.1 61.0 61.2 67.4 2.033 0.670 2.246
s03 11200 11200.0 0.000 6.9 20.6 30.7 69.4 71.2 76.4 1.982 0.668 2.184
s04 12000 12000.0 0.000 7.2 22.1 33.0 74.1 76.0 80.8 1.976 0.665 2.154
s05 12800 12800.0 0.000 7.6 24.9 37.9 78.5 82.1 84.9 1.961 0.673 2.123
s06 13600 13600.2 0.000 8.2 30.4 44.9 83.3 87.0 88.4 1.961 0.672 2.080
s07 14400 14400.0 0.000 9.4 39.1 58.3 88.2 93.5 92.0 1.960 0.681 2.046
s08 15200 15019.8 25.776 261.2 4990.3 4990.3 68.8 101.2 88.7 1.466 0.707 1.889
s09 16000 15986.8 31.004 285.8 4990.3 4990.3 64.1 101.0 88.0 1.283 0.663 1.762
s10 16800 16783.6 31.121 342.1 4990.3 4990.3 57.5 101.1 84.2 1.097 0.632 1.606
s11 17600 17586.2 31.022 393.6 4990.3 4990.3 52.3 101.1 83.5 0.952 0.604 1.519
The columns: target and achieved request rate in requests per second, failed requests in percent, and the p50, p95 and p99 response time in milliseconds. Then each tier’s CPU utilization: the web nodes as a share of their vCPUs, the API tier as a share of its pods’ CPU limits, the database writer as a share of its vCPUs. The last three columns are each tier’s CPU milliseconds per request sent to the stack.
The baseline’s highest passing step is 14,400 requests per second. At 15,200 requests per second it fails: 26% of requests fail, every one of them a five-second timeout. By then the API nodes use as much CPU as the sum of their pods’ CPU limits, and the database writer is at 89% CPU utilization. Over the whole staircase, its failing steps included, the API containers were throttled in 30% of their scheduling periods; in the ceiling run below, in 0.8%. I did not trace which tier failed first.
Interpolated between the steps, the database writer crosses 80% CPU utilization at about 11,860 requests per second, before the other two tiers:
$ uv run -q analysis/ceiling.py estimate a
a-cap: CPU utilization of each tier at the steps within the latency and error limits
requests/s web API database writer
8000 50.9% 52.3% 56.9%
9600 61.0% 61.2% 67.4%
11200 69.4% 71.2% 76.4%
12000 74.1% 76.0% 80.8%
12800 78.5% 82.1% 84.9%
13600 83.3% 87.0% 88.4%
14400 88.2% 93.5% 92.0%
Web reaches 80% CPU utilization at about 13,054 requests per second
API reaches 80% CPU utilization at about 12,525 requests per second
Database writer reaches 80% CPU utilization at about 11,857 requests per second
ceiling run: 11,800 requests per second with 42 load generator tasks (limited by: Database writer)
The ceiling run at 11,800 requests per second, 590 seconds measured:
$ uv run -q analysis/summarize.py results/a-graviton2-baseline/a2-ceiling | awk '/^ (window|unit) / { if (!shown[$1]++) print; next } /^ steady /'
window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
steady 11800 11799.9 0.000 7.0 21.2 31.7 71.6 79.4 78.8 1.942 0.706 2.138
| Tier | CPU the tier may use | CPU in use at 11,800 requests per second | CPU utilization: in use, as a share of what the tier may use | CPU utilization of the busiest node, measured the same way | Request rate at which this tier would be at 80% CPU utilization |
|---|---|---|---|---|---|
| Web tier | 32 vCPUs: 2 web nodes of 16 vCPUs | 22.9 vCPUs | 71.6% | 71.6% | 13,180 requests per second |
| API tier | 10.5 vCPUs: the CPU limits of 6 API pods, 1.75 vCPUs each | 8.3 vCPUs | 79.4% | 87.8% | 11,890 requests per second |
| Database writer | 32 vCPUs: one db.r6g.8xlarge instance | 25.2 vCPUs | 78.8% | one instance | 11,975 requests per second |
In this run the API tier is the busiest, a little ahead of the database writer, and the rule takes the busiest tier whichever it is. Scaled to 80% CPU utilization, the baseline’s rated load is 11,890.5 requests per second, reported as 11,900. I compare the configurations at 11,800 requests per second, the rate that was actually run.
Five things to know about this rating:
- It comes from the baseline’s second deployment. The rule did not exist when the baseline first ran, so its ceiling run was made at the end of the first session, on new nodes. In that deployment the API tier spent 6% more CPU time per request at 8,000 requests per second than in the first one. At the first deployment’s cost the database writer would probably have been the busiest tier, as it was in the staircase.
- The API tier’s figure includes its nodes’ daemons. The API pods alone used 75.1% of their CPU limits. By that measure the database writer would set the rating, at about 12,000 requests per second, less than 1% above the rating I use.
- A tier’s average hides its busiest node. The three API nodes were not equally loaded. In the ceiling run the busiest used 87.8% of the CPU limits of its two pods. Rated by its busiest node, the baseline would carry about 10,750 to 11,300 requests per second in its three runs at this rate. These are estimates, not rates that were run. I keep the tier average, as the rule was written, and apply the same measure to every configuration.
- Two more runs gave the same rating. The second session held the baseline at 11,800 requests per second twice more, on new nodes. Its busiest tier, the database writer this time, was at 79.3% and 79.4% CPU utilization. Scaled to 80% CPU utilization, each of the three runs rates the baseline at about 11,900 requests per second: 11,890.5, 11,899.8 and 11,890.4 unrounded.
- One rule of the rating was tightened after results were in. What happens when a ceiling run misses the window of 75% to 85% CPU utilization or breaks the limits was written down on 23 November at 22:08, after the right-sized stack’s staircase had been analysed. No ceiling run needed it: all three landed inside the window and within the limits.
Step 2: What does a same-size upgrade from Graviton2 to Graviton5 change?
Each tier spends 55% to 64% less CPU time per request, the p99 response time falls by more than half, and the instances cost 10% more. At 12,000 requests per second, just above the baseline’s rated load, the busiest tier of the same-size Graviton5 stack used about a third of its CPU.
The upgrade is one commit. Four of its changed lines are instance settings; the other three are the configuration’s name and a comment:
$ git diff -U0 6ee587d 0dcf6f5 -- infra/config deploy/values/active.yaml | grep -E '^(diff|[-+][^-+])'
diff --git a/deploy/values/active.yaml b/deploy/values/active.yaml
-# Graviton2 baseline.
+# Graviton5 at the same sizes as the baseline.
-stage: a-graviton2-baseline
+stage: b-graviton5-same-size
diff --git a/infra/config/ACTIVE_STAGE b/infra/config/ACTIVE_STAGE
-a-graviton2-baseline
+b-graviton5-same-size
diff --git a/infra/config/database.json b/infra/config/database.json
- "DBInstanceClass": "db.r6g.8xlarge"
+ "DBInstanceClass": "db.r9g.8xlarge"
diff --git a/infra/config/eks.json b/infra/config/eks.json
- "SystemInstanceType": "m6g.large",
+ "SystemInstanceType": "m9g.large",
- "WebInstanceType": "c6g.4xlarge",
+ "WebInstanceType": "c9g.4xlarge",
- "ApiInstanceType": "m6g.xlarge",
+ "ApiInstanceType": "m9g.xlarge",
AWS CodePipeline applied that commit under load in 34 minutes 44 seconds. A later section shows what clients saw meanwhile. Afterwards the cluster reported the new instance types:
$ kubectl get nodes --sort-by=.metadata.labels.tier -o custom-columns='NODE:.metadata.name,TIER:.metadata.labels.tier,TYPE:.metadata.labels.node\.kubernetes\.io/instance-type,ZONE:.metadata.labels.topology\.kubernetes\.io/zone,VCPU:.status.capacity.cpu,KUBELET:.status.nodeInfo.kubeletVersion'
NODE TIER TYPE ZONE VCPU KUBELET
ip-10-80-73-68.us-west-2.compute.internal api m9g.xlarge us-west-2a 4 v1.37.1-eks-9adbfea
ip-10-80-76-97.us-west-2.compute.internal api m9g.xlarge us-west-2a 4 v1.37.1-eks-9adbfea
ip-10-80-88-25.us-west-2.compute.internal api m9g.xlarge us-west-2b 4 v1.37.1-eks-9adbfea
ip-10-80-64-231.us-west-2.compute.internal system m9g.large us-west-2a 2 v1.37.1-eks-9adbfea
ip-10-80-90-6.us-west-2.compute.internal system m9g.large us-west-2b 2 v1.37.1-eks-9adbfea
ip-10-80-71-227.us-west-2.compute.internal web c9g.4xlarge us-west-2a 16 v1.37.1-eks-9adbfea
ip-10-80-85-164.us-west-2.compute.internal web c9g.4xlarge us-west-2b 16 v1.37.1-eks-9adbfea
The pods saw a different processor. 0xd0c is the part number of the Arm Neoverse N1 core in Graviton2, and 0xd84 that of the Neoverse V3 core in Graviton5.
On Graviton5, Corretto set UseSVE=2 by itself. Neoverse N1 has no SVE, so 0 is the only possible value on Graviton2; the flag shows that the JVM may use SVE2, not that this workload gains from it. The two parallel GC threads in each line are what the JVM chooses when it sees two processors. The listing has every deployment reported in this post, by the time of its snapshot:
$ jq -r '[.stage, .at, (.api.cpu | capture("CPU part\\s*: (?<p>0x[0-9a-f]+)").p), (.api.jvm_flags | capture("(?<f>UseSVE=[0-9])").f), (.api.jvm_flags | capture("(?<f>ParallelGCThreads=[0-9]+)").f), (.api.java | capture("(?<v>Corretto-[0-9.]+)").v), .web.node] | @tsv' results/*/environment*.json | sort -k2 | column -t
a-graviton2-baseline 2026-11-23T16:02:22Z 0xd0c UseSVE=0 ParallelGCThreads=2 Corretto-21.0.13.1.2 v24.22.3
b-graviton5-same-size 2026-11-23T18:10:03Z 0xd84 UseSVE=2 ParallelGCThreads=2 Corretto-21.0.13.1.2 v24.22.3
c-graviton5-right-sized 2026-11-23T21:12:35Z 0xd84 UseSVE=2 ParallelGCThreads=2 Corretto-21.0.13.1.2 v24.22.3
a-graviton2-baseline 2026-11-24T01:46:41Z 0xd0c UseSVE=0 ParallelGCThreads=2 Corretto-21.0.13.1.2 v24.22.3
a-graviton2-baseline 2026-11-24T08:32:38Z 0xd0c UseSVE=0 ParallelGCThreads=2 Corretto-21.0.13.1.2 v24.22.3
c-graviton5-right-sized 2026-11-24T10:02:52Z 0xd84 UseSVE=2 ParallelGCThreads=2 Corretto-21.0.13.1.2 v24.22.3
The comparison is between two deployments of the same stack: the same images and the same request mix. The database is one cluster, modified in place: only the instance class changed.
The database executed nearly the same statements and read nearly the same rows per request: at 8,000 requests per second, 2.75 statements and 1,161 rows per request on Graviton2, and 2.75 statements and 1,164 rows on Graviton5. These counters cover each run as a whole, its ramp included. Its storage write operations per request were 16% higher on Graviton5, in one run each; the cost section comes back to that. What changed is the CPU time each tier spent:
| Tier | Request rate and runs | A, Graviton2: CPU time per request | B, Graviton5: CPU time per request | A divided by B | Less CPU time per request on Graviton5 |
|---|---|---|---|---|---|
| Web tier: React pages rendered on Node.js 24 | 8,000 requests per second: three 590-second runs of each | 1.974 ms | 0.891 ms | 2.22 | 55% |
| A at 11,800 requests per second (3 runs of 590 seconds), B at 12,000 requests per second (1 step of 110 seconds) | 1.985 ms | 0.883 ms | 2.25 | 56% | |
| API tier: Java 21, Spring Boot | 8,000 requests per second: three 590-second runs of each | 0.676 ms | 0.241 ms | 2.80 | 64% |
| A at 11,800 requests per second (3 runs of 590 seconds), B at 12,000 requests per second (1 step of 110 seconds) | 0.700 ms | 0.253 ms | 2.76 | 64% | |
| Database: Aurora MySQL 3.10 writer | 8,000 requests per second: three 590-second runs of each | 2.269 ms | 0.814 ms | 2.79 | 64% |
| A at 11,800 requests per second (3 runs of 590 seconds), B at 12,000 requests per second (1 step of 110 seconds) | 2.151 ms | 0.818 ms | 2.63 | 62% |

CPU time per request is a tier’s total CPU time divided by all requests sent to the stack. The web figure is therefore spread over API calls that never render a page, and the web and API figures include their nodes’ system daemons. The change is between instance generations as a whole: processor, memory and network together.
The ratios hold at both loads in the table for the web and API tiers. The database ratio is lower near the rated load, 2.63 against 2.79, because the Graviton2 writer needs less CPU time per request as its load rises: 10% less at its last passing step than at its first. These are ratios of CPU time spent, not of capacity. Capacity is measured below.
One difference between the two deployments may add to the gap in response times. By chance, two of the three API nodes shared the database writer’s Availability Zone in B’s runs, against one in A’s and in C’s. A check on the baseline found a difference of about 0.3 ms in p95 response time between the two placements, without isolating the placement’s part in it; it is described under “Do the results repeat?”.
How busy is the same-size Graviton5 stack near the baseline’s rated load?
Its busiest tier used about a third of its CPU, about 41% of the way to the 80% ceiling. Configuration B has no 10-minute run at 11,800 requests per second. The nearest measurement is the step of its staircase at 12,000 requests per second, 110 seconds long:
$ uv run -q analysis/summarize.py results/b-graviton5-same-size/b-cap | grep -vE '^( {6}|$)'
... (4 lines of output not shown)
window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
s01 8000 8001.0 0.000 3.2 8.0 10.8 22.2 19.1 20.4 0.887 0.251 0.816
s02 12000 11999.0 0.000 3.3 8.2 11.1 33.1 29.0 30.7 0.883 0.253 0.818
s03 16000 15999.8 0.000 3.4 8.6 11.5 44.6 39.1 41.3 0.892 0.257 0.825
s04 20000 20000.0 0.000 3.5 9.1 12.2 56.0 49.1 51.9 0.896 0.258 0.831
s05 24000 24000.0 0.000 3.7 10.1 13.9 67.6 59.1 62.6 0.902 0.259 0.835
s06 25600 25600.7 0.000 3.7 10.8 15.3 72.3 61.9 66.7 0.903 0.254 0.834
s07 27200 27199.0 0.000 3.8 11.9 17.4 76.6 66.5 70.7 0.901 0.257 0.832
s08 28800 28799.9 0.000 3.9 13.8 20.6 81.1 70.1 74.5 0.901 0.256 0.828
s09 30400 30400.3 0.000 4.0 16.5 25.2 85.2 73.3 78.1 0.897 0.253 0.822
s10 32000 32001.0 0.000 4.2 21.0 32.6 88.6 77.8 81.7 0.886 0.255 0.817
At 12,000 requests per second its web tier was at 33.1% CPU utilization, its API tier at 29.0% and its database writer at 30.7%, with a p99 response time of 11.1 ms. The staircase did not find B’s limit: its steps were fixed in advance and end at 32,000 requests per second, and B passed every one without a failed request.
Its rated load does have a figure. On the staircase the web tier crosses 80% CPU utilization at 28,404 requests per second, by interpolation. Rounded down to a multiple of 100 requests per second, that is the rate I ran for 590 seconds:
$ uv run -q analysis/summarize.py results/b-graviton5-same-size/b-ceiling | awk '/^ (window|unit) / { if (!shown[$1]++) print; next } /^ steady /'
window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
steady 28400 28400.0 0.000 3.8 13.1 19.6 80.0 68.4 73.7 0.901 0.253 0.830
The web tier sat at 80.0% CPU utilization and the database writer at 73.7%. The p99 response time was 19.6 ms and no request failed. Configuration B’s rated load is 28,400 requests per second, 2.39 times the baseline’s 11,900.
What does AWS claim for each Graviton generation?
AWS states its gains one generation at a time, as “up to” figures. For Amazon EC2: Graviton3 over Graviton2, up to 25% higher performance; Graviton4 over Graviton3, up to 30% for web applications, 40% for databases and 45% for large Java applications; Graviton5 over Graviton4, up to 25% better compute performance, 35% for web applications and 30% for databases.
For Aurora the three steps are stated as performance improvements of up to 30%, 40% and 30%. These are best cases from AWS’s own benchmarks, and I found no AWS figure for Graviton5 against Graviton2.
Multiplied through, the figures come to between 2.0 and 2.4 for Amazon EC2, depending on which of them one takes, and to about 2.4 for Aurora. My ratios of CPU time per request are 2.22 for the web tier, 2.80 for the API tier and 2.79 for the database writer. The two are different measures, on different workloads, and I did not establish how they relate.
Why not stop at the same size?
Because the capacity is paid for and not used. At the same size the EC2 and Aurora instances cost $8,067 per month at On-Demand prices against the baseline’s $7,307, 10.4% more.
In return the stack is rated for 2.39 times the load, which is the trade for a service that needs that much more capacity. A service that needs the baseline’s capacity is paying for the baseline’s instance sizes while its busiest tier runs at a third of its CPU.
The spare capacity does buy one thing at this load. By the arithmetic of the section on a safe peak below, one web node of the same-size stack would be at about 66% CPU utilization if the other were lost, which neither of the other two configurations can offer.
Step 3: Does half the size fit each tier?
By the calculation, yes. On Graviton5 each of the three tiers needs 34% to 41% of the baseline’s capacity at the baseline’s rated load, so half fits and a quarter does not.
The half-size configuration was fixed before I could make this calculation. The calculation uses two figures that were measured later: the baseline’s rated load, and the CPU time per request on Graviton5.
The calculation for each tier: the vCPUs it needs are the request rate in requests per second, times the CPU time per request in milliseconds, divided by 1,000 and by 0.8.
| Step | Web tier | API tier | Database writer |
|---|---|---|---|
| 1. CPU time per request on Graviton5, measured on configuration B at 8,000 requests per second | 0.891 ms | 0.241 ms | 0.814 ms |
| 2. CPU in use at the baseline’s rated load of 11,900 requests per second: row 1 times the request rate, divided by 1,000 | 10.6 vCPUs | 2.9 vCPUs | 9.7 vCPUs |
| 3. Capacity that keeps row 2 at 80% CPU utilization: row 2 divided by 0.8 | 13.2 vCPUs | 3.6 vCPUs of pod CPU limits | 12.1 vCPUs |
| 4. Capacity of the Graviton2 baseline | 32 vCPUs | 10.5 vCPUs of pod CPU limits | 32 vCPUs |
| 5. One instance size down: half the baseline, as deployed in configuration C | 16 vCPUs: 2 x c9g.2xlarge | 5.25 vCPUs of pod CPU limits: pods on 3 x m9g.large | 16 vCPUs: db.r9g.4xlarge |
| 6. Two instance sizes down: a quarter of the baseline. Not deployed, and for the API tier not deployable with pods of 1.75 vCPUs | 8 vCPUs: less than row 3 | 2.6 vCPUs of pod CPU limits: less than row 3 | 8 vCPUs: less than row 3 |
| 7. Calculated CPU utilization at the rated load: row 2 divided by row 5 | 66.2% | 54.6% | 60.5% |
| 8. The same calculation for the comparison load of 11,800 requests per second | 65.7% | 54.2% | 60.0% |
| 9. Measured CPU utilization of configuration C at 11,800 requests per second: median of three 590-second runs | 65.6% | 39.6% | 61.6% |
The rows are computed from unrounded figures; the rated load is 11,890.5 requests per second before it is rounded to 11,900.
Take the web tier. On Graviton5 a request costs 0.891 ms of web-tier CPU time. At 11,900 requests per second that is 10.6 vCPUs in use. To stay at 80% CPU utilization the tier needs 13.2 vCPUs.
The baseline has 32 vCPUs. With the node count fixed at two, the next sizes down have 16 vCPUs and 8 vCPUs. The first fits, the second does not.
Four things follow from the table:
- By this calculation every tier fits in half, and none in a quarter. The quarter is hypothetical: I did not deploy it, and the API tier’s quarter could not be deployed with pods of 1.75 vCPUs.
- For a tier at the ceiling, the halving rests on the generation. At its rated load the baseline’s busiest tier is at 80% CPU utilization. If a request cost the same CPU time, the same instances at half the size would need 160% of their CPU. On Graviton5 a request costs less than half the CPU time.
- The calculated spare capacity comes from the sizes. Each instance size has twice the vCPUs of the one below, so the right-sized stack gets more than the 80% rule asks for. The calculation gives 55% to 66% CPU utilization at the rated load, not 80%. The API tier’s measured margin turned out larger still, for a reason I did not find (step 4).
- A tier at the ceiling needs twice the work per vCPU to fit in half the vCPUs; a tier below it needs less. The baseline’s web tier was at 72% CPU utilization in its ceiling run at 11,800 requests per second, so it fits in half the vCPUs with 1.79 times the work per vCPU. It got 2.22 times, the ratio of the web tier’s CPU time per request between configurations A and B at 8,000 requests per second.
I kept the node counts fixed and changed the instance size, and with it the pod counts and the connection pool per pod. Two web nodes are the minimum for two Availability Zones, and a managed node group would not change its instance type and its node count in one update. A tier can also be trimmed by its node count, in finer steps than a factor of two; I did not test that.
The calculation rests on two assumptions, and step 4 tests them together, not one by one. The first is that a request costs the same CPU time at 11,800 requests per second as at 8,000, where configuration B has its three 10-minute runs. The second is that it costs the same on an instance of half the size.
One thing the table does not show is memory. Halving a memory-optimized database class halves its memory, here from 256 GiB to 128 GiB. This data set takes about 5.7 GB, so it fits either way. A database whose working set needs the larger class cannot be halved, however fast the processor is.
How is the right-sizing applied?
In two commits, and their order matters: first the replica counts and the connection pool, then the nodes and the Aurora instances.
$ git log --reverse --stat --format='commit %h %cI%n %s%n' 4dc8e5c..57fa045 -- infra/config deploy/values/active.yaml
commit 321a0fd 2026-11-23T20:08:41Z
Scale pods to the c-graviton5-right-sized replica counts before resizing nodes
deploy/values/active.yaml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
commit bd20563 2026-11-23T20:14:03Z
Right-size every tier on Graviton5 to half the baseline's vCPUs (configuration C)
infra/config/ACTIVE_STAGE | 2 +-
infra/config/database.json | 2 +-
infra/config/eks.json | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
The pods go first. Two c9g.2xlarge nodes have 16 vCPUs between them, and 32 web pods request 0.95 vCPU each, so on halved nodes half the pods would have nowhere to run. The whole change, both commits together:
$ git diff -U0 4dc8e5c 57fa045 -- infra/config deploy/values/active.yaml | grep -E '^(diff|[-+][^-+])'
diff --git a/deploy/values/active.yaml b/deploy/values/active.yaml
-# Graviton5 at the same sizes as the baseline.
+# Graviton5 right-sized: every tier at half the baseline size.
-stage: b-graviton5-same-size
+stage: c-graviton5-right-sized
- replicas: 32
+ replicas: 16
- replicas: 6
+ replicas: 3
- dbPoolSize: 24
+ dbPoolSize: 48
diff --git a/infra/config/ACTIVE_STAGE b/infra/config/ACTIVE_STAGE
-b-graviton5-same-size
+c-graviton5-right-sized
diff --git a/infra/config/database.json b/infra/config/database.json
- "DBInstanceClass": "db.r9g.8xlarge"
+ "DBInstanceClass": "db.r9g.4xlarge"
diff --git a/infra/config/eks.json b/infra/config/eks.json
- "WebInstanceType": "c9g.4xlarge",
+ "WebInstanceType": "c9g.2xlarge",
- "ApiInstanceType": "m9g.xlarge",
+ "ApiInstanceType": "m9g.large",
The replica counts halve, to 16 web pods and 3 API pods, and the connection pool of each API pod goes from 24 to 48 connections. After the second pipeline run the cluster looked like this:
$ kubectl get nodes --sort-by=.metadata.labels.tier -o custom-columns='NODE:.metadata.name,TIER:.metadata.labels.tier,TYPE:.metadata.labels.node\.kubernetes\.io/instance-type,ZONE:.metadata.labels.topology\.kubernetes\.io/zone,VCPU:.status.capacity.cpu,KUBELET:.status.nodeInfo.kubeletVersion'
NODE TIER TYPE ZONE VCPU KUBELET
ip-10-80-76-128.us-west-2.compute.internal api m9g.large us-west-2a 2 v1.37.1-eks-9adbfea
ip-10-80-83-4.us-west-2.compute.internal api m9g.large us-west-2b 2 v1.37.1-eks-9adbfea
ip-10-80-83-81.us-west-2.compute.internal api m9g.large us-west-2b 2 v1.37.1-eks-9adbfea
ip-10-80-64-231.us-west-2.compute.internal system m9g.large us-west-2a 2 v1.37.1-eks-9adbfea
ip-10-80-90-6.us-west-2.compute.internal system m9g.large us-west-2b 2 v1.37.1-eks-9adbfea
ip-10-80-75-114.us-west-2.compute.internal web c9g.2xlarge us-west-2a 8 v1.37.1-eks-9adbfea
ip-10-80-94-182.us-west-2.compute.internal web c9g.2xlarge us-west-2b 8 v1.37.1-eks-9adbfea

Step 4: Does the right-sized Graviton5 stack carry the baseline’s rated load?
Yes. At the comparison load of 11,800 requests per second, the rate of the run that rated the baseline, the busiest tier of the right-sized stack was at 66% CPU utilization, where the baseline’s was at 79%. Its p99 response time was 15.6 ms against the baseline’s 33.3 ms.
This is the comparison the second session was run for. The comparison load is about 100 requests per second below the baseline’s rating; the right-sized stack’s own rating, in the next section, lies above both. Each stack was held at 11,800 requests per second in 10-minute runs with 590 seconds measured. The baseline has three such runs: its ceiling run of the first session, and two more in the second session.
$ uv run -q analysis/summarize.py results/a-graviton2-baseline/a2-ceiling results/a-graviton2-baseline/a3-rated-1 results/a-graviton2-baseline/a3-rated-2 | awk '/^[a-z0-9-]+ \/ / { run = $3 } /^ window / { if (!shown[$1]++) printf " %-12s%s\n", "run", substr($0, 3); next } /^ unit / { if (!shown[$1]++) printf " %-12s%s\n", "", substr($0, 3); next } /^ steady / { printf " %-12s%s\n", run, substr($0, 3) }'
run window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
a2-ceiling steady 11800 11799.9 0.000 7.0 21.2 31.7 71.6 79.4 78.8 1.942 0.706 2.138
a3-rated-1 steady 11800 11799.9 0.000 7.1 22.1 33.3 73.2 78.4 79.3 1.985 0.697 2.151
a3-rated-2 steady 11800 11799.9 0.000 7.1 22.1 33.3 73.5 78.7 79.4 1.992 0.700 2.153
The right-sized stack has three, all in the second session:
$ uv run -q analysis/summarize.py results/c-graviton5-right-sized/c2-rated-1 results/c-graviton5-right-sized/c2-rated-2 results/c-graviton5-right-sized/c2-rated-3 | awk '/^[a-z0-9-]+ \/ / { run = $3 } /^ window / { if (!shown[$1]++) printf " %-12s%s\n", "run", substr($0, 3); next } /^ unit / { if (!shown[$1]++) printf " %-12s%s\n", "", substr($0, 3); next } /^ steady / { printf " %-12s%s\n", run, substr($0, 3) }'
run window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
c2-rated-1 steady 11800 11799.9 0.000 3.8 11.1 15.7 65.5 40.1 61.6 0.889 0.179 0.836
c2-rated-2 steady 11800 11799.9 0.000 3.8 11.1 15.6 65.7 39.6 61.6 0.890 0.176 0.835
c2-rated-3 steady 11800 11799.9 0.000 3.8 11.0 15.6 65.6 39.6 61.6 0.889 0.176 0.835
Side by side, with the same-size stack’s nearest staircase step for reference:
| Measure | A: Graviton2 baseline | B: Graviton5, same size | C: Graviton5, right-sized |
|---|---|---|---|
| Request rate | 11,800 requests per second | 12,000 requests per second | 11,800 requests per second |
| Runs | 3 runs of 590 seconds | 1 step of 110 seconds | 3 runs of 590 seconds |
| Achieved request rate, as a share of the target rate | 100.00% (100.00 to 100.00%) | 99.99% | 100.00% (100.00 to 100.00%) |
| Failed requests, as a share of the requests sent | 0.000% (0.000 to 0.000%) | 0.000% | 0.000% (0.000 to 0.000%) |
| p50 response time | 7.1 ms (7.0 to 7.1 ms) | 3.3 ms | 3.8 ms (3.8 to 3.8 ms) |
| p95 response time | 22.1 ms (21.2 to 22.1 ms) | 8.2 ms | 11.1 ms (11.0 to 11.1 ms) |
| p99 response time | 33.3 ms (31.7 to 33.3 ms) | 11.1 ms | 15.6 ms (15.6 to 15.7 ms) |
| Web tier: CPU utilization, as a share of the web nodes’ vCPUs | 73.2% (71.6 to 73.5%) | 33.1% | 65.6% (65.5 to 65.7%) |
| API tier: CPU utilization, as a share of the API pods’ CPU limits | 78.7% (78.4 to 79.4%) | 29.0% | 39.6% (39.6 to 40.1%) |
| Database writer: CPU utilization, as a share of its vCPUs | 79.3% (78.8 to 79.4%) | 30.7% | 61.6% (61.6 to 61.6%) |
| CPU utilization of the busiest tier: the highest of the three figures above | 79.3%, database writer | 33.1%, web tier | 65.6%, web tier |
| CPU utilization of the busiest single node in any run, measured the same way | 87.8%, an API node | 33.5%, a web node | 66.0%, a web node |
| API containers: share of their scheduling periods in which the CPU limit stopped them, counted over each run as a whole | 0.8% (0.5 to 1.0%) | 1.1% over its whole staircase | 0.0% (0.0 to 0.0%) |
| Web tier: CPU time per request | 1.985 ms (1.942 to 1.992 ms) | 0.883 ms | 0.889 ms (0.889 to 0.890 ms) |
| API tier: CPU time per request | 0.700 ms (0.697 to 0.706 ms) | 0.253 ms | 0.176 ms (0.176 to 0.179 ms) |
| Database writer: CPU time per request | 2.151 ms (2.138 to 2.153 ms) | 0.818 ms | 0.835 ms (0.835 to 0.836 ms) |
Figures of several runs are the median, with the lowest and highest run in brackets. Configuration B was not run at 11,800 requests per second: its column is one 110-second step of its capacity run at 12,000 requests per second, from the first session, shown for reference.

On the baseline two tiers are within a percentage point of each other in every run: the API tier at 78.4% to 79.4% of its pods’ CPU limits, the database writer at 78.8% to 79.4% of its vCPUs. Which of the two is ahead changes from run to run. On the right-sized stack the busiest tier is the web tier in every run.
The ranges in brackets are the lowest and highest of three runs, not an uncertainty over days, hosts or workloads. The baseline’s three are its ceiling run of the first session and, about six and a half hours later, the two runs of the second session. In between, its database cluster was stopped and started, and the nodes and pods are new.
The right-sized stack’s three runs are consecutive, on one deployment. Its first run started 63 minutes after the baseline’s last run had ended, with the writer on the other database instance in the other Availability Zone. Drift over time cannot be told apart from the change of configuration.
Throttling may add to the difference in response times. Counted over each run as a whole, the baseline’s API containers were throttled by their CPU limit in 0.5% to 1.0% of their scheduling periods; the right-sized stack’s had no throttled period in its three runs. Throttling can lengthen the slowest requests, so part of the gap at p99 may come from the pods’ CPU limit, which is 1.75 vCPUs in every configuration. I did not isolate that part.
Amazon CloudWatch drew the database’s part of this comparison from its own metric. The load balancer’s request rate over the same hours is in the repository (results/evidence/cloudwatch/session2-load-balancer-requests.png).

Before any load of the session ran, I fixed what would count as carrying the load. At this rate the right-sized stack had to meet the thresholds on achieved rate, errors and response time of my first plan, and none of its tiers could be above 80% CPU utilization. The first plan’s sixth criterion compares staircases and is reported with the lighter load. The CPU criterion is decided on the medians; the highest figure of any tier in a single run of the right-sized stack was 65.7% CPU utilization.
| Criterion at 11,800 requests per second | A: Graviton2 baseline, median of 3 runs | C: Graviton5, right-sized, median of 3 runs | Difference | Threshold for C | Result |
|---|---|---|---|---|---|
| Achieved request rate | 100.00% of the target rate | 100.00% of the target rate | not used: the threshold is absolute | At least 99.5% | Met |
| Error rate | 0.000% of requests | 0.000% of requests | +0.000 percentage points | At most 0.1%, and at most the baseline’s plus 0.05 percentage points | Met |
| p50 response time | 7.1 ms | 3.8 ms | -46% | At most 5% above the baseline’s | Met |
| p95 response time | 22.1 ms | 11.1 ms | -50% | At most 5% above the baseline’s | Met |
| p99 response time | 33.3 ms | 15.6 ms | -53% | At most 10% above the baseline’s | Met |
| CPU utilization of the busiest tier: the highest of the three tier medians | 79.3%, database writer | 65.6%, web tier | -13.7 percentage points | At most 80% | Met |
Against the baseline’s two runs of the second session alone, the result is the same: 6 of 6 criteria are met.
I had also written down what I expected, from the right-sized stack’s staircase in the first session: the busiest tier at about 65% CPU utilization and a p99 response time of about 16.5 ms (the analysis interpolates 64.4% and 16.4 ms). Measured: 65.6% CPU utilization in the web tier and a p99 response time of 15.6 ms. With that staircase known, the outcome was foreseeable: this was a repeat, not a blind test.
How close was the calculation of step 3? For 11,800 requests per second it gives 65.7%, 54.2% and 60.0% CPU utilization for the web tier, the API tier and the database writer. The medians of the three runs were 65.6%, 39.6% and 61.6% CPU utilization. I made the calculation during the second session, so it is a check, not a forecast.
For the web tier and the database writer the calculation is within two percentage points. For the API tier it is 15 percentage points too high: the assumption that a request costs the same CPU time on an instance of half the size did not hold there. On m9g.large nodes with one pod each, a request cost 0.176 ms of API CPU time at this rate. On m9g.xlarge nodes with two pods each it cost 0.253 ms of API CPU time in the staircase step at 12,000 requests per second.
The 10-minute runs at 8,000 requests per second show the same gap, 0.183 ms against 0.241 ms of API CPU time per request, with no throttling in either configuration.
I did not find the cause. The instance size is not the only difference in this tier: six pods became three, two pods per node became one, and each pod’s connection pool grew from 24 to 48 connections. I tested none of these.
The calculation’s error for the API tier was in the stack’s favour here. In another workload it could go the other way, which is why the calculation needs the run of step 4. By its measured use the API tier would be at about 79% CPU utilization on a quarter of the baseline’s pod CPU limits, a size that pods of 1.75 vCPUs cannot have.

What happens at a lighter load?
The order is the same as near the comparison load, with more room everywhere: the same-size stack is the fastest, then the right-sized stack, then the baseline.
The first session ran every configuration three times at 8,000 requests per second, about two-thirds of the baseline’s rated load. This is the load of my first plan, and the one at which the same-size stack has its 10-minute runs:
| Measure at 8,000 requests per second: median of three 590-second runs (lowest to highest) | A: Graviton2 baseline | B: Graviton5, same size | C: Graviton5, right-sized |
|---|---|---|---|
| Failed requests, counted over the three runs together | 0 of 14,160,132 | 0 of 14,160,132 | 0 of 14,160,133 |
| p50 response time | 6.1 ms (6.1 to 6.1 ms) | 3.1 ms (3.1 to 3.2 ms) | 3.7 ms (3.7 to 3.7 ms) |
| p95 response time | 16.9 ms (16.9 to 17.0 ms) | 7.8 ms (7.8 to 7.9 ms) | 8.8 ms (8.7 to 8.8 ms) |
| p99 response time | 26.4 ms (26.4 to 26.7 ms) | 10.8 ms (10.8 to 10.8 ms) | 11.8 ms (11.6 to 11.8 ms) |
| Web tier: CPU utilization, as a share of the web nodes’ vCPUs | 49.4% (49.2 to 49.8%) | 22.3% (22.2 to 22.3%) | 43.4% (42.7 to 43.4%) |
| API tier: CPU utilization, as a share of the API pods’ CPU limits | 51.5% (51.0 to 52.3%) | 18.4% (18.3 to 18.4%) | 28.0% (27.9 to 28.1%) |
| Database writer: CPU utilization, as a share of its vCPUs | 56.7% (56.7 to 56.7%) | 20.3% (20.3 to 20.4%) | 42.5% (42.5 to 42.7%) |
$ uv run -q analysis/summarize.py results/c-graviton5-right-sized/c-r1 results/c-graviton5-right-sized/c-r2 results/c-graviton5-right-sized/c-r3 | awk '/^ (window|unit) / { if (!shown[$1]++) print; next } /^ steady /'
window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
steady 8000 8000.1 0.000 3.7 8.8 11.8 43.4 28.0 42.7 0.869 0.183 0.854
steady 8000 8000.1 0.000 3.7 8.7 11.6 42.7 27.9 42.5 0.855 0.183 0.850
steady 8000 8000.1 0.000 3.7 8.8 11.8 43.4 28.1 42.5 0.868 0.184 0.850
Both Graviton5 stacks met the six criteria of my first plan: the five on achieved rate, errors and response time at this rate, and the one on the staircases, a highest passing step of at least 95% of the baseline’s. The tables are in the repository (report/tables/criteria-first-plan-b.md and criteria-first-plan-c.md).
How much headroom does the right-sized stack have?
About 3,100 requests per second above the comparison load, by its ceiling run in the first session, and about 2,600 by its runs in the second. The ceiling run rates it at about 14,900 requests per second, 25% above the baseline’s rating of about 11,900.
The rating is from the first session; the ceiling run was not repeated in the second. The right-sized stack’s staircase:
$ uv run -q analysis/summarize.py results/c-graviton5-right-sized/c-cap | grep -vE '^( {6}|$)'
... (4 lines of output not shown)
window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
s01 8000 7999.7 0.000 3.8 9.0 11.9 44.4 29.3 43.3 0.887 0.192 0.866
s02 9600 9600.0 0.000 3.8 9.4 12.6 51.9 33.6 51.7 0.865 0.184 0.862
s03 11200 11200.1 0.000 4.0 10.8 15.4 62.3 39.9 59.6 0.889 0.187 0.851
s04 12000 12000.0 0.000 4.1 11.3 16.7 65.1 44.2 63.9 0.868 0.193 0.852
s05 12800 12800.0 0.000 4.2 12.2 18.3 69.3 46.5 67.8 0.866 0.191 0.848
s06 13600 13600.2 0.000 4.3 13.5 19.8 74.4 51.2 71.4 0.875 0.198 0.840
s07 14400 14400.0 0.000 4.5 14.7 21.9 77.1 54.4 75.0 0.857 0.199 0.833
s08 15200 15200.1 0.000 4.7 17.7 27.0 82.2 57.5 78.6 0.865 0.199 0.827
s09 16000 16000.2 0.000 4.9 21.4 33.0 86.5 59.4 81.5 0.865 0.195 0.815
s10 16800 16800.0 0.000 5.4 27.5 48.7 89.6 63.4 84.9 0.853 0.198 0.809
s11 17600 17600.2 0.000 6.1 74.8 178.6 94.2 67.1 87.7 0.856 0.200 0.797
Its highest passing step is 16,800 requests per second; the baseline’s was 14,400. At 17,600 requests per second it breaks the response time limits, with a p99 response time of 179 ms and the web tier at 94% CPU utilization. No request failed on any step.
The staircase put the web tier at 80% CPU utilization at 14,855 requests per second. Rounded down to a multiple of 100 requests per second, that is the rate of its ceiling run:
$ uv run -q analysis/summarize.py results/c-graviton5-right-sized/c-ceiling | awk '/^ (window|unit) / { if (!shown[$1]++) print; next } /^ steady /'
window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
steady 14800 14800.1 0.000 4.4 15.6 23.2 79.3 53.2 76.4 0.858 0.189 0.826
The web tier ran at 79.3% CPU utilization and the database writer at 76.4%, with a p99 response time of 23.2 ms and no failed request. Scaled to 80% CPU utilization, that is 14,927 requests per second, reported as 14,900. All three configurations:
| A: Graviton2 baseline | B: Graviton5, same size | C: Graviton5, right-sized | |
|---|---|---|---|
| Ceiling run, 590 seconds | 11,800 requests per second: API tier at 79.4% CPU utilization, p99 response time 31.7 ms, 0.00% of requests failed | 28,400 requests per second: web tier at 80.0% CPU utilization, p99 response time 19.6 ms, 0.00% of requests failed | 14,800 requests per second: web tier at 79.3% CPU utilization, p99 response time 23.2 ms, 0.00% of requests failed |
| Rated load: the rate of that run, scaled to 80% CPU utilization of the busiest tier | about 11,900 requests per second | about 28,400 requests per second | about 14,900 requests per second |
| Rated load against the baseline’s | 2.39 times (+139%) | 1.25 times (+25%) | |
| Rated load above the comparison load of 11,800 requests per second | +100 requests per second (+1%) | +16,600 requests per second (+141%) | +3,100 requests per second (+26%) |
| For comparison: the rating that the runs at 11,800 requests per second point to, their rate scaled to 80% CPU utilization | about 11,900 requests per second, scaled from 79% CPU utilization in 3 runs | not given: one step, at 12,000 requests per second and 33% CPU utilization | about 14,400 requests per second, scaled from 66% CPU utilization in 3 runs |
| Highest passing step of the staircase, 110 seconds per step | 14,400 requests per second | at least 32,000 requests per second | 16,800 requests per second |
| First failing step | 15,200 requests per second: 26% of requests failed | none: it passed every step | 17,600 requests per second: p99 response time 179 ms |
| From the rated load to the highest passing step | +21% | at least +13% | +13% |
The ratios and differences in this table are those of the reported rated loads, which are rounded to 100 requests per second, so that they can be recomputed from the table.

That answers the question I registered together with the rule on 23 November: is the right-sized stack’s rated load at least the baseline’s, at a lower cost? It is.
The second session gives a check on the right-sized stack’s rating, and it comes out lower. In its three runs at 11,800 requests per second the web tier spent 0.889 ms of CPU time per request, against 0.858 ms in the ceiling run of its first deployment, 3.7% more. Scaled from 66% to 80% CPU utilization, those runs put its rating at about 14,400 requests per second, 21% above the baseline’s.
The rule rates only from a run with its busiest tier between 75% and 85% CPU utilization. These runs had their busiest tier at 66% CPU utilization, so the ceiling run’s figure stays the rating. The headroom is about 3,100 requests per second by the registered rating, and about 2,600 by this separate extrapolation. They are two estimates, not the ends of a range.
The headroom has a limit of its own. The baseline’s highest passing step is 21% above its rated load, the right-sized stack’s 13%. In absolute terms the right-sized stack passed the higher step: 16,800 against 14,400 requests per second.
These are margins to the highest step that was tested and passed, on a grid of steps 800 requests per second apart, so the difference is about one step. The baseline’s staircase and its rating also come from different deployments. I did not test why the margins differ.

Is 80% CPU utilization a safe peak?
Not for two web nodes that share the load, by arithmetic. The rating says where a tier is full, not where it is safe.
With two web nodes, losing one puts the whole web load on the other, so a web tier at 80% CPU utilization on two nodes would need 160% of one. I did not run either stack at the comparison load on one web node.
To see what one node less means at a lower load, I took one of the right-sized stack’s two web nodes out of service before a run, while no load was on the stack: I cordoned it and deleted its web pods, whose replacements then had nowhere to run. Kubernetes reported 8 of the 16 web pods ready:
$ kubectl -n storefront get deployments -o custom-columns='NAME:.metadata.name,READY:.status.readyReplicas,REPLICAS:.spec.replicas,CPU_REQUEST:.spec.template.spec.containers[0].resources.requests.cpu,CPU_LIMIT:.spec.template.spec.containers[0].resources.limits.cpu,MEMORY:.spec.template.spec.containers[0].resources.requests.memory'
NAME READY REPLICAS CPU_REQUEST CPU_LIMIT MEMORY
storefront-api 3 3 1750m 1750m 4Gi
storefront-web 8 16 950m <none> 1Gi
One 10-minute run at 8,000 requests per second followed, about two-thirds of the baseline’s rated load. The table sets it next to the preceding run at the same rate with both nodes:
| Measure at 8,000 requests per second, one run of 590 seconds each | Both web nodes in service (c2-r1) | One web node out of service (c2n-r1) |
|---|---|---|
| Web pods running | 16 of 16 pods | 8 of 16 pods |
| Achieved request rate, as a share of the target rate | 100.00% | 100.00% |
| Failed requests, as a share of the requests sent | 0.000% | 0.000% |
| p50 response time | 3.5 ms | 3.6 ms |
| p95 response time | 9.1 ms | 23.7 ms |
| p99 response time | 11.8 ms | 38.7 ms |
| CPU utilization of the web nodes in service, as a share of their vCPUs | 44.8% of two nodes | 88.9% of one node |
| Within the limits of the staircase | yes | yes |
$ uv run -q analysis/summarize.py results/c-graviton5-right-sized/c2n-r1 | awk '/^ (window|unit) / { if (!shown[$1]++) print; next } /^ steady /'
window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
steady 8000 8000.1 0.000 3.6 23.7 38.7 44.5 26.7 41.9 0.891 0.175 0.838
The stack held that load on one web node. No request failed, and the run stayed within the limits I use for a staircase step. But the node that was left ran at 88.9% CPU utilization, above the ceiling, and the slowest requests show it: the p95 response time rose from 9.1 ms to 23.7 ms and the p99 from 11.8 ms to 38.7 ms, while the p50 hardly moved. The listing’s web column divides by the vCPUs of both nodes, which is why it reads 44.5%.
The run began six minutes after the node was taken out. It shows the stack in its degraded state, not the moment of a failure: what is lost while a dead node is detected and its connections fail was not measured. It is also one tier of one stack, not the loss of an Availability Zone, which would take API nodes and possibly the database writer with it.
The arithmetic for two nodes that share a load: to stay at or under 80% CPU utilization on the remaining node after losing one, the tier may run at 40% CPU utilization before. To stay at or under 100% CPU utilization, at 50%. At the comparison load the baseline and the right-sized stack are well above that. Their web tiers ran at 73% and 66% CPU utilization on two nodes, so one node would need 146% or 131% of its vCPUs if a request cost the same CPU time. The same-size stack’s web tier, at 33% CPU utilization at 12,000 requests per second, would need 66% of one node.
Halving the instances did not make the stack more fragile by this arithmetic, because at the same load every tier of the right-sized stack is less busy than the baseline’s. At 8,000 requests per second one web node of the baseline would need 99% of its vCPUs, where the right-sized stack’s measured 89%. At the comparison load, losing one of the three API nodes would put the baseline’s API tier at about 118% of the remaining pods’ CPU limits and the right-sized stack’s at about 59%.
There are two ways out, and I tested neither. Both hold for Graviton2 and Graviton5 alike. One is a peak planned well below the rating: scaled from the run above, one web node of the right-sized stack would be at 80% CPU utilization at about 7,200 requests per second, which is an extrapolation and not a rating.
The other is a third web node, with enough web pods ready on each node to take the load of a lost one: at the comparison load the two nodes left after a loss would be at about 66% CPU utilization. On the right-sized stack it would cost $254 per month at On-Demand prices, and its instances would then cost $4,359 per month, 40% below the baseline’s.
What does each configuration cost?
At On-Demand prices the instances of the right-sized Graviton5 stack cost $4,105 per month, against $7,307 for the Graviton2 baseline: 43.8% less. The same-size Graviton5 stack costs $8,067 per month, 10.4% more.
Prices are On-Demand in US West (Oregon), read from the AWS Price List API on 23 November 2026, for a month of 730 hours. The unit prices drive the instance lines:
| Instance type, from Graviton2 to Graviton5 | vCPUs per instance | Graviton2: On-Demand price per instance-hour | Graviton5: On-Demand price per instance-hour | Difference in price |
|---|---|---|---|---|
c6g.4xlarge to c9g.4xlarge | 16 to 16 | $0.5440 | $0.6955 | +27.9% |
m6g.xlarge to m9g.xlarge | 4 to 4 | $0.1540 | $0.1957 | +27.1% |
m6g.large to m9g.large | 2 to 2 | $0.0770 | $0.0978 | +27.1% |
db.r6g.8xlarge to db.r9g.8xlarge | 32 to 32 | $4.1530 | $4.4384 | +6.9% |
c6g.4xlarge to c9g.2xlarge | 16 to 8 | $0.5440 | $0.3478 | -36.1% |
m6g.xlarge to m9g.large | 4 to 2 | $0.1540 | $0.0978 | -36.5% |
db.r6g.8xlarge to db.r9g.4xlarge | 32 to 16 | $4.1530 | $2.2192 | -46.6% |
For these types, a Graviton5 instance costs 27% to 28% more than the Graviton2 instance of the same size on Amazon EC2, and about 7% more on Aurora. A Graviton5 instance of half the size costs 36% to 47% less than the full-size Graviton2 one.
What is the whole bill?
$9,206 per month for the right-sized stack against $12,354 for the baseline, 25.5% less, and $13,145 for the same-size stack, at an assumed average of 4,000 requests per second. These are models of the recurring charges for the listed items, not invoices.
The instance lines are fixed by the configuration. Three other lines depend on traffic: load balancer capacity units, Aurora I/O and data transfer. The assumed average of 4,000 requests per second over the month is about a third of the baseline’s rated load. That is an assumption, not a measurement; a table below shows what other values do.
| Line item, in US dollars per month | A: Graviton2 baseline | B: Graviton5, same size | C: Graviton5, right-sized | Quantity and unit price |
|---|---|---|---|---|
| Compute and database | ||||
| Web tier nodes | 2 x c6g.4xlarge $794 | 2 x c9g.4xlarge $1,015 | 2 x c9g.2xlarge $508 | 730 hours x the On-Demand rate per instance-hour |
| API tier nodes | 3 x m6g.xlarge $337 | 3 x m9g.xlarge $429 | 3 x m9g.large $214 | 730 hours x the On-Demand rate per instance-hour |
| System nodes | 2 x m6g.large $112 | 2 x m9g.large $143 | 2 x m9g.large $143 | 730 hours x the On-Demand rate per instance-hour |
| Aurora MySQL writer and reader | 2 x db.r6g.8xlarge $6,063 | 2 x db.r9g.8xlarge $6,480 | 2 x db.r9g.4xlarge $3,240 | 730 hours x the On-Demand rate per instance-hour |
| Subtotal: compute and database | $7,307 | $8,067 | $4,105 | |
| Rest of the stack | ||||
| Amazon EKS control plane | $73 | $73 | $73 | 730 cluster-hours x $0.10 per cluster-hour |
| Node volumes: 7 x 40 GiB gp3 | $22 | $22 | $22 | 280 GB-months x $0.08 per GB-month |
| Application Load Balancer | $16 | $16 | $16 | 730 hours x $0.0225 per hour |
| Load balancer capacity units | $340 | $340 | $340 | 42,509 LCU-hours x $0.008 per LCU-hour; bytes through the load balancer as measured in the baseline’s runs at 8,000 requests per second, scaled to the average request rate; one LCU for each GB per hour of throughput |
| NAT gateway | $33 | $33 | $33 | 730 hours x $0.045 per hour |
| Aurora storage | $0.64 | $0.64 | $0.64 | 6.4 GB-months x $0.10 per GB-month |
| Aurora I/O requests | $1,077 | $1,108 | $1,132 | 5,383 to 5,659 million I/Os x $0.20 per million; estimated: the writer’s write operations in this configuration at 4,000 requests per second, times the ratio of billed I/Os to write operations |
| Secrets Manager secret | $0.40 | $0.40 | $0.40 | 1 secret x $0.40 per secret per month |
| Data transfer out to the internet | $3,484 | $3,484 | $3,484 | 40,384 GB at the tiered rate ($0.09 per GB for the first 10,240 GB, then $0.085 per GB); the same bytes; 95% of them taken as responses (assumed), all sent to the internet, no CDN |
| Subtotal: rest of the stack | $5,046 | $5,078 | $5,101 | |
| Total per month | $12,354 | $13,145 | $9,206 | |
| Difference from A | +6.4% | -25.5% |

The lines under “Rest of the stack” dilute the instance saving: 44% on EC2 and Aurora instances is 25.5% on this bill, because the other lines stay or, in the case of Aurora I/O, rise slightly. Of the $3,147 per month that the right-sized stack saves, $2,823 is Aurora instances and $379 EC2 nodes, while the rest of the bill rises by $55. Most of the saving is the smaller Aurora instances.
The lines outside the instances are equal in every column, except Aurora I/O. The fixed charges are for the same resources. Capacity units and data transfer follow the load balancer’s bytes, which were measured in the baseline’s runs at 8,000 requests per second and applied to every column. The measurements support that for this request mix. The load balancer carried 32.35, 32.30 and 32.32 MB per second in A, B and C at that rate.
Three assumptions carry these lines:
- Data transfer is the largest line outside the instances. It assumes that 95% of the load balancer’s bytes are responses and that every response leaves AWS for the internet with no CDN in front. Neither is measured. The line also leaves out the free allowance of 100 GB per month, worth about $9.
- Aurora I/O is estimated, not read from a bill. CloudWatch publishes Aurora’s billed I/O count as an average over blocks of about an hour, which cannot be assigned to a run. So for each configuration I took the writer’s write operations from Enhanced Monitoring during its three-minute warm-up at 4,000 requests per second. I multiplied them by the ratio of billed I/Os to write operations over the first session’s blocks that hold these configurations’ load, which was 0.88.
- The average request rate scales data transfer and load balancer capacity units in proportion. For I/O the table below uses the write operations measured at 4,000 and at 8,000 requests per second and scales the nearer of the two. A request caused fewer write operations at the higher rate, plausibly because the database batches more writes.
Single blocks of the billed count gave ratios from 0.34 to 2.17 billed I/Os per write operation. The two extremes are blocks without a steady load: one holds the database resize of the right-sizing, the other mostly idle time after the last run. The estimate is rough in other ways too. A warm-up’s measured part is 170 seconds, with 11 or 12 samples. The blocks are read off the series as runs of equal values; AWS does not document them.
Configuration C’s warm-up made 5% more write operations per second than the baseline’s. That is more than the baseline’s own three warm-ups of the first session differ (2%). On this bill it is $55 per month. At 8,000 requests per second, in one run each, the gap was wider: 16% more write operations per request on the same-size stack and 21% more on the right-sized one.
What these assumptions do to the comparison:
| Assumption | A: bill per month | B: bill per month | C: bill per month | B against A | C against A |
|---|---|---|---|---|---|
| As in the bill: an average of 4,000 requests per second | $12,354 | $13,145 | $9,206 | +6.4% | -25.5% |
| An average of 2,000 requests per second | $9,929 | $10,704 | $6,754 | +7.8% | -32.0% |
| An average of 8,000 requests per second | $16,339 | $17,371 | $13,500 | +6.3% | -17.4% |
| An average of 11,800 requests per second: the comparison load around the clock | $20,170 | $21,332 | $17,504 | +5.8% | -13.2% |
| Without the data transfer line | $8,870 | $9,661 | $5,723 | +8.9% | -35.5% |
| Aurora I/O at the lowest ratio of a single block, 0.34 billed I/Os per write operation (in the bill: 0.88) | $11,697 | $12,469 | $8,516 | +6.6% | -27.2% |
| Aurora I/O at the highest ratio of a single block, 2.17 billed I/Os per write operation | $13,932 | $14,770 | $10,866 | +6.0% | -22.0% |
| C on Aurora I/O-Optimized, A and B on Aurora Standard | $12,354 | $13,145 | $9,049 | +6.4% | -26.7% |
The two I/O rows give every configuration the same ratio. If the ratio differed between configurations as much as single blocks differ, the right-sized stack’s bill could be anywhere from 7% to 39% below the baseline’s. That is a scenario with extreme inputs, not a confidence interval, and I have no evidence that the ratio differs. Across the rows of the table, the right-sized stack’s modelled bill is 13% to 35% below the baseline’s. The more traffic the stack serves, the smaller the share of the bill that the instances are.
Not in the bill, and not measured here:
- data transfer between Availability Zones, from the API nodes to the database writer and between web and API pods;
- NAT gateway data processing and public IPv4 addresses;
- Aurora backup storage beyond the free allowance, and the growth of the database;
- monitoring: Enhanced Monitoring at 15 seconds, Performance Insights, CloudWatch logs and metrics;
- the container registry, the delivery pipeline and support;
- the load generators, and the one-time cost of making the change.
Traffic between zones differs when the placement of the API nodes relative to the writer differs, as it did for configuration B.
What does a unit of work cost?
At the assumed average of 4,000 requests per second, the right-sized stack’s modelled bill comes to $0.876 per million requests against the baseline’s $1.175. Per 1,000 requests per second of rated load, the instances cost $275 per month against $614.
| Configuration | Modelled On-Demand bill of the whole stack | Bill per million requests, at an average of 4,000 requests per second | EC2 and Aurora instances, On-Demand | Rated load at 80% CPU utilization | Monthly instance cost per 1,000 requests per second of rated load |
|---|---|---|---|---|---|
| A: Graviton2 baseline | $12,354 per month | $1.18 per million requests | $7,307 per month | about 11,900 requests per second | $614 per month |
| B: Graviton5, same size | $13,145 per month | $1.25 per million requests | $8,067 per month | about 28,400 requests per second | $284 per month |
| C: Graviton5, right-sized | $9,206 per month | $0.88 per million requests | $4,105 per month | about 14,900 requests per second | $275 per month |
The per-million column divides the bill by the HTTP requests of a month at the assumed traffic. The last column divides the instances by the rated load. I do not divide the whole bill by the rated load, because its usage lines are priced for the assumed traffic and would grow with the traffic that used the capacity.
Per unit of rated load, the instances of the two Graviton5 stacks cost about the same, and less than half the baseline’s. That figure alone would mislead: configuration B has nearly the lowest price per unit of rated load and the highest bill, because it buys capacity this load does not use. Size for the load first; compare prices per unit after.
Does Aurora I/O-Optimized change the picture?
Possibly for the right-sized stack. On Aurora Standard, I/O is 26% of what the right-sized stack pays for Aurora in this model, against 15% on the baseline. AWS says that Aurora I/O-Optimized can reduce costs when I/O is 25% or more of the Aurora bill.
At list prices it would lower configuration C’s Aurora cost by $157 per month and raise the baseline’s by $743. That rests on the estimated I/O line, so it is a pointer to compare both price structures on a real bill, not a result. The I/O-Optimized storage price is the one price that is not in the snapshot of 23 November: I read it about 15 hours later, through the AWS Pricing MCP server.
What about Savings Plans and Reserved Instances?
They shrink the right-sized stack’s lead and widen the same-size stack’s premium, for now. With fresh one-year commitments where a rate was returned, the right-sized stack’s modelled bill is 9.1% below the baseline’s instead of 25.5%, because no Reserved Instance rate came back for db.r9g.
The table below prices fresh one-year, no-upfront commitments where the price lookups of 23 November returned one: EC2 Instance Savings Plans for every node type and a Reserved Instance for db.r6g. They returned no Reserved Instance rate for db.r9g, which had been announced for Aurora eleven days earlier, and no Database Savings Plan rate for either class.
| Line item, in US dollars per month | A: Graviton2 baseline | B: Graviton5, same size | C: Graviton5, right-sized | Quantity and unit price |
|---|---|---|---|---|
| Compute and database | ||||
| Web tier nodes | 2 x c6g.4xlarge $500 | 2 x c9g.4xlarge $669 | 2 x c9g.2xlarge $335 | 730 hours; EC2 Instance Savings Plan, 1 year, no upfront |
| API tier nodes | 3 x m6g.xlarge $212 | 3 x m9g.xlarge $283 | 3 x m9g.large $142 | 730 hours; EC2 Instance Savings Plan, 1 year, no upfront |
| System nodes | 2 x m6g.large $71 | 2 x m9g.large $94 | 2 x m9g.large $94 | 730 hours; EC2 Instance Savings Plan, 1 year, no upfront |
| Aurora MySQL writer and reader | 2 x db.r6g.8xlarge $3,973 Reserved Instance | 2 x db.r9g.8xlarge $6,480 On-Demand: no one-year rate was returned | 2 x db.r9g.4xlarge $3,240 On-Demand: no one-year rate was returned | 730 hours; one year, no upfront, where AWS offered it |
| Subtotal: compute and database | $4,755 | $7,527 | $3,811 | |
| Rest of the stack: the same lines and amounts as in the On-Demand bill | $5,046 | $5,078 | $5,101 | Not covered by a commitment |
| Total per month | $9,801 | $12,605 | $8,912 | |
| Difference from A | +28.6% | -9.1% |
On these prices the right-sized stack is 9.1% below the baseline and the same-size stack 28.6% above it, because the baseline’s database is reserved at 34% below On-Demand and the Graviton5 database is priced On-Demand. If db.r9g gets the same Reserved Instance discount, the right-sized stack’s modelled bill would be 20% below the baseline’s; that is a what-if, not a price. The table assumes fresh commitments that are fully used.
The EC2 discount is also smaller on Graviton5: 34% against 37% for the web nodes. And the table says nothing about commitments already held: Reserved Instances and EC2 Instance Savings Plans are tied to an instance family and do not move to the new one. A Compute Savings Plan does move, at a smaller discount: 28% for both web node types in this price snapshot.
What do clients see while the stack is changed?
Under a background load of 4,000 requests per second, a third of the rated load, no probe request failed while the nodes were replaced. Each change had two clusters of failed requests, at its two database failovers. In the longer one the probe got no successful response for 20 seconds in the upgrade and 24 seconds in the right-sizing.
I observed both changes of the first session under that background load. A separate probe sent another 100 requests per second, and I kept its results as per-second counts by outcome.
The upgrade, Graviton2 to Graviton5 at the same size
The upgrade took 34 minutes 44 seconds, and 1,936 of 208,022 probe requests failed, all at the two database failovers. I pushed the upgrade commit, and AWS CodePipeline did the rest:
$ aws codepipeline list-action-executions --pipeline-name graviton-uplift --filter pipelineExecutionId=00000000-0000-0000-0000-000000000002 --query 'reverse(actionExecutionDetails)[].[stageName,actionName,status,startTime,lastUpdateTime]' --output text | sed -E 's/\.[0-9]+\+00:00//g' | column -t
Source Source Succeeded 2026-11-23T17:07:52 2026-11-23T17:07:55
Build BuildAndTest Succeeded 2026-11-23T17:07:55 2026-11-23T17:08:58
Infrastructure Network Succeeded 2026-11-23T17:08:58 2026-11-23T17:09:00
Infrastructure Cluster Succeeded 2026-11-23T17:09:00 2026-11-23T17:24:29
Infrastructure Database Succeeded 2026-11-23T17:24:29 2026-11-23T17:39:57
Platform ClusterAddOns Succeeded 2026-11-23T17:39:58 2026-11-23T17:40:30
Deploy Storefront Succeeded 2026-11-23T17:40:30 2026-11-23T17:41:34
Verify SmokeTest Succeeded 2026-11-23T17:41:34 2026-11-23T17:42:36
Two actions account for almost all of the 34 minutes 44 seconds:
- Node groups, 15 minutes. AWS CloudFormation changed the instance type in three launch templates, and the three managed node group updates overlapped. All replacement nodes were ready within two minutes. The old nodes then left one at a time in each node group.
- Database, 15 minutes. CloudFormation updated the two Aurora instances one after the other, starting with the writer. Amazon RDS moved the writer role away from each instance about 75 seconds after it began to modify it. The first failover therefore went to the second instance, still on Graviton2. That made the second instance the writer when its turn came, so a second failover brought the role back.
$ aws rds describe-events --source-type db-cluster --start-time 2026-11-23T17:07:37Z --end-time 2026-11-23T17:45:47Z --query 'Events[].[Date,Message]' --output text | sed -E 's/\.[0-9]+\+00:00//; s/graviton-uplift-database-//g'
2026-11-23T17:25:55 Started cross AZ failover to DB instance: instance2-xxxxxxxxxxxx
2026-11-23T17:26:05 Completed customer initiated failover to DB instance: instance2-xxxxxxxxxxxx
2026-11-23T17:33:35 Started cross AZ failover to DB instance: instance1-xxxxxxxxxxxx
2026-11-23T17:33:51 Completed customer initiated failover to DB instance: instance1-xxxxxxxxxxxx

What the clients saw comes from the probe. Its times are the seconds in which requests finished, so a request that timed out is counted five seconds after it was sent.
- Node replacement: no failed probe request. While the nodes of all three node groups were replaced, the probe’s mean response time per 10 seconds stayed between 4.8 and 6.7 ms; before the change began it was 6.5 ms. In the inventory samples of that period, taken every 10 seconds, the web tier never had fewer than 24 of its 32 pods ready, and the API tier never fewer than 4 of 6.
- First failover: a short stall. RDS logged it from 17:25:55 to 17:26:05. Between its start and the last failed request, 2 seconds passed in which no probe request finished at all, and in the 7 seconds from 17:26:03 to 17:26:09, 86 of the 687 requests that finished had failed.
- Second failover: an outage. RDS logged it from 17:33:35 to 17:33:51, 16 seconds. The probe recorded no successful response for 20 consecutive seconds, and 1,850 of 2,422 requests failed in 26 seconds. Of those failures, 1,132 finished after RDS had logged the failover as complete.
In total 1,936 of 208,022 probe requests that finished during the pipeline run had failed, 0.93% of them. 1,515 were timeouts, 353 were HTTP 503 responses, and the rest were HTTP 500 and 502.
The background load’s failures are not placed in time as the probe’s are. In its measured window of 3,590 seconds its schedule held 14.36 million requests. It recorded 14.30 million, about 60,000 fewer than scheduled, and 44,104 of those failed (0.31%). I did not keep k6’s counter of dropped requests, so the probe is the measure I use.
Amazon CloudWatch shows the generation change on its own graph. During the upgrade the load balancer received about 4,100 requests per second, the background load plus the probe. Before the first failover the writer averaged 29.6% CPU utilization on a db.r6g.8xlarge. After the second it averaged 10.3% CPU utilization on a db.r9g.8xlarge, a ratio of 2.86.
The graph is CloudWatch’s; the two averages are my arithmetic on its datapoints. Both windows overlap other work, the node replacement before and the reader’s restart after, so the ratio of 2.79 from the 10-minute runs is the better figure.

The right-sizing, Graviton5 at half the size
The right-sizing took 39 minutes 31 seconds from the start of its first pipeline run to the end of its second, and 2,525 of 236,722 probe requests failed, again all at the two database failovers. I pushed its two commits under the same background load and the same probe. The first pipeline run changed only the application’s settings. The second replaced the web and API nodes in 13 minutes and resized the database instances in 15 minutes.

What the probe saw:
- The pod step: no failed probe request, and a dip. Because the pool size changed, every API pod was replaced while their number went from six to three. For about a minute, from 20:11:26 to 20:12:16, the inventory found 2 API pods ready, and Kubernetes recorded that one new pod could not be scheduled at first for lack of CPU. The rollout adds no surge pod, and a pod that is shutting down still holds its CPU request. Allow for such a dip.
- Smaller nodes: no failed probe request. The probe’s mean response time per 10 seconds stayed between 3.2 and 4.3 ms while the nodes were replaced; before the change began it was 3.5 ms. The web tier never had fewer than 12 of its 16 pods ready, and the API tier never fewer than 2 of 3.
- First failover: an outage. RDS logged it from 20:31:18 to 20:31:33. The probe recorded no successful response for 24 consecutive seconds, and 2,128 of 2,360 requests failed over 27 seconds, 1,645 of them after RDS had logged the failover as complete.
- Second failover: a shorter interruption. RDS logged 7 seconds for it. 397 of 1,258 probe requests failed over 13 seconds.
In total 2,525 of 236,722 probe requests that finished between the start of the first pipeline run and the end of the second had failed, 1.07% of them: 1,744 timeouts, 758 HTTP 503 responses, and a few HTTP 502 and 500. All of them are in the two clusters at the failovers. The background load recorded 72,740 failures in 14.31 million requests (0.51%), and about 53,000 fewer requests than its schedule held.
In the upgrade the longer outage came with the second failover, here with the first. In each change it came with the longer logged interval between shutdown and restart of the instance that took over: 13 to 14 seconds against 5 seconds. Those are two pairs of observations, and I tested no mechanism.
Both changes were observed at a third of the rated load, by a probe whose percentiles I kept only for the whole hour.
At the comparison load of 11,800 requests per second the node replacement would not have that room. While nodes were replaced, as few as 4 of the baseline’s 6 API pods and 24 of its 32 web pods were ready. With 4 of 6 API pods, the same traffic at the same CPU time per request would need about 118% of the remaining pods’ CPU limits. With 24 of 32 web pods, each ready pod would have to do the work of about 0.98 vCPU if the load were shared equally, all that a Node.js process can use.
On the right-sized stack the same arithmetic gives about 59% of the remaining pods’ CPU limits with 2 of 3 API pods, and about 0.87 vCPU per ready web pod with 12 of 16. These are projections; I did not observe a change at that load.
The whole move in one change
No load generator ran during this change, neither the background load nor the probe, so it shows how long the whole move takes and nothing about what clients would see. In the second session I went from the Graviton2 baseline straight to the right-sized Graviton5 stack, in the same two steps: the pods first, then every instance type. These are all the lines that changed:
$ git diff -U0 7f86837 5f10eeb -- infra/config deploy/values/active.yaml | grep -E '^(diff|[-+][^-+])'
diff --git a/deploy/values/active.yaml b/deploy/values/active.yaml
-# Graviton2 baseline.
+# Graviton5 right-sized: every tier at half the baseline size.
-stage: a-graviton2-baseline
+stage: c-graviton5-right-sized
- replicas: 32
+ replicas: 16
- replicas: 6
+ replicas: 3
- dbPoolSize: 24
+ dbPoolSize: 48
diff --git a/infra/config/ACTIVE_STAGE b/infra/config/ACTIVE_STAGE
-a-graviton2-baseline
+c-graviton5-right-sized
diff --git a/infra/config/database.json b/infra/config/database.json
- "DBInstanceClass": "db.r6g.8xlarge"
+ "DBInstanceClass": "db.r9g.4xlarge"
diff --git a/infra/config/eks.json b/infra/config/eks.json
- "SystemInstanceType": "m6g.large",
+ "SystemInstanceType": "m9g.large",
- "WebInstanceType": "c6g.4xlarge",
+ "WebInstanceType": "c9g.2xlarge",
- "ApiInstanceType": "m6g.xlarge",
+ "ApiInstanceType": "m9g.large",
The two pipeline runs took 5 minutes 27 seconds and 34 minutes 43 seconds. The second spent 15 minutes on the node groups and 15 minutes on the database, which again failed over twice; Amazon RDS logged 8 and 9 seconds for the two failovers. A third failover after the pipeline had finished was mine: it gave the stack the placement of the baseline’s runs and is not part of the change.
This path is shorter, but its first step halves the pods while the nodes are still Graviton2. At 11,800 requests per second the baseline’s API containers alone used 75% of their CPU limits, so three pods would need about 150%, and 16 web pods would need about 146% of the one vCPU each can use. The one-step change is for a quiet hour or needs temporary capacity; the right-sized stack’s result says nothing about that intermediate state. The path I observed under load is the one in two changes.
Do the results repeat?
Within a deployment, closely. Between deployments and between the two sessions, within a few percent: the largest differences I saw are 6% in the API tier’s CPU time per request and 5% in the baseline’s p99 response time.
Runs of one deployment. The baseline’s three runs at 8,000 requests per second in the first session:
$ uv run -q analysis/summarize.py results/a-graviton2-baseline/a-r1 results/a-graviton2-baseline/a-r2 results/a-graviton2-baseline/a-r3 | awk '/^ (window|unit) / { if (!shown[$1]++) print; next } /^ steady /'
window target achieved errors p50 p95 p99 web API DB web API DB
unit req/s req/s % ms ms ms %vCPU %limit %vCPU ms/req ms/req ms/req
steady 8000 8000.1 0.000 6.1 17.0 26.7 49.8 52.3 56.7 1.990 0.687 2.269
steady 8000 8000.1 0.000 6.1 16.9 26.4 49.4 51.5 56.7 1.974 0.676 2.269
steady 8000 8000.1 0.000 6.1 16.9 26.4 49.2 51.0 56.7 1.968 0.670 2.269
The baseline deployed again, within the first session. At the end of the first session the baseline came back from the same parameter files, on new nodes. One run at 8,000 requests per second differed from the first deployment’s three by at most 3% in response time and 3% in the CPU time per request of the web tier and the database. The API tier spent 6% more CPU time per request; I did not look for the cause. 5 of the 6 compared values lie outside the range of the first deployment’s three runs: deployments differ by more than runs of one deployment do, and every comparison between configurations is a comparison between deployments.
The baseline at 11,800 requests per second, in both sessions. Between them the database cluster was stopped and started, and the nodes and pods are new:
| Measure at 11,800 requests per second | First session (23 to 24 Nov): one run, on 24 Nov, 02:20 to 02:30 UTC | Second session (24 Nov): median of 2 runs (lowest to highest), on 24 Nov, 08:49 to 09:16 UTC | Difference |
|---|---|---|---|
| p50 response time | 7.00 ms | 7.07 ms (7.07 to 7.07 ms) | +1.0% |
| p95 response time | 21.23 ms | 22.09 ms (22.09 to 22.09 ms) | +4.1% |
| p99 response time | 31.66 ms | 33.28 ms (33.28 to 33.28 ms) | +5.1% |
| Web tier: CPU time per request | 1.942 ms | 1.989 ms (1.985 to 1.992 ms) | +2.4% |
| API tier: CPU time per request | 0.706 ms | 0.699 ms (0.697 to 0.700 ms) | -1.1% |
| Database writer: CPU time per request | 2.138 ms | 2.152 ms (2.151 to 2.153 ms) | +0.7% |
| Web tier: CPU utilization | 71.6% | 73.3% (73.2 to 73.5%) | +1.7 percentage points |
| API tier: CPU utilization | 79.4% | 78.5% (78.4 to 78.7%) | -0.9 percentage points |
| Database writer: CPU utilization | 78.8% | 79.4% (79.3 to 79.4%) | +0.5 percentage points |
The right-sized stack at 8,000 requests per second, in both sessions. In the second session it was deployed from the baseline in one change, not from the same-size stack. One API node shared the writer’s zone in both, but in the second session the writer was the other database instance, in the other zone:
| Measure at 8,000 requests per second | First session (23 to 24 Nov): median of 3 runs (lowest to highest), on 23 Nov, 21:59 to 22:44 UTC | Second session (24 Nov): one run, on 24 Nov, 11:13 to 11:23 UTC | Difference |
|---|---|---|---|
| p50 response time | 3.65 ms (3.65 to 3.69 ms) | 3.54 ms | -2.9% |
| p95 response time | 8.81 ms (8.72 to 8.81 ms) | 9.07 ms | +3.1% |
| p99 response time | 11.77 ms (11.65 to 11.77 ms) | 11.77 ms | +0.0% |
| Web tier: CPU time per request | 0.868 ms (0.855 to 0.869 ms) | 0.896 ms | +3.3% |
| API tier: CPU time per request | 0.183 ms (0.183 to 0.184 ms) | 0.175 ms | -4.6% |
| Database writer: CPU time per request | 0.850 ms (0.850 to 0.854 ms) | 0.832 ms | -2.1% |
| Web tier: CPU utilization | 43.4% (42.7 to 43.4%) | 44.8% | +1.4 percentage points |
| API tier: CPU utilization | 28.0% (27.9 to 28.1%) | 26.7% | -1.3 percentage points |
| Database writer: CPU utilization | 42.5% (42.5 to 42.7%) | 41.6% | -0.9 percentage points |
Placement. Amazon EKS spread the three API nodes over two Availability Zones as one and two, and the database writer sits in one of them. The baseline and the right-sized stack had one API node in the writer’s zone; the same-size stack happened to have two.
A check on the baseline, one run per placement, found the other placement 0.12 ms faster at p50 and 0.33 ms at p95. That is small against the differences of about 3 ms and 9 ms between configurations A and B at 8,000 requests per second. It does not isolate what placement contributes: the two runs were 50 minutes apart, and the failover that changed the placement also changed the writer’s instance.
These are observed differences between a few deployments, not a bound on the variation. The gap between the Graviton2 baseline and the same-size Graviton5 stack is far larger than any of them: 55% to 64% less CPU time per request in each tier. Differences of a few percent between the two Graviton5 stacks are within what a repeat can move.
Explore the measurements
The frame below holds the recorded data. Replay either change in 10-second steps, step through the staircase of every configuration, or switch the bill between On-Demand and committed prices.
If the frame does not load, the tables and figures of this post summarize the same data, and the recorded runs are under results/ in the repository.
What went wrong, and what would I change?
Above all the order in which the two database instances were updated, which cost two failovers per change. Next time I would resize the reader first and fail over to it once. Five smaller things follow.
Two failovers where one might do. CloudFormation updated the writer first. In both observed changes Amazon RDS moved the writer role away before it resized the instance, and moved it back when the other instance’s turn came. Every failed probe request of both changes is in a cluster at one of those failovers.
An AWS post on moving Aurora to Graviton2 describes the other order: resize a reader first, fail over to it on purpose, then resize the old writer. That needs the two instances to be changed in separate steps, which my single template parameter does not allow. I did not test it.
In the longer failovers, clients were out for longer than the event log says. Amazon RDS logged 7 to 16 seconds for the four observed failovers. In the two longer ones the probe went 20 and 24 seconds without a single success, and failures kept arriving for 12 and 15 seconds after RDS had logged the failover as complete. This is one API pod’s log during the upgrade’s second failover, counted per second and kind of message:
$ kubectl -n storefront logs storefront-api-5d9977c559-78bj6 --timestamps --since-time=2026-11-23T17:33:15Z # up to 2026-11-23T17:34:45Z, counted per second and kind of message
17:33:38 WARN 23 x ProxyConnection: storefront - Connection com.mysql.cj.jdbc.ConnectionImpl# marked as broken because of SQLSTATE(08S01), Error…
17:33:38 ERROR 22 x [dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request proce…
17:33:38 ERROR 1 x [dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request proce…
17:33:38 WARN 1 x PoolBase: storefront - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl# (No operations allowed after connectio…
17:33:41 ERROR 96 x [dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request proce…
17:33:41 ERROR 9 x [dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request proce…
17:33:42 ERROR 93 x [dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request proce…
17:33:42 ERROR 2 x [dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request proce…
17:33:44 ERROR 100 x [dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request proce…
17:33:44 ERROR 4 x [dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request proce…
... (16 more lines not shown)
The pod logs broken connections, then requests that could not get a connection. The pool’s timeout for that is three seconds. A possible mechanism, which I did not trace: requests wait up to three seconds for a connection while holding a request thread, new requests queue behind them and time out at the client after five seconds, and the health checks queue with them. For the right-sizing I saved the Kubernetes events in time. They show the kubelet’s probes timing out on all three API pods:
$ jq -r '.[] | select(.type == "Warning" and .reason == "Unhealthy" and (.object | contains("storefront-api")) and (.message | contains("deadline"))) | [.at[11:19], (.object | split("-") | last), (.count | tostring) + "x", (.message | sub("Get .http://[^ ]+ "; ""))] | @tsv' results/b-graviton5-same-size/bc-kubernetes-events.json
20:31:40 hkmjt 2x Liveness probe failed: context deadline exceeded (Client.Timeout exceeded while awaiting headers)
20:39:01 skn64 3x Liveness probe failed: context deadline exceeded (Client.Timeout exceeded while awaiting headers)
20:39:05 dhnqd 6x Readiness probe failed: context deadline exceeded (Client.Timeout exceeded while awaiting headers)
20:39:05 dhnqd 3x Liveness probe failed: context deadline exceeded (Client.Timeout exceeded while awaiting headers)
20:39:05 hkmjt 6x Readiness probe failed: context deadline exceeded (Client.Timeout exceeded while awaiting headers)
20:39:06 skn64 7x Readiness probe failed: context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Kubernetes folds repeats of an event into one line, with a count and the time it was last seen, so a line can cover both failovers (20:31 and 20:39).
In both changes the inventory found no API pod marked ready in two samples around the longer failover, and part of the probe’s requests got an HTTP 503. Three changes might shorten such an outage: a health endpoint with its own port and threads, a shorter wait for a connection, and a driver or proxy that follows the failover. None of them is in this application, and I tested none: the same code ran in every configuration. The probe also records HTTP outcomes only. I did not check whether an order that timed out during a failover had been committed.
The placement of the writer was left to chance in the first runs. The right-sized stack’s first deployment happened to have the baseline’s placement, which I checked by hand. From the baseline’s second deployment on, a script checks the placement after every change and fails the writer over if it differs.
CloudFormation rejected a change of instance type and node count in one update. When I resized the API tier during calibration, the node group’s update failed with “Version and release version updates cannot be combined with other updates”. The instance type is in the launch template, and a new template version counts as a version update. I kept the node counts fixed in all three configurations and changed only the instance type.
Aurora’s CloudWatch datapoints are not where their timestamps say. The offset changed from deployment to deployment and after a failover, so the analysis estimates it for each group of runs, as the section on measurement describes.
Aurora’s billed I/O cannot be read per run. It is published in blocks of about an hour. The estimate in the cost section is the workaround.
What are the limits of this study?
It is one synthetic workload in one AWS Region, measured in two sessions, and its bills are models. In detail:
- One workload, one Region, two sessions on two days. The same-size stack was deployed once, the right-sized stack and the baseline twice each, and the baseline’s second deployment was also stopped and started between the sessions. Runs of one deployment show the noise between runs. The repeats differed from their first measurement by a few percent, and nothing bounds that.
- A synthetic workload, fitted to the baseline. The request mix was adjusted until the baseline’s web tier and database were about equally loaded, then frozen. Another mix would stress the tiers differently and could give other ratios. The database read about 1,161 rows per request on average, so the mix leans on scans; a workload of point lookups could show another ratio between the generations.
- The method was not fixed in advance. The ceiling of 80% CPU utilization was added during the first session and the comparison at the rated load after it, as the section on the rule describes. The outcome of the second session was predictable from the first.
- The comparison ran in a fixed order. The baseline’s runs came first and the right-sized stack’s started 63 minutes after they had ended, on the other database instance in the other Availability Zone, without interleaving. Drift over time cannot be separated from the change of configuration.
- Each rated load is an estimate from one 590-second run near the mark. The baseline’s comes from its second deployment, and two more runs in the second session gave the same figure. The right-sized stack’s later runs point to a rating about 4% lower than its ceiling run.
- The same-size stack has no 10-minute run at the comparison load. Its figures there are from one 110-second step at 12,000 requests per second.
- The data fits in memory. The data set is about 5.7 GB, and the buffer cache hit ratio was 100.0% in every measured window of a benchmark run. During the two observed changes it averaged 96.4% to 100.0% per instance over the hour, plausibly because an instance that takes over starts with a cold cache. A month of this traffic would also add several hundred million orders; I deleted each run’s orders.
- One capacity run per configuration, on a fixed grid of steps, each measured for 110 seconds with a single database CPU datapoint. The highest passing step is not a precisely located limit.
- One run with a web node out of service, at 8,000 requests per second, on the right-sized stack only. The node was taken out before the run, without load, so the run shows a degraded state and not a failure as it happens.
- An instance generation, not a processor alone. Memory, network and the rest of the instance change with it. I did not test Graviton3 or Graviton4.
- Each change was observed once, at 4,000 requests per second, by a probe of 100 requests per second whose percentiles I kept only for the whole hour. The one-step change of the second session was not observed under load at all.
- No setting was changed between configurations except the replica counts and the connection pool. Settings that derive from the instance differ: the database’s buffer pool scales with its memory, and the JVM chose SVE on Graviton5.
- Client traffic was plain HTTP. The load balancer listened on HTTP. The API’s connections to Aurora use TLS in every configuration.
- No CPU figure per pod. The web tier’s CPU is measured per node. A Node.js pod runs JavaScript on one thread, so a pod can be full while its node is not, and I did not record CPU per pod.
- Percentiles over all operations together. Per operation they differ widely: in one run of the baseline at the comparison load the p99 response time was 45.4 ms for category pages and 4.0 ms for cart reads. The summaries of the 10-minute runs have the figures per operation (
windows[0].operationsinsummary.json). The staircases do not, so a passing step says nothing about a single operation. A request counts as successful by its HTTP status; the response body is not checked. - Modelled bills. They rest on list prices, an assumed average request rate, an assumed share of responses in the load balancer’s bytes and an estimated I/O line, and they leave out the items listed in the cost section.
How can you reproduce it?
Rebuilding the numbers takes one command and no AWS account. Running the study again takes an AWS account in US West (Oregon), Distributed Load Testing on AWS, and money.
The command rebuilds the tables, the charts, the analysis listings and the results in the repository’s README from the recorded runs:
SKIP_AWS=1 scripts/build-report.sh
The repository is windson/graviton-optimisation, under the MIT license: the application, four CloudFormation templates, the pipeline, the k6 script, the analysis scripts and the results. With SKIP_AWS=1 the build reuses three recorded inputs: the CloudWatch graphs, the usage figures of the first session and the price snapshot. The numbers in this post’s text are filled in from the same result files when the post is built; the post’s own sources are not in the repository.
The results are each run’s summary, merged response time histograms, CloudWatch datapoints and kubelet samples, the probe’s per-second counts, and the recorded listings. k6’s per-request output is not kept; the load test deletes it after reducing it. The repository holds a single commit. The commit hashes in the listings are those of the private repository that my pipeline deployed from, so those git commands cannot be run again; their recorded output is under results/<configuration>/evidence/.
To run the study again you need:
- an AWS account in US West (Oregon), with quota for 32-vCPU Aurora instances and about 220 Fargate vCPUs. The templates, the price snapshot and the bill are written for that Region. Elsewhere you need the C9g and M9g instance families and the Aurora
db.r9gclasses, which are not everywhere yet: on 24 November 2026, of the 18 Regions enabled in my account, Amazon EC2 listed C9g in ten and M9g in twelve. I checkeddb.r9gonly for US West (Oregon); - Distributed Load Testing on AWS deployed there (this study used version 4.3.4 with k6 1.5.0);
uv, the AWS CLI,kubectl,jqandgiton your machine.
The README of the repository has the sequence of commands for a new run, from the bootstrap of the pipeline to the second session, with the things to know before you start. It is a reconstruction, not a script that ran as a whole: I ran the first phases command by command, and the later ones with the scripts under scripts/phases/. A new run costs money: the modelled monthly bills of this post, divided by 730 hours, come to about $13 to $18 per hour for the three configurations, without the load generators.
The comparison rate in scripts/phases/rated-load.sh, 11,800 requests per second, is the rate of the run that rated my baseline. A new baseline needs its own, and the analysis stops if the runs were made at another rate than the baseline’s ceiling run. The container images are built by the pipeline from the Dockerfiles in the repository, on Amazon Corretto 21 and Node.js 24 base images that are not pinned by digest, so a rebuild can differ from the images I measured.
The listings of deployed state and of the changes are recordings: scripts/capture-evidence.sh and its siblings stored each command with its output at the time. The analysis listings are written again by the build, from the recorded runs, and the k6 scenario is an excerpt of the source file. Where a listing is shortened it says so at that place. The API log listing is a reduction of the pod’s log: a count per second and kind of message, without stack traces.
Before the repository was published, the identifiers of my AWS account were replaced by placeholders in the recorded files (tools/redact.py): the account ID, instance IDs, task IDs, execution IDs and the generated suffixes of resource names. The README lists them. Nothing else in a recording was changed.
Verdict: is the move from Graviton2 to Graviton5 worth it?
For this load and at these prices, the right-sized Graviton5 stack lowers the recurring cost and the same-size stack raises it. What the same-size stack’s extra capacity and shorter response times are worth to a service, I did not measure. The answers below are for this workload, in US West (Oregon), at On-Demand prices.
How much faster is Graviton5 than Graviton2?
At the same instance size and 8,000 requests per second, the p99 response time fell from 26.4 ms on Graviton2 to 10.8 ms on Graviton5, and each tier spent 55% to 64% less CPU time per request. The same-size stack’s rated load is 2.39 times the baseline’s.
These figures compare instance generations as a whole, on one request mix. More API nodes shared the database writer’s Availability Zone in the Graviton5 runs, which may add to the gap in response times. I found no AWS figure for Graviton5 against Graviton2.
Is Graviton5 cheaper than Graviton2?
Not at the same size: the same-size upgrade raised the instance cost by 10.4%. Right-sized, the instances cost 43.8% less, and the modelled bill of the listed charges 25.5% less at an average of 4,000 requests per second.
Of the saving on instances, 88% is the two Aurora instances; the Amazon EKS nodes alone cost 30% less. At On-Demand prices the saving on the whole bill moves with the traffic assumed, from 13% at an average of 11,800 requests per second to 32% at 2,000.
With fresh one-year commitments where AWS returned a rate, the instances cost 20% less and the modelled bill 9.1% less, because no Reserved Instance rate came back for db.r9g.
Does a right-sized Graviton5 stack carry the load of the Graviton2 baseline?
Yes, for this synthetic workload, in US West (Oregon).
At the comparison load of 11,800 requests per second, the rate of the run that rated the baseline, the stack with half the vCPUs in its web, API and database tiers ran at 66% CPU utilization in its busiest tier, against 79% on the baseline, with a p99 response time of 15.6 ms against 33.3 ms. Its own rated load is about 14,900 requests per second. Its later runs, scaled further than the rule allows for a rating, point to about 14,400 requests per second.
How disruptive is the change?
At 4,000 requests per second, no probe request failed while the nodes were replaced. Probe requests failed at the two database failovers of each change, and the longer failover left the probe without a successful response for 20 seconds in the upgrade and 24 seconds in the right-sizing.
The upgrade and the right-sizing took about 35 and 40 minutes of elapsed time, or about 41 minutes for both in one change, which I made with no load generator running and which halves the pods while the nodes are still Graviton2. Both failovers of each change came from updating the writer first. Resizing a reader first and failing over to it on purpose might leave one; I did not test that.
When would this not hold?
When one of the conditions behind the capacity or the saving is not met. Six cases:
- The database needs the memory. Halving a memory-optimized class halves its memory. Here the whole data set fit in memory on the smaller class, and the database is where most of the saving is.
- A tier gains too little. With the node count fixed, sizes come in steps of two. If the next smaller size would exceed the CPU ceiling at the rated load, the tier stays at its size, where Graviton5 costs 7% to 28% more in this Region. A workload that is not bound by CPU may gain nothing.
- The peak must survive the loss of a node. Two web nodes that each run above 50% CPU utilization at the peak cannot carry it on one, by arithmetic. That is true of the baseline as well, and it is a question of node count, not of processor.
- You are on Graviton3 or Graviton4. I measured the step from Graviton2 only. A newer baseline probably has less to gain, and I did not test whether it could be halved.
- The traffic is higher than assumed. The saving is on instances; the rest of the bill does not shrink.
- Commitments are already held. Aurora Reserved Instances and EC2 Instance Savings Plans do not move to another instance family.
I did not benchmark another provider, so this post says nothing about one. It measures one option inside AWS, on one workload, under the conditions above.
Migration guide: how do you move your own stack from Graviton2 to Graviton5?
In two changes, each applied through infrastructure as code and tested under load: first Graviton5 at the same sizes, then the smaller sizes that your own measurement supports. The steps follow, then the tool I used for each and where it is in the repository.
How do I right-size for Graviton5?
By working backwards from the load you must carry to the CPU each tier needs on Graviton5, and then testing the result at that load. In eight steps:
- Start from your own peak. Its request mix, the response time limits of your critical endpoints, your database’s working set and the failures you must survive come first. That peak is the load to carry. Use your stack’s rating in its place only if the rating stands for the peak.
- Rate what you have, in a test environment whose data you can discard: a load test writes, and my runner deletes the orders that earlier runs wrote. Find the request rate at which your busiest tier is at 80% CPU utilization. If the stack no longer takes the rate it is offered, or a limit on errors or response time breaks first, stop there: the highest rate that holds your limits is the rating. I rated by each tier’s average; the busiest node gives a more cautious figure.
- Check that the target can run your stack. The AWS Graviton Technical Guide says that Graviton5 does not support the Amazon Linux 2 kernel 4.14, and an Aurora class has to be orderable for your engine version in your Region. My nodes ran Amazon Linux 2023 and my database Aurora MySQL 3.10.
- Upgrade at the same size, at a quiet hour, and measure CPU time per request on Graviton5, tier by tier, for your own code and at representative traffic. Expect the database to fail over. Here each change of the Aurora class failed over twice, with up to 24 seconds without a successful response. Resizing the reader first and failing over to it once might leave one failover; I did not test that.
- Work backwards. The capacity a tier needs, in vCPUs, is the load to carry in requests per second, times the CPU time per request in milliseconds, divided by 1,000 and by the CPU ceiling as a fraction, 0.8 here. Take the smallest size or node count that covers it and still holds your pods and their memory.
- Check the working set before shrinking the database class. If it needs the larger class, the saving is gone: with full-size Graviton5 database instances and every other line of the model unchanged, the right-sized stack’s modelled bill would be $12,446 per month against the baseline’s $12,354, at On-Demand prices and an average of 4,000 requests per second. That is a price scenario; I did not measure such a stack.
- Right-size, pods before instances, and run the result at the load to carry, for longer than my ten minutes, judging your critical endpoints one by one. The run can correct step 5: here the calculation was off for the API tier, in the stack’s favour. Then run it at that load with one node out of service. If that fails, add a node or plan a lower peak.
- Reprice with your own traffic and commitments, not with this model. It knows US West (Oregon), two database instances, this study’s traffic and the rates AWS offers, not the commitments you hold.
Which tools did I use?
An AI coding agent with AWS skills and MCP servers, Distributed Load Testing on AWS for every load, and a pipeline for every change of configuration.
The agent, OpenCode with Claude Fable 5.2 on Amazon Bedrock, wrote the code, ran both sessions and drafted this post under my direction. Other models reviewed the result, GPT-6.2 Astra and Claude Opus 5.5 in the last rounds.
I ran it from the cloud workstation I described in Orca on AWS with Bedrock, with the MCP servers from Supercharge Claude Code with AWS MCP Servers. Step 1 needs your own telemetry: this study had none, which is why it takes the baseline’s rating as the load.
| Step | Tool | In the repository |
|---|---|---|
| 2 and 7: rate a stack, test a size | Distributed Load Testing on AWS 4.3.4 with k6 1.5.0, at a fixed arrival rate. For the run with a node out of service, kubectl cordon and the deletion of the node’s pods | tools/bench.py and loadtest/workload.js for the load, analysis/ceiling.py for the rating, scripts/phases/rated-load.sh for the node |
| 3: check that the target exists | The AWS MCP server for the Regions that offer the EC2 instance types, the AWS CLI for the Availability Zones and for the Aurora classes that can be ordered for an engine version, and the AWS Graviton Technical Guide for kernels and runtimes. Repeat these checks for your own types, zones and engine version | results/evidence/region-availability.json, docs/01-research-notes.md |
| 4 to 6: CPU time per request, the sizes, the working set | The kubelet’s CPU counters on every node, and Amazon CloudWatch for Aurora’s CPU utilization and buffer cache hit ratio | analysis/summarize.py; analysis/rated.py is this study’s calculation, as a worked example |
| 8: prices and the bill | The AWS Price List API, the Savings Plans API and the Amazon RDS offerings API. The AWS Pricing MCP server cross-checked four EC2 prices and supplied the price of Aurora I/O-Optimized storage | analysis/pricing.py, analysis/bom.py, results/evidence/price-cross-check.json |
| Applying a change of configuration | AWS CodePipeline with AWS CodeBuild applies the AWS CloudFormation templates and deploys the application with Helm. During the upgrade and the right-sizing, a background load of 4,000 requests per second and a probe of 100 requests per second ran on Distributed Load Testing on AWS | infra/cfn, infra/stages, scripts/change-stage.sh, tools/timeline.py |
| Skills installed for the agent | Agent Toolkit for AWS skills for Amazon EKS, Aurora MySQL, CloudFormation, deployment, compute, cost and observability. Two of AWS’s agent skills for Graviton, the savings assessment and the Java migration from x86, for reference: neither sizes a move between Graviton generations | scripts/install-agent-tooling.sh, docs/01-research-notes.md |
These tools are written for this study’s stack. Read them as worked examples, not as a kit: the README says what each one assumes.
What is your next best action?
Three things, none of which touches a running system:
- Price your Graviton2 instances on Graviton5, at the same size and one size down, at the rates you pay. At the same size, the types in this study cost 7% to 28% more per instance-hour at On-Demand prices in US West (Oregon).
- Pick one service whose database fits in half the memory. The two Aurora instances were 88% of this study’s saving on instances.
- Collect that service’s peak from your telemetry (step 1): its request rate and mix, its response time limits and the failures it must survive. Every later step is measured against it.
Disclaimer
This post reports one study of one synthetic workload in one AWS Region, measured on 23 and 24 November 2026. Your workload will give other numbers, so measure it before you act on these.
- Prices and bills. The prices are AWS list prices read on 23 and 24 November 2026 and can change. The bills are models, not invoices.
- The cost and the exposure of trying it. Deploying the repository creates AWS resources in your account, and AWS bills you for them until you remove them. Its load balancer is open to the internet over HTTP, without authentication. Removing the stack is manual and untested, and leaves a database snapshot behind: see Stopping the cost in the README.
- No warranty. The code, the data and this text are provided as they are, without warranty of any kind. The repository’s MIT license says so for the code and the data.
- How it was made. An AI coding agent did the hands-on work under my direction, as the migration guide says, and other models reviewed it. Check what matters to you against the recordings in the repository.
- Not an AWS publication. The views are my own, and AWS has not endorsed this post. AWS, Amazon EC2, Amazon EKS, Amazon Aurora and AWS Graviton are trademarks of Amazon.com, Inc. or its affiliates.