跳过导航
跳过mega-menu
的帖子

我们如何构建更可持续的软件?

2020年,Brewdog宣布了最新一轮融资, 明天朋克的权益,旨在进一步推动其可持续发展努力. 对于一家已经是负碳排放的公司来说,这是一个不小的成就. 有了资金, they intend to replace their fleet of vehicles with fully electric alternatives, 为他们的啤酒厂生产可再生能源, 还有更多.

But decarbonisation is not exclusively a private-sector trend — 和 various public-sector organisations are also turning their attention to more climate-friendly practices. Take the case of the Department for Environment, Food 和 Rural Affairs (DEFRA). 2020年9月,DEFRA发布了 绿化政府, a policy paper setting out its strategy for providing digital services that are more sustainable.

This policy is not an isolated case either, with other government departments such as 财政部 和 运输署 近年来发表了类似的论文.

As a growing number of industries are turning their attention to climate change 和 innovating to reduce their impact on the environment, 我们都在迈向净零的旅程中——包括我们的科技. 但是软件工程是如何适应这种情况的呢, 这个行业被资源消耗束缚得如此之深?

构建软件需要哪些资源?

数据中心已经在消耗数据 估计占全球电力的3%, energy is at the core of any discussion on the resources used when developing software. Electricity is used at every step of the software development life cycle — from the design 和 engineering all the way to deployment 和 hosting. Every interaction has an associated cost that could be measured in kWh 和 can therefore also be measured in tonnes of carbon dioxide equivalents (CO₂e).

当我们考虑实际情况时,这些都加起来了. For example, a weekly one-hour meeting on Zoom with 6 participants releases an estimated 0.每次会议的二氧化碳排放量为05公斤. 在一年的时间里, that results in the same emissions as driving a petrol car almost 10 miles.

There is also an indirect impact associated with the hardware required for the software — materials (especially metals 和 plastics) are required to manufacture the underlying hardware needed for servers 和 networking devices.

最后, many data centres use liquid cooling to alleviate the excess heat produced by the servers, 防止损坏其部件. The coolant used for these systems is usually water, a resource that is already scarce for over 3.20亿人.

软件工程师如何提供更环保的服务?

迁移到云

传统的本地基础设施 只利用了其容量的12%到18%, 而云服务器的利用率约为65%. 这个统计量, alongside the fact that cloud customers consume 77% fewer servers means that those same customers 将他们的碳足迹减少88%. Cloud infrastructure processed 60% of workloads in 2019, with that figure 预计到2021年底将达到94%.

These statistics mean that the question is no longer whether or not we should migrate to the cloud. 而不是, we should consider whether the cloud providers are providing their services in a sustainable manner.

Each cloud provider approaches sustainability differently — Azure is leading the way in innovating to reduce its impact. 微软已经 致力达成四项主要环保目标 ,包括到2025年100%使用可再生能源. 他们介绍 液体浸没冷却 在他们的数据中心帮助他们达到这些崇高的目标.

在AWS, 服务器使用自然空气冷却系统 that incorporate reclaimed or recycled water to provide direct evaporative cooling in summer months, ensuring the air is of a low enough temperature to sufficiently cool the infrastructure. Some sites have even installed on-site water treatment systems to reduce their overall water usage footprint.

亚马逊, Microsoft 和 Google are also purchasing varying quantities of renewable energy from external sources to further reduce their reliance on fossil fuels.

采用无服务器架构

Migrating applications to the cloud is only one piece of the puzzle, however. Adopting a serverless architecture is critical as it enables us to use what is necessary with little-to-no waste. Using a serverless architecture means that your application runs on infrastructure managed by a cloud provider. 

这类基础设施的例子是AWS的Fargate, Azure的CosmosDB和GCP的Cloud Functions. This infrastructure is shared (unless a dedicated host/instance is requested) 和 billed on usage. Sharing infrastructure means utilisation of the underlying infrastructure is maximised while billing based on usage encourages reduction 和 optimisation wherever possible.

优化你的功能

最后减少的方法 您的服务对环境的影响是优化的. Optimising the functionality working behind-the-scenes on an application or website, 即使它只会带来几毫秒的性能提升, 当我们改变我们的观点时,它会呈指数级增长. A few additional milliseconds taken when a single piece of functionality is used quickly multiplies when talking about millions of uses 和 multiple applications that are powering hundreds of products.

那么我们怎样才能使网站更节能呢?

  • 添加暗模式
  • 阻止机器人和网页抓取器
  • 尽可能使用静态内容
  • 实现缓存并使用CDN
  • 减少图像和视频的数量或大小
  • 减少字体的种类
  • 尽可能使用系统字体

有些人甚至更进一步, developing free 和 open tools that allow users to make sustainability more visible. 例子包括 云可持续性控制台绿色托管检查 和 碳足迹计算器 为网站.

非技术团队如何提供帮助?

其他团队可以通过几种方式降低公司的影响力. They can contribute indirectly by setting sustainability targets 和 monitoring how the business adheres to these targets. 微软已经建立了一个 可持续性的计算器 to make monitoring 和 reporting progress towards environmental targets easier for their customers.

它们还可以更直接地影响公司的碳足迹. 组织必须授权他们的团队参与行动, 虽然小, 所有加起来, 如:

  • 汽车共享
  • 循环上班计划
  • 办公场所的回收箱
  • 可持续发展的供应商

净零对任何行业或地区来说都是不小的成就. We all have to take whatever small steps we can to wean ourselves off wasteful, 碳排放过程. These small steps can then grow exponentially into visibly significant changes. This is particularly difficult for any industries that have become accustomed to a particular way of working, 软件工程绝不是个例.

澳门十大正规赌博娱乐平台

在这里注册

" class="hidden">中国道教协会