Forecast website emissions before shipping new features
Shipping a new feature inevitably changes what the browser, the network, and the server do. Forecasting the emissions impact early avoids surprises and makes sustainability a concrete part of release decisions. The method below balances speed and accuracy so teams can judge a change before it reaches full production traffic.
What forecasting is and what it does not do
Forecasting transforms engineering signals into an estimate of additional greenhouse gas emissions a feature will cause. It is not an exact audit. The goal is actionable insight: can the feature be shipped as is, should it be optimized first, or should the rollout be constrained while further work is done. A good forecast identifies the largest sources of impact and provides a defensible range, not a single definitive number.
Core signals to collect
Collect these three classes of measurement. They let you model both per visit impact and aggregate effect across expected traffic.
- Client transfer size Measure bytes transferred to the browser caused by the feature. Include HTML, CSS, JavaScript, images, fonts, and third party requests triggered only for users exposed to the feature.
- Server compute work Measure additional server CPU time and memory allocation the feature requires per request or per background job. If the feature increases database queries or background processing, include those.
- Request and third party behavior Count extra HTTP requests and identify third party services the feature calls. Third party calls can add both network transfer and external compute footprints that are outside your direct control.
Quick synthetic checks you can run in a day
Run a small set of synthetic tests to get usable inputs for a forecast. Use a staging environment and a feature flag so only test pages include the new code.
- Network snapshot Use the browser network tab or a tool such as WebPageTest to capture total transfer size for a representative page with the feature off and then on. Save both full load and first contentful paint level snapshots if the feature loads non critical assets lazily.
- Server timing Measure server response time and CPU time for endpoints affected by the feature. If you cannot measure CPU directly, capture server response duration and the change in requests per second under a small load using a load test tool.
- Third party sampling If the feature triggers analytics, ads, or external APIs, validate which requests fire and whether they carry large payloads or long latency that could add retries.
Simple forecasting model
Turn the measurements into a forecast in three steps. Keep the model transparent and easy to audit.
- Per visit delta Compute the difference in bytes transferred per visit and the difference in server compute per request between the baseline and the feature enabled state.
- Traffic scaling Multiply per visit deltas by expected traffic to get aggregate additional bytes transferred and aggregate additional server compute for a chosen period such as one month or one year. Use conservative and optimistic traffic scenarios to create a range.
- Convert to emissions Apply emission intensity factors. For network transfer, use a network energy intensity expressed as kilowatt hours per gigabyte and for server compute use kilowatt hours per server CPU hour. Multiply energy by the appropriate carbon intensity in grams of CO2 per kilowatt hour. Obtain the hosting carbon intensity from your cloud provider or public grid data and pick a network intensity source that matches your region or infrastructure provider.
Keep the conversion step explicit. Record which energy and carbon intensity numbers you used and where they came from. If you do not have provider specific data, use published national grid carbon intensity and a conservative network energy estimate from a reputable study.
How to pick inputs and report uncertainty
Sources of uncertainty include traffic shape, cache hit rates, device types, and how third parties behave at scale. Report a small set of scenarios rather than a single point estimate. For example, show a low scenario that assumes high cache hit rates, a mid scenario with current cache behavior, and a high scenario that assumes low cache effectiveness and higher traffic growth.
When in doubt, report an interval and a clear explanation of the assumptions behind each bound. This transparency makes the forecast usable for prioritization and audits.
When to require optimisation before shipping
Turn forecasted outcomes into decision rules. Keep rules simple so they are easy to apply in sprint planning.
- If the feature will increase per visit transfer by a small percent and server compute by a small percent for a narrowly targeted audience, consider releasing with monitoring enabled.
- If the forecast shows a material increase in network transfer or server compute across your primary traffic segments, require an optimisation sprint before full rollout.
- If the feature depends on multiple new third party calls or introduces unbounded background work, restrict the initial rollout to a small percentage of users until behaviour is understood.
Quantitative thresholds are team specific. The important part is that the forecasting workflow feeds a clear gate in the release process so emissions considerations are considered alongside performance and cost.
Verification with staged releases
Use a feature flag and staged rollout to validate the forecast under real world conditions. Instrument both client and server to capture the same signals used in the synthetic model. Run an A B experiment where a random subset of traffic sees the feature and measure the delta in bytes transferred, server request counts, and CPU usage. Compare the A B deltas to the forecast and update the model with real numbers.
Staged verification has several benefits. It catches behaviour not visible in staging, reveals cache interactions and CDN effects, and uncovers third party responses to higher request volumes. If measured impact exceeds the forecast, pause the rollout and investigate.
Practical optimisations to reduce forecasted impact
If the forecast flags a significant increase in emissions, these techniques commonly reduce the largest contributors.
- Defer non essential assets Load images, fonts, and large scripts only when needed. Lazy loading and route based code splitting reduce per visit bytes for initial page loads.
- Prefer server side cache friendly approaches Cache rendered fragments or use edge rendering to avoid repeated origin compute for identical requests.
- Reduce third party calls Batch or proxy external requests where practical, and eliminate calls that serve analytics or experiments with negligible business value.
Tooling and telemetry recommendations
Instrument once and reuse forecasts. Capture the following telemetry so future changes are faster to evaluate.
- Per page transfer and request counts Collect these in real user monitoring and aggregate by variant when running experiments.
- Server CPU and request metrics Expose per endpoint compute usage or use tracing to attribute work to feature code paths.
- Feature flag exposure and rollouts Correlate telemetry to the percentage of users exposed so you can scale measured deltas to full traffic.
Tools that are helpful include WebPageTest for synthetic network snapshots, browser developer tools for quick checks, the hosting provider console for server metrics, and RUM tooling that supports custom metrics so you can record bytes transferred and feature exposure together.
Common pitfalls to avoid
Do not rely only on payload size. Some changes add little transfer but a lot of server compute. Do not assume third party services scale linearly. Some providers respond differently at scale, adding retries or larger payloads. Do not ignore caching. A change that bloats the cache key can multiply origin requests unexpectedly.
Keep forecasts lightweight. Spending too long perfecting small forecasts slows teams down. The goal is to make comparable, repeatable estimates that inform trade offs, not to produce an audit grade number for every minor UI tweak.
Making forecasts part of the workflow
Add a short forecasting checklist to your feature planning template. At minimum capture the three core signals, a simple per visit to aggregate conversion, the chosen emission factors, and a risk based release recommendation. Keep the checklist under a single page so it can be completed during normal grooming and planning cycles.
With a few iterations the team will develop a library of past forecasts. Those examples speed future work because similar feature patterns can reuse measured deltas and require only a quick sanity check.
Forecasting turns emissions from a vague concern into a measurable product constraint. By measuring bytes, server work, and third party requests, applying transparent conversion factors, and validating with staged rollouts, teams can confidently decide when to ship, when to optimise, and when to limit exposure while further work is done.