{"id":622,"date":"2026-07-31T09:28:45","date_gmt":"2026-07-31T09:28:45","guid":{"rendered":"https:\/\/webcarbon.io\/news\/?p=622"},"modified":"2026-07-31T09:28:45","modified_gmt":"2026-07-31T09:28:45","slug":"edge-computing-emissions-serverless-co2","status":"publish","type":"post","link":"https:\/\/webcarbon.io\/news\/2026\/07\/31\/edge-computing-emissions-serverless-co2\/","title":{"rendered":"Edge computing and emissions: when serverless reduces or increases CO2"},"content":{"rendered":"<h2>A real world problem without numbers<\/h2>\n<p>A product team needed fast image thumbnails for users around the world. The original design used a central serverless function in a single cloud region that generated thumbnails on demand. That design gave correct images but some users saw slow responses. The team considered two alternatives. One was to run the image worker as edge serverless functions distributed to many locations. The other was a hybrid where a central processor created thumbnails at upload time and a global CDN served cached results.<\/p>\n<h3>Why architecture affects carbon<\/h3>\n<p>Architecture changes emissions through three linked channels. First, network transfer changes. Delivering bytes from a nearby edge or a CDN reduces long distance transfer and the backbone work inside network operators. Second, compute changes. More locations often mean more separate compute instances, higher idle overhead and more cold start events unless usage is well amortised. Third, electricity carbon intensity varies by region. Running compute in a low carbon grid reduces emissions for the same energy use while running the same work in a high carbon grid increases them.<\/p>\n<h3>Designing a measurement focused experiment<\/h3>\n<p>The team set up a repeatable experiment to avoid guesswork. The core idea was to measure the same user requests on different architectures and map energy use to carbon using regional grid intensity. The steps below describe the minimum viable approach to make the tradeoffs visible and auditable.<\/p>\n<ol>\n<li><strong>Define workload boundaries<\/strong>. Decide which operations to include in the comparison. For the image example this included resizing CPU time, memory allocation while processing, storage reads and writes, and the network bytes transferred back to users.<\/li>\n<li><strong>Choose representative traffic<\/strong>. Build a request set that reflects the real mix of cold and warm requests, cacheable and unique images, and geography of users. Synthetic microbenchmarks are useful for component profiling but not for full system tradeoffs.<\/li>\n<li><strong>Instrument for energy proxies<\/strong>. Collect runtime metrics useful as energy proxies. These include CPU time or vCPU seconds, memory allocation and duration, GPU time if used, network bytes out, and function invocation counts including cold start markers. Most cloud and edge providers expose these metrics in logs or billing exports.<\/li>\n<li><strong>Capture cache behaviour<\/strong>. Record CDN hits and misses and any origin fetches. Cache hit rate radically changes whether compute is invoked for each request.<\/li>\n<li><strong>Map energy to carbon<\/strong>. Use region specific electricity carbon intensity data to convert estimated or measured energy to CO2 equivalent. External services and public APIs provide near real time grid intensity by region. When provider tools exist they simplify this step.<\/li>\n<li><strong>Repeat across architectures<\/strong>. Run the same request set against the central serverless region, the multi region edge deployment, and the hybrid CDN plus origin approach. Collect the same metrics for each run and repeat at different times to capture variability.<\/li>\n<\/ol>\n<h3>Architectures evaluated<\/h3>\n<p>The team compared three architecture patterns and tracked how each influenced the channels described earlier.<\/p>\n<h3>Central region serverless<\/h3>\n<p>Compute happens in a small set of regions, usually near the origin storage. Advantages include fewer duplicated artifacts, simpler caching relationships, and more predictable cold start patterns because traffic concentrates in a few places. Drawbacks for a global user base include longer network paths and higher user perceived latency for distant requests.<\/p>\n<h3>Distributed edge serverless<\/h3>\n<p>Functions run in many locations close to end users. This reduces client perceived latency and lowers network backbone transfer. However the same workload may be executed in many places, increasing total compute instances and potentially raising cold start frequency unless functions remain warm. If functions run where grid carbon intensity is high the carbon per request can increase even if energy use is similar.<\/p>\n<h3>Hybrid CDN plus central processing<\/h3>\n<p>On upload, an origin process precomputes and stores thumbnails. A global CDN then serves cached images to users. This pattern shifts compute from request time to upload time and maximises cache hits for subsequent reads. The tradeoff is extra compute at upload and additional storage or origin egress, but in many cases it reduces repeated runtime compute and long distance transfer.<\/p>\n<h3>Decision criteria the team used<\/h3>\n<p>The following criteria helped pick the lowest carbon option for each workload profile. Use them as heuristics, not absolute rules.<\/p>\n<ol>\n<li><strong>Cacheability<\/strong>. If most requests can be served from cache after a first compute then precompute plus CDN typically wins because repeated compute is avoided.<\/li>\n<li><strong>Per request compute intensity<\/strong>. When each request consumes substantial CPU or memory the overhead of duplicating that compute across many edge locations can outweigh network savings. In that case centralised or hybrid approaches often reduce total energy.<\/li>\n<li><strong>Traffic distribution<\/strong>. If users are heavily concentrated in a few regions a central region close to those users reduces both latency and carbon. When traffic is truly global and uniformly distributed an edge deployment can reduce long distance transfer.<\/li>\n<li><strong>Cold start sensitivity<\/strong>. Workloads with many infrequent invocations pay a penalty from cold starts. Edge functions with many cold starts can increase energy per useful work. Provisioned concurrency or other warmers help but have their own energy cost.<\/li>\n<li><strong>Regional carbon intensity<\/strong>. Prefer regions with lower grid carbon intensity for heavy compute. If edge locations are predominantly in high carbon grids the reduced network transfer may not offset the higher carbon per kilowatt hour.<\/li>\n<li><strong>Data gravity and privacy<\/strong>. Strict data residency rules or large origin storage reads favour processing close to storage. Sometimes the only viable option is to keep compute near data which affects emissions and must be balanced with other criteria.<\/li>\n<\/ol>\n<h3>Optimisations that changed the outcome<\/h3>\n<p>During testing the team tried several optimisations and measured their effect on the relative carbon outcome between options rather than assuming the direction of change.<\/p>\n<p>They moved to serve most user requests from cached thumbnails by generating images at upload time. That reduced repeated serverless invocations and lowered network egress when the CDN was able to serve nearby users. For images that were truly unique they introduced size quotas and client side downscaling guidelines to reduce per request work and transfer.<\/p>\n<p>On the edge deployment they reduced function memory allocations to better match the measured working set. This lowered billed vCPU units and reduced idle memory time. They also introduced a small warm pool for the busiest locations to reduce cold start frequency while measuring whether the energy cost of the warm pool was outweighed by fewer cold starts.<\/p>\n<p>For both serverless and edge variants the team tuned cache TTLs based on update patterns so cache invalidation did not cause unnecessary origin invocations. They also batched some low urgency image conversions to run on schedules in a preferred low carbon region when policy allowed.<\/p>\n<h3>When edge increased CO2 in practice<\/h3>\n<p>Edge increased carbon in two recurring scenarios. The first was low cacheability combined with moderate compute per request. When each request performed expensive CPU bound work and caching was ineffective the edge pattern caused many separate compute invocations across locations. Total energy rose compared to a single centralised pool that could amortise startup and background overhead.<\/p>\n<p>The second scenario involved high cold start rates across many regions. When requests were sporadic each edge location started functions frequently. The energy cost of repeated initialization and the extra control plane activity raised the energy per useful operation. Mitigations such as provisioned concurrency reduced cold starts but introduced baseline energy use that also needed measurement.<\/p>\n<h3>Reporting results in a verifiable way<\/h3>\n<p>To make claims auditable the team published the measurement method and the raw metrics they collected. They included CPU time, memory seconds, network bytes, cache hit rates, function invocation counts, and the exact carbon intensity sources used for each region and time window. They reported per request energy proxies and the resulting CO2 equivalent per request for each architecture. This allowed stakeholders to review assumptions and reproduce the comparison.<\/p>\n<h3>Practical rules to take away<\/h3>\n<p>If you cannot measure, assume more than one outcome is possible. Edge serverless can reduce carbon when it meaningfully lowers repeated network transfer and when compute per request is small or well amortised. It can increase carbon when compute per request is large, cacheability is poor, cold start rates are high or many edge locations sit on carbon intensive grids.<\/p>\n<p>Start with these actions. First, profile the workload to understand per request compute and cacheability. Second, run the same representative traffic against candidate architectures and collect the same set of runtime metrics. Third, convert energy proxies to emissions using region specific grid intensity and publish the method so others can verify it. Fourth, test simple optimisations such as precompute at upload, cache TTL tuning, matching memory to actual needs and selective provisioned concurrency before making a final architecture decision.<\/p>\n<h3>Next steps for teams<\/h3>\n<p>Use the experiment described here as a template for other workloads. Image resizing is instructive because the split between compute and cacheable bytes is easy to control. For other workloads such as APIs, video processing or AI inference adjust the representative request set and the energy proxies you collect. Keep the focus on comparable measurements and traceable assumptions so architecture decisions reduce real emissions rather than shifting them invisibly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This case study explains how moving a serverless workload toward the edge can lower emissions in some situations and raise them in others. Readers will learn a practical measurement workflow, the variables that matter, and clear decision criteria to pick the lowest carbon architecture for a given workload.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[106,82,4],"tags":[],"class_list":["post-622","post","type-post","status-publish","format-standard","hentry","category-cloud-architecture","category-edge-computing","category-sustainability"],"aioseo_notices":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Webcarbon Team","author_link":"https:\/\/webcarbon.io\/news\/author\/webcarbon_wqpz61\/"},"uagb_comment_info":0,"uagb_excerpt":"This case study explains how moving a serverless workload toward the edge can lower emissions in some situations and raise them in others. Readers will learn a practical measurement workflow, the variables that matter, and clear decision criteria to pick the lowest carbon architecture for a given workload.","_links":{"self":[{"href":"https:\/\/webcarbon.io\/news\/wp-json\/wp\/v2\/posts\/622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webcarbon.io\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webcarbon.io\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webcarbon.io\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webcarbon.io\/news\/wp-json\/wp\/v2\/comments?post=622"}],"version-history":[{"count":1,"href":"https:\/\/webcarbon.io\/news\/wp-json\/wp\/v2\/posts\/622\/revisions"}],"predecessor-version":[{"id":623,"href":"https:\/\/webcarbon.io\/news\/wp-json\/wp\/v2\/posts\/622\/revisions\/623"}],"wp:attachment":[{"href":"https:\/\/webcarbon.io\/news\/wp-json\/wp\/v2\/media?parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webcarbon.io\/news\/wp-json\/wp\/v2\/categories?post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webcarbon.io\/news\/wp-json\/wp\/v2\/tags?post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}