teluzia.Cloud Engineer · Day 151
CHAPTER 22 · TROUBLESHOOTING AND BEHAVIOURAL INTERVIEWS

Cost spikes and CI/CD failures

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Cost spikes is today's starting point. Transfer rises from 10 to 70 units while compute stays at 40. Compare bytes transferred, destination and release time; a compute resize would not target the observed cost driver. You will connect this with ci/cd stage failures and change correlation and recovery. The lesson's artifact brings these decisions together: Create a deployment timeline and cost-by-service table; identify the earliest failure and one independently testable cost-spike hypothesis.

Think of it this way

Cost and pipeline diagnosis resemble reconciling a bill and assembly log: find the first abnormal item rather than blaming the final warning.

TOPIC 01 / 03Step by step

Cost spikes

Compare spend by service, region, account and usage type over matched periods. Check traffic, logging, transfer and orphaned resources; a single total cannot identify the driver. Transfer rises from 10 to 70 units while compute stays at 40. Compare bytes transferred, destination and release time; a compute resize would not target the observed cost driver.

WORKED EXAMPLE
Transfer rises from 10 to 70 units while compute stays at 40. Compare bytes transferred, destination and release time; a compute resize would not target the observed cost driver.

A usage type identifies a billing mechanism; a cost driver is the activity increasing that usage; an anomaly is a deviation from the selected baseline. Imagine recorded cost rises during the month, but the period compared is longer than the baseline period. Normalize the window before investigating technical causes. Group by service, region and usage type, then connect the largest change to relevant quantities such as stored bytes, transfer or requests. Clearly separate currency-based billed amounts from unit-based model estimates and owner attribution. Recent billing can be incomplete. A broad bill comparison is quick but cannot establish resource-level causality. Use the grouping to select a narrow hypothesis, then inspect workload or configuration evidence and keep credits or commitment allocation changes visible when reconciling totals.

Why this matters

Compare bytes transferred, destination and release time; a compute resize would not target the observed cost driver.

A common trap

The billing total alone identifies the service responsible for a spike.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

Cost spikes

Compare spend by service, region, account and usage type over matched periods. Check traffic, logging, transfer and orphaned resources; a single total cannot identify the driver. Transfer rises from 10 to 70 units while compute stays at 40. Compare bytes transferred, destination and release time; a compute resize would not target the observed cost driver.

WORKED EXAMPLE
Transfer rises from 10 to 70 units while compute stays at 40. Compare bytes transferred, destination and release time; a compute resize would not target the observed cost driver.

A usage type identifies a billing mechanism; a cost driver is the activity increasing that usage; an anomaly is a deviation from the selected baseline. Imagine recorded cost rises during the month, but the period compared is longer than the baseline period. Normalize the window before investigating technical causes. Group by service, region and usage type, then connect the largest change to relevant quantities such as stored bytes, transfer or requests. Clearly separate currency-based billed amounts from unit-based model estimates and owner attribution. Recent billing can be incomplete. A broad bill comparison is quick but cannot establish resource-level causality. Use the grouping to select a narrow hypothesis, then inspect workload or configuration evidence and keep credits or commitment allocation changes visible when reconciling totals.

Why this matters

Compare bytes transferred, destination and release time; a compute resize would not target the observed cost driver.

A common trap

The billing total alone identifies the service responsible for a spike.

CI/CD stage failures

A pipeline has checkout, dependencies, build, tests, artifact and deployment stages. Find the first causal failure; later missing-artifact errors often follow an earlier build problem. Dependency installation fails, then packaging reports no artifact. Repair the installation error before debugging deployment credentials because the deployable file was never produced.

WORKED EXAMPLE
Dependency installation fails, then packaging reports no artifact. Repair the installation error before debugging deployment credentials because the deployable file was never produced.

A stage is a pipeline boundary; an artifact is a build output handed to a later stage; the first causal error prevents required downstream work. Imagine checkout succeeds, a package download fails, tests never run and deployment says the image is missing. Read logs in causal order and locate the dependency-download failure rather than starting with deployment permissions. Check whether a stage actually ran, was skipped or failed, because those states imply different causes. Compare the commit and runner environment with the last good run. Detailed logs aid triage but may contain tokens that require sanitization before sharing. Repair the earliest supported cause, rerun the relevant gates and verify artifact identity before restoring delivery; do not bypass tests to turn the final stage green.

Why this matters

Repair the installation error before debugging deployment credentials because the deployable file was never produced.

A common trap

The last pipeline error is always the earliest root cause.

Change correlation and recovery

Connect cost and delivery changes with timestamps without assuming causation. Roll back only the implicated change and verify cost-driving usage and delivery health independently. Logging increased at 10:00 and storage usage rose afterward; compare event volume and retention before attributing all cost growth to the release. Keep a competing traffic-growth hypothesis.

WORKED EXAMPLE
Logging increased at 10:00 and storage usage rose afterward; compare event volume and retention before attributing all cost growth to the release. Keep a competing traffic-growth hypothesis.

Correlation places events together; causation explains the mechanism linking them; rollback changes one relevant condition to test or mitigate that link. Imagine a pipeline configuration update coincides with both transfer charges and build failures. The update might create repeated image downloads, but independent traffic growth remains possible. Construct a timeline of release events, run attempts and usage quantities, then compare affected and unaffected paths. Predict what should decline if the retry configuration is corrected. A successful rollback strengthens the hypothesis only if the measured cost-driving activity changes as expected; final billing may arrive later. One-variable investigation is slower than changing everything but preserves interpretation. Record confirmed mechanisms separately from plausible explanations and verify delivery health and usage reduction as distinct outcomes.

Why this matters

Keep a competing traffic-growth hypothesis.

A common trap

Events close in time always have a causal relationship.

KEEP THESE WITH YOU

Today’s takeaways

Cost spikes: Compare spend by service, region, account and usage type over matched periods.

CI/CD stage failures: A pipeline has checkout, dependencies, build, tests, artifact and deployment stages.

Change correlation and recovery: Connect cost and delivery changes with timestamps without assuming causation.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed