Hacker News new | past | comments | ask | show | jobs | submit login

The first question I have is: how? How do you calculate this?

Its’s neither obvious from your post nor your GitHub landing page, which is a shame.

The other question I would have is: who is the target audience, and why are API calls specifically so important?




The page linked by the HN post title (https://docs.stepci.com/guides/co2-testing.html) says:

> The calculation algorithm is provided by Sustainable Web Design

And links to: https://sustainablewebdesign.org/calculating-digital-emissio...


That page:

> NOTE: This page is regularly updated to include the most recent research and information.

Also, the same page:

> Last update: April 17, 2022.

Call me naive but I was hoping research in this area will be faster/more frequent, given also the Cop27.


> Annual Internet Energy / Annual End User Traffic = 0.81 kWh/GB

> Carbon factor (global grid): 442 g/kWh

Probably just checking how many bytes the response is. While that's a good idea to remove unused data from your response, this test may promote wrong patterns such as spreading data over multiple request/response. This would consume more energy but won't be visible with a naive CO2 computation.


that’s correct, we should also mention that spreading data over multiple requests does not improve co2 usage


Raising awareness on such topic and providing visibility to devs is a good thing. Unfortunately, numbers may be off by multiple orders of magnitude. It's really hard to get any meaningful CO2 number for a single API call. I'd suspect API burn much more CO2/byte than streaming.

Streaming is dumb, cacheable near end-users and heavy in bandwidth. API uses little bandwidth but often requires calls to multiple remote backend systems heavy in CPU, including subrequests to databases and other stuff. When you mix all usage and get an average KPI, it's no longer representative.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: