updated some eval files.
Browse files- README.md +13 -5
- eval.py +7 -4
- scenarios/07/handcrafted_recommendation.json +16 -16
- scenarios/15/handcrafted_recommendation.json +11 -11
- scenarios/17/handcrafted_recommendation.json +6 -6
- scenarios_summary.jsonl +3 -3
README.md
CHANGED
|
@@ -144,12 +144,20 @@ Each `scenarios/NN/` folder has these files.
|
|
| 144 |
|
| 145 |
### Allowed values
|
| 146 |
|
| 147 |
-
- `finding_type`: `issue_found`, `no_issue_found`, `diagnostic_deferral`
|
| 148 |
-
|
| 149 |
-
- `
|
| 150 |
-
`query_cache_optimization`, `pool_sizing`, `replica_adjustment`,
|
| 151 |
-
`load_balancer_reconfiguration`, `network_topology_change`, `sla_review`,
|
| 152 |
or null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
## Scenario coverage
|
| 155 |
|
|
|
|
| 144 |
|
| 145 |
### Allowed values
|
| 146 |
|
| 147 |
+
- `finding_type`: `issue_found`, `no_issue_found`, `diagnostic_deferral`,
|
| 148 |
+
`insufficient_data`
|
| 149 |
+
- `primary_tier`: `compute`, `database`, `cache`, `network`, `deferred`,
|
|
|
|
|
|
|
| 150 |
or null
|
| 151 |
+
- `secondary_tier`: same set as `primary_tier`
|
| 152 |
+
- `action_category`: `rightsizing`, `scaling_policy_change`,
|
| 153 |
+
`query_cache_optimization`, `cache_capacity_adjustment`, `pool_sizing`,
|
| 154 |
+
`replica_adjustment`, `load_balancer_reconfiguration`,
|
| 155 |
+
`network_topology_change`, `sla_review`, or null
|
| 156 |
+
|
| 157 |
+
The `deferred` tier sentinel is used in diagnostic-deferral scenarios
|
| 158 |
+
where the agent explicitly cannot pick a tier yet (scenarios 15 and 17).
|
| 159 |
+
`insufficient_data` is reserved for future scenarios where the dataset
|
| 160 |
+
is too sparse to support any finding; no current scenario uses it.
|
| 161 |
|
| 162 |
## Scenario coverage
|
| 163 |
|
eval.py
CHANGED
|
@@ -28,12 +28,15 @@ from pathlib import Path
|
|
| 28 |
REQUIRED_FIELDS = ["scenario_id", "finding_type", "specific_change",
|
| 29 |
"primary_tier", "action_category"]
|
| 30 |
|
| 31 |
-
ALLOWED_FINDING_TYPES = {
|
| 32 |
-
|
|
|
|
|
|
|
| 33 |
ALLOWED_ACTION_CATEGORIES = {
|
| 34 |
"rightsizing", "scaling_policy_change", "query_cache_optimization",
|
| 35 |
-
"
|
| 36 |
-
"network_topology_change", "sla_review",
|
|
|
|
| 37 |
}
|
| 38 |
|
| 39 |
|
|
|
|
| 28 |
REQUIRED_FIELDS = ["scenario_id", "finding_type", "specific_change",
|
| 29 |
"primary_tier", "action_category"]
|
| 30 |
|
| 31 |
+
ALLOWED_FINDING_TYPES = {
|
| 32 |
+
"issue_found", "no_issue_found", "diagnostic_deferral", "insufficient_data",
|
| 33 |
+
}
|
| 34 |
+
ALLOWED_TIERS = {"compute", "database", "cache", "network", "deferred", None}
|
| 35 |
ALLOWED_ACTION_CATEGORIES = {
|
| 36 |
"rightsizing", "scaling_policy_change", "query_cache_optimization",
|
| 37 |
+
"cache_capacity_adjustment", "pool_sizing", "replica_adjustment",
|
| 38 |
+
"load_balancer_reconfiguration", "network_topology_change", "sla_review",
|
| 39 |
+
None,
|
| 40 |
}
|
| 41 |
|
| 42 |
|
scenarios/07/handcrafted_recommendation.json
CHANGED
|
@@ -1,56 +1,56 @@
|
|
| 1 |
{
|
| 2 |
"scenario_id": "07",
|
| 3 |
"finding_type": "issue_found",
|
| 4 |
-
"specific_change": "Scale the Redis cache cluster from 3 to 6 cache.r6g.large nodes to relieve memory pressure (currently 88
|
| 5 |
"primary_tier": "cache",
|
| 6 |
"secondary_tier": "database",
|
| 7 |
-
"action_category": "
|
| 8 |
"conclusion": {
|
| 9 |
"finding_type": "issue_found",
|
| 10 |
"primary_tier": "cache",
|
| 11 |
"secondary_tier": "database",
|
| 12 |
-
"action_category": "
|
| 13 |
-
"headline": "Double cache nodes (3
|
| 14 |
},
|
| 15 |
"evidence": {
|
| 16 |
"telemetry_observations": [
|
| 17 |
-
"Cache hit ratio mean is 0.669 (p50 0.70), well below the healthy
|
| 18 |
"Cache memory utilization p95 reaches 94.6%, driving evictions up to 180/sec.",
|
| 19 |
"Application P95 latency p95 is 458ms, breaching the 300ms SLA target.",
|
| 20 |
"DB query P95 latency p95 is 316ms, elevated due to cache-miss overflow.",
|
| 21 |
-
"Compute CPU p95 peaks at ~70%, and memory p95 at ~72%
|
| 22 |
"DB connections p95 reaches 85, elevated but not saturated."
|
| 23 |
],
|
| 24 |
"infrastructure_context": [
|
| 25 |
-
"Cache cluster is 3
|
| 26 |
-
"Compute ASG is 6
|
| 27 |
-
"Database is db.r6g.large primary + 1 replica with 500GB storage
|
| 28 |
],
|
| 29 |
"correlation_observations": [
|
| 30 |
-
"cache_hit_ratio
|
| 31 |
-
"cache_hit_ratio
|
| 32 |
-
"cache_hit_ratio
|
| 33 |
]
|
| 34 |
},
|
| 35 |
-
"reasoning": "The three cross-tier correlations (all |r| > 0.92, zero lag) establish that the cache tier is the root cause: when cache_hit_ratio drops, database query latency and application latency spike in lockstep. The cache is memory-saturated at 95% with evictions reaching 180/sec, which explains the low hit ratio. The top three key patterns (rec:user:*, rec:trending:*, rec:similar:*) collectively account for 6.7M misses out of ~22.1M total accesses (~30% miss rate), confirming that targeted warming and key redesign on these patterns will yield the largest hit-ratio recovery. Scaling compute or database would only mask symptoms
|
| 36 |
"projected_state": {
|
| 37 |
"cpu_p95_pct_estimate": "58-65",
|
| 38 |
"memory_p95_pct_estimate": "62-70",
|
| 39 |
"latency_p95_ms_estimate": "200-260",
|
| 40 |
"sla_availability_preserved": true,
|
| 41 |
-
"notes": "Based on before/after evidence: cache_hit_ratio expected to rise from 0.65
|
| 42 |
},
|
| 43 |
"cost_impact": {
|
| 44 |
"current_monthly_usd": 5800.0,
|
| 45 |
"projected_monthly_usd": 6500.0,
|
| 46 |
"savings_monthly_usd": -700.0,
|
| 47 |
"savings_pct": -12.07,
|
| 48 |
-
"notes": "Cache tier doubles from $700 to ~$1,400/month (3
|
| 49 |
},
|
| 50 |
"risk_assessment": {
|
| 51 |
"primary_risk": "Doubling cache nodes without proper key distribution could create hot-shard imbalance if the rec:user:* pattern has skewed cardinality, leaving some new nodes underutilized while others remain saturated.",
|
| 52 |
"mitigation": "Deploy the key redesign (sharded prefixes) before or simultaneously with the node expansion. Monitor per-node memory utilization and eviction rates for 48 hours post-change; alert if any single node exceeds 80% memory or if hit ratio does not reach 0.85 within 24 hours.",
|
| 53 |
"rollback": "Revert the ElastiCache cluster to 3 nodes via Terraform (num_cache_nodes = 3). Cache warming logic can be disabled via feature flag. Key redesign rollback requires a coordinated deploy with application code revert and a brief cache flush.",
|
| 54 |
-
"notes": "Consider a phased rollout: first add nodes (3
|
| 55 |
}
|
| 56 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"scenario_id": "07",
|
| 3 |
"finding_type": "issue_found",
|
| 4 |
+
"specific_change": "Scale the Redis cache cluster from 3 to 6 cache.r6g.large nodes to relieve memory pressure (currently 88–95% used) and reduce evictions. Implement cache warming logic targeting the three hottest key patterns—rec:user:* (27% miss rate), rec:trending:* (30% miss rate), and rec:similar:* (38% miss rate)—and redesign these keys with shorter, sharded prefixes (e.g., rec:u:{shard}:{user_id}) to distribute load evenly across the expanded cluster. This doubles cache-tier cost from $700 to ~$1,400/month but is expected to restore the hit ratio above 0.89, drop db_query_p95 by ~38%, and bring application P95 latency back under the 300ms SLA threshold.",
|
| 5 |
"primary_tier": "cache",
|
| 6 |
"secondary_tier": "database",
|
| 7 |
+
"action_category": "cache_capacity_adjustment",
|
| 8 |
"conclusion": {
|
| 9 |
"finding_type": "issue_found",
|
| 10 |
"primary_tier": "cache",
|
| 11 |
"secondary_tier": "database",
|
| 12 |
+
"action_category": "cache_capacity_adjustment",
|
| 13 |
+
"headline": "Double cache nodes (3→6) and warm top-3 keys to fix SLA-breaching latency"
|
| 14 |
},
|
| 15 |
"evidence": {
|
| 16 |
"telemetry_observations": [
|
| 17 |
+
"Cache hit ratio mean is 0.669 (p50 0.70), well below the healthy ≥0.89 band.",
|
| 18 |
"Cache memory utilization p95 reaches 94.6%, driving evictions up to 180/sec.",
|
| 19 |
"Application P95 latency p95 is 458ms, breaching the 300ms SLA target.",
|
| 20 |
"DB query P95 latency p95 is 316ms, elevated due to cache-miss overflow.",
|
| 21 |
+
"Compute CPU p95 peaks at ~70%, and memory p95 at ~72%—both within healthy range.",
|
| 22 |
"DB connections p95 reaches 85, elevated but not saturated."
|
| 23 |
],
|
| 24 |
"infrastructure_context": [
|
| 25 |
+
"Cache cluster is 3× cache.r6g.large nodes with default TTL of 3600s and no warming.",
|
| 26 |
+
"Compute ASG is 6× m5.large (min 6, max 10) with target-tracking—correctly sized.",
|
| 27 |
+
"Database is db.r6g.large primary + 1 replica with 500GB storage—adequate capacity."
|
| 28 |
],
|
| 29 |
"correlation_observations": [
|
| 30 |
+
"cache_hit_ratio ↔ db_query_p95_latency_ms: Pearson r = −0.961, lag 0 min—near-perfect inverse.",
|
| 31 |
+
"cache_hit_ratio ↔ application_p95_latency_ms: Pearson r = −0.963, lag 0 min—cache misses directly drive app latency.",
|
| 32 |
+
"cache_hit_ratio ↔ db_cache_hit_ratio: Pearson r = 0.924, lag 0 min—cache misses cascade into DB buffer pool pressure."
|
| 33 |
]
|
| 34 |
},
|
| 35 |
+
"reasoning": "The three cross-tier correlations (all |r| > 0.92, zero lag) establish that the cache tier is the root cause: when cache_hit_ratio drops, database query latency and application latency spike in lockstep. The cache is memory-saturated at 95% with evictions reaching 180/sec, which explains the low hit ratio. The top three key patterns (rec:user:*, rec:trending:*, rec:similar:*) collectively account for 6.7M misses out of ~22.1M total accesses (~30% miss rate), confirming that targeted warming and key redesign on these patterns will yield the largest hit-ratio recovery. Scaling compute or database would only mask symptoms—the correlations prove the fix must be in the cache layer.",
|
| 36 |
"projected_state": {
|
| 37 |
"cpu_p95_pct_estimate": "58-65",
|
| 38 |
"memory_p95_pct_estimate": "62-70",
|
| 39 |
"latency_p95_ms_estimate": "200-260",
|
| 40 |
"sla_availability_preserved": true,
|
| 41 |
+
"notes": "Based on before/after evidence: cache_hit_ratio expected to rise from 0.65→0.91, db_query_p95 to drop ~38%, app P95 to return to 200–260ms band. Compute and DB tiers remain unchanged and within healthy headroom."
|
| 42 |
},
|
| 43 |
"cost_impact": {
|
| 44 |
"current_monthly_usd": 5800.0,
|
| 45 |
"projected_monthly_usd": 6500.0,
|
| 46 |
"savings_monthly_usd": -700.0,
|
| 47 |
"savings_pct": -12.07,
|
| 48 |
+
"notes": "Cache tier doubles from $700 to ~$1,400/month (3→6 cache.r6g.large nodes). Total rises from $5,800 to ~$6,500. This is a cost increase, not a saving, but it resolves an active SLA breach (P95 at 458ms vs 300ms target). Without the fix, SLA penalties and downstream scaling of DB/compute would cost significantly more. Compute ($3,200) and database ($1,900) tiers remain unchanged."
|
| 49 |
},
|
| 50 |
"risk_assessment": {
|
| 51 |
"primary_risk": "Doubling cache nodes without proper key distribution could create hot-shard imbalance if the rec:user:* pattern has skewed cardinality, leaving some new nodes underutilized while others remain saturated.",
|
| 52 |
"mitigation": "Deploy the key redesign (sharded prefixes) before or simultaneously with the node expansion. Monitor per-node memory utilization and eviction rates for 48 hours post-change; alert if any single node exceeds 80% memory or if hit ratio does not reach 0.85 within 24 hours.",
|
| 53 |
"rollback": "Revert the ElastiCache cluster to 3 nodes via Terraform (num_cache_nodes = 3). Cache warming logic can be disabled via feature flag. Key redesign rollback requires a coordinated deploy with application code revert and a brief cache flush.",
|
| 54 |
+
"notes": "Consider a phased rollout: first add nodes (3→6), then deploy warming, then roll out key redesign. This isolates the impact of each change and simplifies diagnosis if metrics don't improve as expected."
|
| 55 |
}
|
| 56 |
}
|
scenarios/15/handcrafted_recommendation.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
| 1 |
{
|
| 2 |
"scenario_id": "15",
|
| 3 |
"finding_type": "diagnostic_deferral",
|
| 4 |
-
"specific_change": "Before making any rightsizing changes, confirm with the business whether the 99.99% availability SLA target is contractually required or aspirational. The current infrastructure is heavily over-provisioned (CPU p95 at 34%, memory p95 at 42%, DB connections p95 at 60) to achieve near-zero error rates and comfortable latency headroom. If the business confirms 99.95% is acceptable, right-size compute from m5.xlarge
|
| 5 |
-
"primary_tier": "
|
| 6 |
-
"secondary_tier": "
|
| 7 |
"action_category": null,
|
| 8 |
"conclusion": {
|
| 9 |
"finding_type": "diagnostic_deferral",
|
| 10 |
-
"primary_tier": "
|
| 11 |
-
"secondary_tier": "
|
| 12 |
"action_category": null,
|
| 13 |
-
"headline": "Resolve SLA target (99.99% vs 99.95%) before rightsizing
|
| 14 |
},
|
| 15 |
"evidence": {
|
| 16 |
"telemetry_observations": [
|
| 17 |
-
"Compute CPU p95 is only 34% across 16 m5.xlarge instances
|
| 18 |
"Memory p95 peaks at 42%, well below saturation thresholds.",
|
| 19 |
"Application p95 latency is 142.3ms, comfortably under the 200ms SLA target.",
|
| 20 |
"Database query p95 latency is 67.5ms with cache hit ratio consistently at 98%.",
|
| 21 |
"DB connections p95 is 60 out of a much larger pool capacity on db.r6g.2xlarge.",
|
| 22 |
-
"Network error rate is 0.0% across the entire 14-day window
|
| 23 |
"DB I/O wait p95 is only 3.8ms, indicating no storage bottleneck."
|
| 24 |
],
|
| 25 |
"infrastructure_context": [
|
| 26 |
-
"16
|
| 27 |
"db.r6g.2xlarge primary + 3 read replicas (Terraform shows 2 replicas, metadata says 3) across AZs.",
|
| 28 |
-
"ALB using least_outstanding_requests algorithm
|
| 29 |
"Multi-AZ deployment with PrivateLink, consistent with high-availability posture.",
|
| 30 |
"Total monthly cost is $18,200 ($9,600 compute, $6,400 database, $2,200 network)."
|
| 31 |
],
|
| 32 |
"correlation_observations": []
|
| 33 |
},
|
| 34 |
-
"reasoning": "All telemetry metrics show substantial headroom: CPU never exceeds 35%, memory stays below 42%, latency is well within SLA, and the error rate is literally zero. This pattern is consistent with deliberate over-provisioning for a 99.99% availability target on a tier-1 payment platform. However, the technical waste (~45% savings potential) is only actionable if the business confirms that 99.95% availability is acceptable. For a payment-processing system, the difference between 99.99% and 99.95% translates to ~4.3 minutes vs ~21.6 minutes of allowable downtime per month
|
| 35 |
"projected_state": null,
|
| 36 |
"cost_impact": null,
|
| 37 |
"risk_assessment": null
|
|
|
|
| 1 |
{
|
| 2 |
"scenario_id": "15",
|
| 3 |
"finding_type": "diagnostic_deferral",
|
| 4 |
+
"specific_change": "Before making any rightsizing changes, confirm with the business whether the 99.99% availability SLA target is contractually required or aspirational. The current infrastructure is heavily over-provisioned (CPU p95 at 34%, memory p95 at 42%, DB connections p95 at 60) to achieve near-zero error rates and comfortable latency headroom. If the business confirms 99.95% is acceptable, right-size compute from m5.xlarge × 16 to m5.large × 10, reduce database replicas from 3 to 2, and downsize the primary to db.r6g.xlarge — yielding ~$8,200/month savings. If 99.99% is contractually mandated, the current posture is defensible and should be preserved. Monitor the following before recommending a change: (1) contractual SLA obligations and penalty clauses, (2) peak traffic patterns beyond this 14-day window (e.g., month-end payment surges), and (3) disaster recovery requirements that may justify the third replica.",
|
| 5 |
+
"primary_tier": "deferred",
|
| 6 |
+
"secondary_tier": "deferred",
|
| 7 |
"action_category": null,
|
| 8 |
"conclusion": {
|
| 9 |
"finding_type": "diagnostic_deferral",
|
| 10 |
+
"primary_tier": "deferred",
|
| 11 |
+
"secondary_tier": "deferred",
|
| 12 |
"action_category": null,
|
| 13 |
+
"headline": "Resolve SLA target (99.99% vs 99.95%) before rightsizing — $8.2K/mo at stake"
|
| 14 |
},
|
| 15 |
"evidence": {
|
| 16 |
"telemetry_observations": [
|
| 17 |
+
"Compute CPU p95 is only 34% across 16 m5.xlarge instances — significant headroom.",
|
| 18 |
"Memory p95 peaks at 42%, well below saturation thresholds.",
|
| 19 |
"Application p95 latency is 142.3ms, comfortably under the 200ms SLA target.",
|
| 20 |
"Database query p95 latency is 67.5ms with cache hit ratio consistently at 98%.",
|
| 21 |
"DB connections p95 is 60 out of a much larger pool capacity on db.r6g.2xlarge.",
|
| 22 |
+
"Network error rate is 0.0% across the entire 14-day window — zero observed errors.",
|
| 23 |
"DB I/O wait p95 is only 3.8ms, indicating no storage bottleneck."
|
| 24 |
],
|
| 25 |
"infrastructure_context": [
|
| 26 |
+
"16 × m5.xlarge compute instances with no auto-scaling policy configured.",
|
| 27 |
"db.r6g.2xlarge primary + 3 read replicas (Terraform shows 2 replicas, metadata says 3) across AZs.",
|
| 28 |
+
"ALB using least_outstanding_requests algorithm — appropriate for even distribution.",
|
| 29 |
"Multi-AZ deployment with PrivateLink, consistent with high-availability posture.",
|
| 30 |
"Total monthly cost is $18,200 ($9,600 compute, $6,400 database, $2,200 network)."
|
| 31 |
],
|
| 32 |
"correlation_observations": []
|
| 33 |
},
|
| 34 |
+
"reasoning": "All telemetry metrics show substantial headroom: CPU never exceeds 35%, memory stays below 42%, latency is well within SLA, and the error rate is literally zero. This pattern is consistent with deliberate over-provisioning for a 99.99% availability target on a tier-1 payment platform. However, the technical waste (~45% savings potential) is only actionable if the business confirms that 99.95% availability is acceptable. For a payment-processing system, the difference between 99.99% and 99.95% translates to ~4.3 minutes vs ~21.6 minutes of allowable downtime per month — a distinction that may carry contractual penalties. The correct first action is therefore a business-context question, not a technical change.",
|
| 35 |
"projected_state": null,
|
| 36 |
"cost_impact": null,
|
| 37 |
"risk_assessment": null
|
scenarios/17/handcrafted_recommendation.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
| 2 |
"scenario_id": "17",
|
| 3 |
"finding_type": "diagnostic_deferral",
|
| 4 |
"specific_change": "Defer any scaling, rightsizing, or infrastructure changes until a full end-to-end distributed trace analysis is deployed and analyzed across the compute, database, and network tiers. The simultaneous latency rise across all three tiers with zero lead-lag (Pearson coefficients 0.963 and 0.975 at lag 0 minutes) indicates a shared upstream or external root cause that current telemetry cannot isolate. Candidate root causes include: (1) a downstream provider or external API dependency introducing latency during business hours, (2) a shared message queue or coordination service creating backpressure across all tiers, (3) network-level contention at the VPC peering or NAT gateway layer, or (4) coordination overhead from a distributed lock or serialization point. Instrument OpenTelemetry or X-Ray distributed tracing across all request paths, capture trace spans for at least 5 weekday business-hour peaks, and correlate with any external dependency call latencies before recommending targeted intervention.",
|
| 5 |
-
"primary_tier": "
|
| 6 |
-
"secondary_tier": "
|
| 7 |
"action_category": null,
|
| 8 |
"conclusion": {
|
| 9 |
"finding_type": "diagnostic_deferral",
|
| 10 |
-
"primary_tier": "
|
| 11 |
-
"secondary_tier": "
|
| 12 |
"action_category": null,
|
| 13 |
"headline": "Defer action: simultaneous cross-tier latency spikes need distributed tracing to isolate root cause"
|
| 14 |
},
|
|
@@ -17,12 +17,12 @@
|
|
| 17 |
"Application P95 latency reaches 504ms (p95) and 555.8ms (max), breaching the 400ms SLA target.",
|
| 18 |
"DB query P95 latency spikes to 514.3ms (p95) and 528.6ms (max) from a 60.3ms minimum.",
|
| 19 |
"Network P95 latency reaches 269.6ms (p95) and 278.3ms (max), a ~7x increase over the 40ms minimum.",
|
| 20 |
-
"Compute CPU P95 peaks at 68% max
|
| 21 |
"DB connections P95 max is 80, and cache hit ratio stays 0.94-0.98, indicating no connection or cache pressure.",
|
| 22 |
"Network error rate remains low at 0.2-0.8%, not indicative of infrastructure failure."
|
| 23 |
],
|
| 24 |
"infrastructure_context": [
|
| 25 |
-
"ASG is configured with min=10, max=14 m5.large instances using step scaling
|
| 26 |
"Single db.r6g.xlarge primary with no read replicas; 500GB storage with encryption enabled.",
|
| 27 |
"ALB uses round_robin algorithm across two subnets with basic HTTP listener on port 80.",
|
| 28 |
"No cache tier is deployed; no external dependency monitoring or tracing infrastructure is defined in Terraform."
|
|
|
|
| 2 |
"scenario_id": "17",
|
| 3 |
"finding_type": "diagnostic_deferral",
|
| 4 |
"specific_change": "Defer any scaling, rightsizing, or infrastructure changes until a full end-to-end distributed trace analysis is deployed and analyzed across the compute, database, and network tiers. The simultaneous latency rise across all three tiers with zero lead-lag (Pearson coefficients 0.963 and 0.975 at lag 0 minutes) indicates a shared upstream or external root cause that current telemetry cannot isolate. Candidate root causes include: (1) a downstream provider or external API dependency introducing latency during business hours, (2) a shared message queue or coordination service creating backpressure across all tiers, (3) network-level contention at the VPC peering or NAT gateway layer, or (4) coordination overhead from a distributed lock or serialization point. Instrument OpenTelemetry or X-Ray distributed tracing across all request paths, capture trace spans for at least 5 weekday business-hour peaks, and correlate with any external dependency call latencies before recommending targeted intervention.",
|
| 5 |
+
"primary_tier": "deferred",
|
| 6 |
+
"secondary_tier": "deferred",
|
| 7 |
"action_category": null,
|
| 8 |
"conclusion": {
|
| 9 |
"finding_type": "diagnostic_deferral",
|
| 10 |
+
"primary_tier": "deferred",
|
| 11 |
+
"secondary_tier": "deferred",
|
| 12 |
"action_category": null,
|
| 13 |
"headline": "Defer action: simultaneous cross-tier latency spikes need distributed tracing to isolate root cause"
|
| 14 |
},
|
|
|
|
| 17 |
"Application P95 latency reaches 504ms (p95) and 555.8ms (max), breaching the 400ms SLA target.",
|
| 18 |
"DB query P95 latency spikes to 514.3ms (p95) and 528.6ms (max) from a 60.3ms minimum.",
|
| 19 |
"Network P95 latency reaches 269.6ms (p95) and 278.3ms (max), a ~7x increase over the 40ms minimum.",
|
| 20 |
+
"Compute CPU P95 peaks at 68% max — well within capacity, ruling out CPU saturation.",
|
| 21 |
"DB connections P95 max is 80, and cache hit ratio stays 0.94-0.98, indicating no connection or cache pressure.",
|
| 22 |
"Network error rate remains low at 0.2-0.8%, not indicative of infrastructure failure."
|
| 23 |
],
|
| 24 |
"infrastructure_context": [
|
| 25 |
+
"ASG is configured with min=10, max=14 m5.large instances using step scaling — headroom exists but is not being triggered.",
|
| 26 |
"Single db.r6g.xlarge primary with no read replicas; 500GB storage with encryption enabled.",
|
| 27 |
"ALB uses round_robin algorithm across two subnets with basic HTTP listener on port 80.",
|
| 28 |
"No cache tier is deployed; no external dependency monitoring or tracing infrastructure is defined in Terraform."
|
scenarios_summary.jsonl
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
{"scenario_id": "04", "scenario_name": "Database Connection Bottleneck", "scenario_type": "single_tier_negative", "what_this_demonstrates": "A database under pressure from both a slow-query problem and a connection pool that's exhausted during business hours. Symptoms: connection counts push above pool limits during business hours, db_query_p95_latency_ms spikes during the same windows.", "finding_type": "issue_found", "primary_tier": "database", "secondary_tier": null, "action_category": "query_cache_optimization", "specific_change": "Optimize the top 5 slowest queries: (1) add index on users(email) for the email-lookup query (820ms p95), (2) add index on sessions(token, expires_at) for the session-token query (640ms p95), (3) add composite index on profiles(user_id) and ensure covering columns for the users-profiles join query (510ms p95), (4) add composite index on audit_log(created_at, user_id) for the audit-log join query (480ms p95), (5) materialize or cache the recursive permissions CTE query (410ms p95). Increase the connection pool from 100 to 200 to eliminate pool exhaustion during business hours (weekdays 09:00–18:00 UTC). Add 2 read replicas (db.r6g.large) with read/write splitting to offload the high-volume read queries (sessions at 7.4M calls, users-by-email at 4.7M calls).", "savings_monthly_usd": -2300.0, "current_monthly_usd": 2100.0, "projected_monthly_usd": 4400.0, "sla_availability_preserved": true}
|
| 5 |
{"scenario_id": "05", "scenario_name": "Load Balancer Inefficiency", "scenario_type": "single_tier_negative", "what_this_demonstrates": "A fleet behind an Application Load Balancer using round-robin distribution. Cluster-level aggregates show a wide p50-to-p95 spread because some instances are persistently overloaded while others are persistently idle. The fix is a load-balancing algorithm change, not a capacity change.", "finding_type": "issue_found", "primary_tier": "network", "secondary_tier": "compute", "action_category": "load_balancer_reconfiguration", "specific_change": "Reconfigure the ALB target group (app05-tg) load-balancing algorithm from round_robin to least_outstanding_requests. No capacity change is needed — the existing 8 × c5.xlarge fleet is sufficient. In Terraform, set `load_balancing_algorithm_type = \"least_outstanding_requests\"` on the `aws_lb_target_group.main` resource.", "savings_monthly_usd": 0.0, "current_monthly_usd": 3800.0, "projected_monthly_usd": 3800.0, "sla_availability_preserved": true}
|
| 6 |
{"scenario_id": "06", "scenario_name": "Healthy Application", "scenario_type": "healthy", "what_this_demonstrates": "An application where every tier is correctly sized, all metrics stay in healthy bands across all 14 days, no SLA pressure, no patterns of concern. The correct recommendation is no action.", "finding_type": "no_issue_found", "primary_tier": null, "secondary_tier": null, "action_category": null, "specific_change": "No changes recommended. Each tier was evaluated against its healthy operating bands and SLA targets (99.5% availability, P95 < 500ms). Compute CPU p95 peaks at 78% with comfortable headroom, memory stays under 72%, application P95 latency at 194.6ms max is well within the 500ms target. Database query P95 latency maxes at 113.4ms with a strong cache hit ratio (≥0.92). Redis cache hit ratio holds at 88-96% with memory usage peaking at 73.8%. Network error rate never exceeds 1%. No cross-tier correlations were flagged. Rightsizing, replica adjustment, and scaling policy changes were all considered and ruled out as the current configuration is well-balanced for cost, performance, and reliability.", "savings_monthly_usd": null, "current_monthly_usd": null, "projected_monthly_usd": null, "sla_availability_preserved": null}
|
| 7 |
-
{"scenario_id": "07", "scenario_name": "Cache Miss Cascade", "scenario_type": "cross_tier_negative", "what_this_demonstrates": "A cache tier that degrades (hit ratio drops below the healthy band) cascades into elevated database load and elevated application latency, even though the database and compute tiers themselves are correctly sized. The fix is in the cache layer, not in the downstream tiers — a sophisticated recommender must see past the symptoms to the cause.", "finding_type": "issue_found", "primary_tier": "cache", "secondary_tier": "database", "action_category": "
|
| 8 |
{"scenario_id": "08", "scenario_name": "Database Bottleneck Impact", "scenario_type": "cross_tier_negative", "what_this_demonstrates": "A database with slow queries during business hours that cascade into elevated application latency on the compute tier. Compute itself is correctly sized; the problem is downstream.", "finding_type": "issue_found", "primary_tier": "database", "secondary_tier": "compute", "action_category": "query_cache_optimization", "specific_change": "Optimize the top 6 slowest SQL queries and add 2 read replicas with read/write splitting. Specifically: (1) Add a composite index (user_id, id) on carts and (cart_id) on cart_items for the carts-by-user query (p95 820ms, 6.05M calls); (2) Add a composite index (warehouse_id, product_id) on inventory for the inventory-warehouse query (p95 680ms, 3.53M calls); (3) Add a composite index (product_id, region, valid_from, valid_to, priority) on pricing for the pricing-lookup query (p95 580ms, 4.03M calls); (4) Add an index (country, is_active, priority) on payment_providers for the payment-provider query (p95 440ms, 1.34M calls); (5) Add a composite index (user_id, created_at DESC) on orders and (order_id) on order_items for the orders-by-user query (p95 510ms, 504K calls); (6) Add an index (order_id, status) on fulfillment for the fulfillment-status query (p95 380ms, 672K calls). Provision 2 read replicas (db.r6g.xlarge) and enable R/W splitting to route all SELECT traffic to replicas. Do NOT scale compute — the ASG at 8× m5.large is correctly sized.", "savings_monthly_usd": -2400.0, "current_monthly_usd": 6400.0, "projected_monthly_usd": 8800.0, "sla_availability_preserved": true}
|
| 9 |
{"scenario_id": "09", "scenario_name": "Peak Hours Cost vs Reliability", "scenario_type": "cross_tier_negative", "what_this_demonstrates": "A high-criticality e-commerce platform with a clear bimodal weekday pattern: heavy use during peak hours, very light use off-peak and on weekends. Currently provisioned at peak capacity 24/7. Scheduled scaling would dramatically reduce off-peak cost without affecting peak SLA.", "finding_type": "issue_found", "primary_tier": "compute", "secondary_tier": "database", "action_category": "scaling_policy_change", "specific_change": "Replace the fixed 20× m5.xlarge compute fleet with scheduled Auto Scaling: maintain 20 instances during peak windows (weekdays 09:00–11:00 UTC and 14:00–16:00 UTC), scale down to 7 instances (65% reduction) during off-peak hours (weekdays 16:00–09:00 UTC and all day weekends 00:00–23:59 UTC). Similarly, stop one database replica during off-peak/weekend windows and restart it before peak. This preserves full peak capacity for the 99.99% SLA while reducing monthly spend from $18,400 to approximately $8,000, saving ~$10,400/month (56%).", "savings_monthly_usd": 10400.0, "current_monthly_usd": 18400.0, "projected_monthly_usd": 8000.0, "sla_availability_preserved": true}
|
| 10 |
{"scenario_id": "10", "scenario_name": "Network Latency Impact", "scenario_type": "cross_tier_negative", "what_this_demonstrates": "A payment service whose external-provider integration uses basic cross-region VPC peering. Network latency to the provider spikes during business hours, cascading into elevated compute-tier application latency. Compute itself is correctly sized; the bottleneck is at the network boundary.", "finding_type": "issue_found", "primary_tier": "network", "secondary_tier": "compute", "action_category": "network_topology_change", "specific_change": "Replace basic VPC peering for the payment-provider integration with AWS PrivateLink to eliminate cross-region latency spikes during business hours (weekdays 09:00–18:00 UTC). Add application-level retries with exponential backoff (initial 100ms, max 3 retries, 2× multiplier, jitter) to the payment-provider client. Do not scale compute — CPU and memory are correctly sized; the bottleneck is at the network boundary, not the compute tier.", "savings_monthly_usd": -150.0, "current_monthly_usd": 4100.0, "projected_monthly_usd": 4250.0, "sla_availability_preserved": true}
|
|
@@ -12,7 +12,7 @@
|
|
| 12 |
{"scenario_id": "12", "scenario_name": "Healthy Compute, Problematic Database", "scenario_type": "mixed", "what_this_demonstrates": "A user profile service where compute is correctly sized and operating in healthy ranges, but the database is significantly over-provisioned and operating at very low utilization. The right action is downsize the database only — compute and read replicas should not change.", "finding_type": "issue_found", "primary_tier": "database", "secondary_tier": null, "action_category": "rightsizing", "specific_change": "Downsize the RDS primary instance from db.r6g.2xlarge to db.r6g.large. Leave compute tier (m5.large × 6 with target-tracking ASG min=6/max=10) completely unchanged — compute is correctly sized and operating in healthy ranges. Update the Terraform aws_db_instance.database_primary instance_class from \"db.r6g.2xlarge\" to \"db.r6g.large\". This yields approximately $1,400/month in savings while preserving the 99.9% SLA.", "savings_monthly_usd": 1400.0, "current_monthly_usd": 7200.0, "projected_monthly_usd": 5800.0, "sla_availability_preserved": true}
|
| 13 |
{"scenario_id": "13", "scenario_name": "Compute Spike + Database Strain", "scenario_type": "cross_tier_negative", "what_this_demonstrates": "A search service where weekday peak-hour compute spikes drive database connection counts roughly 3x above baseline, exhausting the connection pool. Both tiers need attention: compute needs predictive scaling, database needs replicas and a larger pool.", "finding_type": "issue_found", "primary_tier": "compute", "secondary_tier": "database", "action_category": "scaling_policy_change", "specific_change": "Replace step scaling with predictive auto-scaling on the compute ASG (trigger scale-out at cpu_p95 > 65%, raise max_size from 12 to 14), add 2 read replicas (db.r6g.xlarge) with read/write splitting to the database tier, and increase the connection pool from 150 to 300. Schedule predictive scaling to pre-warm capacity 15 minutes before weekday spike windows (approximately 09:00–12:00 UTC and 14:00–17:00 UTC based on the observed correlation lag).", "savings_monthly_usd": -3000.0, "current_monthly_usd": 7800.0, "projected_monthly_usd": 10800.0, "sla_availability_preserved": true}
|
| 14 |
{"scenario_id": "14", "scenario_name": "Good Performance, High Cost", "scenario_type": "mixed", "what_this_demonstrates": "A checkout flow whose latency and error metrics are excellent — well inside SLA — but utilization is far below the healthy band on both compute and database. The system is over-provisioned to deliver performance that exceeds requirements. Right action is to rightsize while preserving the SLA buffer.", "finding_type": "issue_found", "primary_tier": "compute", "secondary_tier": "database", "action_category": "rightsizing", "specific_change": "Right-size compute from m5.2xlarge × 12 to m5.large × 8 (reducing from 96 vCPUs / 384 GiB to 16 vCPUs / 64 GiB total) and downsize the database primary and replicas from db.r6g.4xlarge to db.r6g.xlarge. Retain both read replicas and the PrivateLink/ALB network tier unchanged to preserve the reliability posture for this tier-1 checkout flow. Expected savings ~$5,500/month (~38% reduction).", "savings_monthly_usd": 5500.0, "current_monthly_usd": 14400.0, "projected_monthly_usd": 8900.0, "sla_availability_preserved": true}
|
| 15 |
-
{"scenario_id": "15", "scenario_name": "Reliability Focused Over-provisioning", "scenario_type": "mixed", "what_this_demonstrates": "A payment-processing platform configured for 99.99% SLA via heavy over-provisioning across all tiers and multi-AZ redundancy. Achieves near-zero error rate at substantial cost. The right next step is a business-context question, not a technical rightsizing.", "finding_type": "diagnostic_deferral", "primary_tier": "
|
| 16 |
{"scenario_id": "16", "scenario_name": "Partial Optimization", "scenario_type": "single_tier_mild_negative", "what_this_demonstrates": "A reporting dashboard whose compute tier shows mild under-utilization (slightly below the healthy band) while database and network sit in healthy ranges. The right action is a targeted single-step compute adjustment — not aggressive multi-tier rightsizing.", "finding_type": "issue_found", "primary_tier": "compute", "secondary_tier": null, "action_category": "rightsizing", "specific_change": "Reduce the compute fleet from 4 × m5.large to 3 × m5.large by setting count = 3 in the aws_instance.compute resource. Keep the instance class unchanged (m5.large). Do not modify the database (db.r6g.large) or network (ALB with least_outstanding_requests) tiers, which are correctly sized.", "savings_monthly_usd": 320.0, "current_monthly_usd": 2400.0, "projected_monthly_usd": 2080.0, "sla_availability_preserved": true}
|
| 17 |
-
{"scenario_id": "17", "scenario_name": "Cross-Tier Performance Degradation", "scenario_type": "diagnostic_deferral", "what_this_demonstrates": "A core API platform whose latency rises simultaneously across all three tiers during peak hours, with no clear lead-lag relationship. CPU and connection counts are within normal ranges on all tiers — the problem is latency-distributed, not capacity-driven. Root cause is ambiguous from the observable signals alone.", "finding_type": "diagnostic_deferral", "primary_tier": "
|
| 18 |
{"scenario_id": "18", "scenario_name": "Mostly Healthy with Minor Inefficiency", "scenario_type": "mostly_healthy", "what_this_demonstrates": "An internal tool that is mostly correctly sized. Compute shows slightly low utilization (below the ideal but not below the threshold that justifies aggressive action). All other tiers are in healthy ranges. The right action is a minor compute adjustment, no other changes.", "finding_type": "issue_found", "primary_tier": "compute", "secondary_tier": null, "action_category": "rightsizing", "specific_change": "Reduce the compute fleet from t3.medium × 5 to t3.medium × 4 by updating `aws_instance.compute` count from 5 to 4 in main.tf. This is a minor refinement — the system is mostly well-optimized and only this single adjustment is warranted. No changes to database, cache, or network tiers are needed.", "savings_monthly_usd": 110.0, "current_monthly_usd": 1900.0, "projected_monthly_usd": 1790.0, "sla_availability_preserved": true}
|
|
|
|
| 4 |
{"scenario_id": "04", "scenario_name": "Database Connection Bottleneck", "scenario_type": "single_tier_negative", "what_this_demonstrates": "A database under pressure from both a slow-query problem and a connection pool that's exhausted during business hours. Symptoms: connection counts push above pool limits during business hours, db_query_p95_latency_ms spikes during the same windows.", "finding_type": "issue_found", "primary_tier": "database", "secondary_tier": null, "action_category": "query_cache_optimization", "specific_change": "Optimize the top 5 slowest queries: (1) add index on users(email) for the email-lookup query (820ms p95), (2) add index on sessions(token, expires_at) for the session-token query (640ms p95), (3) add composite index on profiles(user_id) and ensure covering columns for the users-profiles join query (510ms p95), (4) add composite index on audit_log(created_at, user_id) for the audit-log join query (480ms p95), (5) materialize or cache the recursive permissions CTE query (410ms p95). Increase the connection pool from 100 to 200 to eliminate pool exhaustion during business hours (weekdays 09:00–18:00 UTC). Add 2 read replicas (db.r6g.large) with read/write splitting to offload the high-volume read queries (sessions at 7.4M calls, users-by-email at 4.7M calls).", "savings_monthly_usd": -2300.0, "current_monthly_usd": 2100.0, "projected_monthly_usd": 4400.0, "sla_availability_preserved": true}
|
| 5 |
{"scenario_id": "05", "scenario_name": "Load Balancer Inefficiency", "scenario_type": "single_tier_negative", "what_this_demonstrates": "A fleet behind an Application Load Balancer using round-robin distribution. Cluster-level aggregates show a wide p50-to-p95 spread because some instances are persistently overloaded while others are persistently idle. The fix is a load-balancing algorithm change, not a capacity change.", "finding_type": "issue_found", "primary_tier": "network", "secondary_tier": "compute", "action_category": "load_balancer_reconfiguration", "specific_change": "Reconfigure the ALB target group (app05-tg) load-balancing algorithm from round_robin to least_outstanding_requests. No capacity change is needed — the existing 8 × c5.xlarge fleet is sufficient. In Terraform, set `load_balancing_algorithm_type = \"least_outstanding_requests\"` on the `aws_lb_target_group.main` resource.", "savings_monthly_usd": 0.0, "current_monthly_usd": 3800.0, "projected_monthly_usd": 3800.0, "sla_availability_preserved": true}
|
| 6 |
{"scenario_id": "06", "scenario_name": "Healthy Application", "scenario_type": "healthy", "what_this_demonstrates": "An application where every tier is correctly sized, all metrics stay in healthy bands across all 14 days, no SLA pressure, no patterns of concern. The correct recommendation is no action.", "finding_type": "no_issue_found", "primary_tier": null, "secondary_tier": null, "action_category": null, "specific_change": "No changes recommended. Each tier was evaluated against its healthy operating bands and SLA targets (99.5% availability, P95 < 500ms). Compute CPU p95 peaks at 78% with comfortable headroom, memory stays under 72%, application P95 latency at 194.6ms max is well within the 500ms target. Database query P95 latency maxes at 113.4ms with a strong cache hit ratio (≥0.92). Redis cache hit ratio holds at 88-96% with memory usage peaking at 73.8%. Network error rate never exceeds 1%. No cross-tier correlations were flagged. Rightsizing, replica adjustment, and scaling policy changes were all considered and ruled out as the current configuration is well-balanced for cost, performance, and reliability.", "savings_monthly_usd": null, "current_monthly_usd": null, "projected_monthly_usd": null, "sla_availability_preserved": null}
|
| 7 |
+
{"scenario_id": "07", "scenario_name": "Cache Miss Cascade", "scenario_type": "cross_tier_negative", "what_this_demonstrates": "A cache tier that degrades (hit ratio drops below the healthy band) cascades into elevated database load and elevated application latency, even though the database and compute tiers themselves are correctly sized. The fix is in the cache layer, not in the downstream tiers — a sophisticated recommender must see past the symptoms to the cause.", "finding_type": "issue_found", "primary_tier": "cache", "secondary_tier": "database", "action_category": "cache_capacity_adjustment", "specific_change": "Scale the Redis cache cluster from 3 to 6 cache.r6g.large nodes to relieve memory pressure (currently 88–95% used) and reduce evictions. Implement cache warming logic targeting the three hottest key patterns—rec:user:* (27% miss rate), rec:trending:* (30% miss rate), and rec:similar:* (38% miss rate)—and redesign these keys with shorter, sharded prefixes (e.g., rec:u:{shard}:{user_id}) to distribute load evenly across the expanded cluster. This doubles cache-tier cost from $700 to ~$1,400/month but is expected to restore the hit ratio above 0.89, drop db_query_p95 by ~38%, and bring application P95 latency back under the 300ms SLA threshold.", "savings_monthly_usd": -700.0, "current_monthly_usd": 5800.0, "projected_monthly_usd": 6500.0, "sla_availability_preserved": true}
|
| 8 |
{"scenario_id": "08", "scenario_name": "Database Bottleneck Impact", "scenario_type": "cross_tier_negative", "what_this_demonstrates": "A database with slow queries during business hours that cascade into elevated application latency on the compute tier. Compute itself is correctly sized; the problem is downstream.", "finding_type": "issue_found", "primary_tier": "database", "secondary_tier": "compute", "action_category": "query_cache_optimization", "specific_change": "Optimize the top 6 slowest SQL queries and add 2 read replicas with read/write splitting. Specifically: (1) Add a composite index (user_id, id) on carts and (cart_id) on cart_items for the carts-by-user query (p95 820ms, 6.05M calls); (2) Add a composite index (warehouse_id, product_id) on inventory for the inventory-warehouse query (p95 680ms, 3.53M calls); (3) Add a composite index (product_id, region, valid_from, valid_to, priority) on pricing for the pricing-lookup query (p95 580ms, 4.03M calls); (4) Add an index (country, is_active, priority) on payment_providers for the payment-provider query (p95 440ms, 1.34M calls); (5) Add a composite index (user_id, created_at DESC) on orders and (order_id) on order_items for the orders-by-user query (p95 510ms, 504K calls); (6) Add an index (order_id, status) on fulfillment for the fulfillment-status query (p95 380ms, 672K calls). Provision 2 read replicas (db.r6g.xlarge) and enable R/W splitting to route all SELECT traffic to replicas. Do NOT scale compute — the ASG at 8× m5.large is correctly sized.", "savings_monthly_usd": -2400.0, "current_monthly_usd": 6400.0, "projected_monthly_usd": 8800.0, "sla_availability_preserved": true}
|
| 9 |
{"scenario_id": "09", "scenario_name": "Peak Hours Cost vs Reliability", "scenario_type": "cross_tier_negative", "what_this_demonstrates": "A high-criticality e-commerce platform with a clear bimodal weekday pattern: heavy use during peak hours, very light use off-peak and on weekends. Currently provisioned at peak capacity 24/7. Scheduled scaling would dramatically reduce off-peak cost without affecting peak SLA.", "finding_type": "issue_found", "primary_tier": "compute", "secondary_tier": "database", "action_category": "scaling_policy_change", "specific_change": "Replace the fixed 20× m5.xlarge compute fleet with scheduled Auto Scaling: maintain 20 instances during peak windows (weekdays 09:00–11:00 UTC and 14:00–16:00 UTC), scale down to 7 instances (65% reduction) during off-peak hours (weekdays 16:00–09:00 UTC and all day weekends 00:00–23:59 UTC). Similarly, stop one database replica during off-peak/weekend windows and restart it before peak. This preserves full peak capacity for the 99.99% SLA while reducing monthly spend from $18,400 to approximately $8,000, saving ~$10,400/month (56%).", "savings_monthly_usd": 10400.0, "current_monthly_usd": 18400.0, "projected_monthly_usd": 8000.0, "sla_availability_preserved": true}
|
| 10 |
{"scenario_id": "10", "scenario_name": "Network Latency Impact", "scenario_type": "cross_tier_negative", "what_this_demonstrates": "A payment service whose external-provider integration uses basic cross-region VPC peering. Network latency to the provider spikes during business hours, cascading into elevated compute-tier application latency. Compute itself is correctly sized; the bottleneck is at the network boundary.", "finding_type": "issue_found", "primary_tier": "network", "secondary_tier": "compute", "action_category": "network_topology_change", "specific_change": "Replace basic VPC peering for the payment-provider integration with AWS PrivateLink to eliminate cross-region latency spikes during business hours (weekdays 09:00–18:00 UTC). Add application-level retries with exponential backoff (initial 100ms, max 3 retries, 2× multiplier, jitter) to the payment-provider client. Do not scale compute — CPU and memory are correctly sized; the bottleneck is at the network boundary, not the compute tier.", "savings_monthly_usd": -150.0, "current_monthly_usd": 4100.0, "projected_monthly_usd": 4250.0, "sla_availability_preserved": true}
|
|
|
|
| 12 |
{"scenario_id": "12", "scenario_name": "Healthy Compute, Problematic Database", "scenario_type": "mixed", "what_this_demonstrates": "A user profile service where compute is correctly sized and operating in healthy ranges, but the database is significantly over-provisioned and operating at very low utilization. The right action is downsize the database only — compute and read replicas should not change.", "finding_type": "issue_found", "primary_tier": "database", "secondary_tier": null, "action_category": "rightsizing", "specific_change": "Downsize the RDS primary instance from db.r6g.2xlarge to db.r6g.large. Leave compute tier (m5.large × 6 with target-tracking ASG min=6/max=10) completely unchanged — compute is correctly sized and operating in healthy ranges. Update the Terraform aws_db_instance.database_primary instance_class from \"db.r6g.2xlarge\" to \"db.r6g.large\". This yields approximately $1,400/month in savings while preserving the 99.9% SLA.", "savings_monthly_usd": 1400.0, "current_monthly_usd": 7200.0, "projected_monthly_usd": 5800.0, "sla_availability_preserved": true}
|
| 13 |
{"scenario_id": "13", "scenario_name": "Compute Spike + Database Strain", "scenario_type": "cross_tier_negative", "what_this_demonstrates": "A search service where weekday peak-hour compute spikes drive database connection counts roughly 3x above baseline, exhausting the connection pool. Both tiers need attention: compute needs predictive scaling, database needs replicas and a larger pool.", "finding_type": "issue_found", "primary_tier": "compute", "secondary_tier": "database", "action_category": "scaling_policy_change", "specific_change": "Replace step scaling with predictive auto-scaling on the compute ASG (trigger scale-out at cpu_p95 > 65%, raise max_size from 12 to 14), add 2 read replicas (db.r6g.xlarge) with read/write splitting to the database tier, and increase the connection pool from 150 to 300. Schedule predictive scaling to pre-warm capacity 15 minutes before weekday spike windows (approximately 09:00–12:00 UTC and 14:00–17:00 UTC based on the observed correlation lag).", "savings_monthly_usd": -3000.0, "current_monthly_usd": 7800.0, "projected_monthly_usd": 10800.0, "sla_availability_preserved": true}
|
| 14 |
{"scenario_id": "14", "scenario_name": "Good Performance, High Cost", "scenario_type": "mixed", "what_this_demonstrates": "A checkout flow whose latency and error metrics are excellent — well inside SLA — but utilization is far below the healthy band on both compute and database. The system is over-provisioned to deliver performance that exceeds requirements. Right action is to rightsize while preserving the SLA buffer.", "finding_type": "issue_found", "primary_tier": "compute", "secondary_tier": "database", "action_category": "rightsizing", "specific_change": "Right-size compute from m5.2xlarge × 12 to m5.large × 8 (reducing from 96 vCPUs / 384 GiB to 16 vCPUs / 64 GiB total) and downsize the database primary and replicas from db.r6g.4xlarge to db.r6g.xlarge. Retain both read replicas and the PrivateLink/ALB network tier unchanged to preserve the reliability posture for this tier-1 checkout flow. Expected savings ~$5,500/month (~38% reduction).", "savings_monthly_usd": 5500.0, "current_monthly_usd": 14400.0, "projected_monthly_usd": 8900.0, "sla_availability_preserved": true}
|
| 15 |
+
{"scenario_id": "15", "scenario_name": "Reliability Focused Over-provisioning", "scenario_type": "mixed", "what_this_demonstrates": "A payment-processing platform configured for 99.99% SLA via heavy over-provisioning across all tiers and multi-AZ redundancy. Achieves near-zero error rate at substantial cost. The right next step is a business-context question, not a technical rightsizing.", "finding_type": "diagnostic_deferral", "primary_tier": "deferred", "secondary_tier": "deferred", "action_category": null, "specific_change": "Before making any rightsizing changes, confirm with the business whether the 99.99% availability SLA target is contractually required or aspirational. The current infrastructure is heavily over-provisioned (CPU p95 at 34%, memory p95 at 42%, DB connections p95 at 60) to achieve near-zero error rates and comfortable latency headroom. If the business confirms 99.95% is acceptable, right-size compute from m5.xlarge × 16 to m5.large × 10, reduce database replicas from 3 to 2, and downsize the primary to db.r6g.xlarge — yielding ~$8,200/month savings. If 99.99% is contractually mandated, the current posture is defensible and should be preserved. Monitor the following before recommending a change: (1) contractual SLA obligations and penalty clauses, (2) peak traffic patterns beyond this 14-day window (e.g., month-end payment surges), and (3) disaster recovery requirements that may justify the third replica.", "savings_monthly_usd": null, "current_monthly_usd": null, "projected_monthly_usd": null, "sla_availability_preserved": null}
|
| 16 |
{"scenario_id": "16", "scenario_name": "Partial Optimization", "scenario_type": "single_tier_mild_negative", "what_this_demonstrates": "A reporting dashboard whose compute tier shows mild under-utilization (slightly below the healthy band) while database and network sit in healthy ranges. The right action is a targeted single-step compute adjustment — not aggressive multi-tier rightsizing.", "finding_type": "issue_found", "primary_tier": "compute", "secondary_tier": null, "action_category": "rightsizing", "specific_change": "Reduce the compute fleet from 4 × m5.large to 3 × m5.large by setting count = 3 in the aws_instance.compute resource. Keep the instance class unchanged (m5.large). Do not modify the database (db.r6g.large) or network (ALB with least_outstanding_requests) tiers, which are correctly sized.", "savings_monthly_usd": 320.0, "current_monthly_usd": 2400.0, "projected_monthly_usd": 2080.0, "sla_availability_preserved": true}
|
| 17 |
+
{"scenario_id": "17", "scenario_name": "Cross-Tier Performance Degradation", "scenario_type": "diagnostic_deferral", "what_this_demonstrates": "A core API platform whose latency rises simultaneously across all three tiers during peak hours, with no clear lead-lag relationship. CPU and connection counts are within normal ranges on all tiers — the problem is latency-distributed, not capacity-driven. Root cause is ambiguous from the observable signals alone.", "finding_type": "diagnostic_deferral", "primary_tier": "deferred", "secondary_tier": "deferred", "action_category": null, "specific_change": "Defer any scaling, rightsizing, or infrastructure changes until a full end-to-end distributed trace analysis is deployed and analyzed across the compute, database, and network tiers. The simultaneous latency rise across all three tiers with zero lead-lag (Pearson coefficients 0.963 and 0.975 at lag 0 minutes) indicates a shared upstream or external root cause that current telemetry cannot isolate. Candidate root causes include: (1) a downstream provider or external API dependency introducing latency during business hours, (2) a shared message queue or coordination service creating backpressure across all tiers, (3) network-level contention at the VPC peering or NAT gateway layer, or (4) coordination overhead from a distributed lock or serialization point. Instrument OpenTelemetry or X-Ray distributed tracing across all request paths, capture trace spans for at least 5 weekday business-hour peaks, and correlate with any external dependency call latencies before recommending targeted intervention.", "savings_monthly_usd": null, "current_monthly_usd": null, "projected_monthly_usd": null, "sla_availability_preserved": null}
|
| 18 |
{"scenario_id": "18", "scenario_name": "Mostly Healthy with Minor Inefficiency", "scenario_type": "mostly_healthy", "what_this_demonstrates": "An internal tool that is mostly correctly sized. Compute shows slightly low utilization (below the ideal but not below the threshold that justifies aggressive action). All other tiers are in healthy ranges. The right action is a minor compute adjustment, no other changes.", "finding_type": "issue_found", "primary_tier": "compute", "secondary_tier": null, "action_category": "rightsizing", "specific_change": "Reduce the compute fleet from t3.medium × 5 to t3.medium × 4 by updating `aws_instance.compute` count from 5 to 4 in main.tf. This is a minor refinement — the system is mostly well-optimized and only this single adjustment is warranted. No changes to database, cache, or network tiers are needed.", "savings_monthly_usd": 110.0, "current_monthly_usd": 1900.0, "projected_monthly_usd": 1790.0, "sla_availability_preserved": true}
|